PATCH: Operational rates

Jussi Mäki valen
Thu Apr 10 05:35:41 PDT 2003


This patch adds prism2_param 33 to set tx_rate_control to bitmap
specified so you can set specific rates, syntax is exactly the same as in
basic_rates.

For example: "iwpriv wlan0 prism2_param 33 6" will set
tx_rate_control to rates 2Mbps and 5.5Mbps.

---
Index: driver/modules/hostap_ioctl.c
===================================================================
RCS file: /cvs/hostap/driver/modules/hostap_ioctl.c,v
retrieving revision 1.32
diff -u -r1.32 hostap_ioctl.c
--- driver/modules/hostap_ioctl.c	8 Apr 2003 04:08:27 -0000	1.32
+++ driver/modules/hostap_ioctl.c	10 Apr 2003 12:32:27 -0000
@@ -1916,6 +1916,11 @@
 	  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "basic_rates" },
 	{ PRISM2_PARAM_BASIC_RATES,
 	  0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getbasic_rates" },
+	{ PRISM2_PARAM_OPER_RATES,
+	  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "oper_rates" },
+	{ PRISM2_PARAM_OPER_RATES,
+	  0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getoper_rates" },
+
 #endif /* PRISM2_USE_WE_SUB_IOCTLS */
 #endif /* WIRELESS_EXT >= 12 */
 };
@@ -2255,6 +2260,15 @@
 			ret = -EINVAL;
 		break;

+	case PRISM2_PARAM_OPER_RATES:
+		local->tx_rate_control = value;
+		if (hostap_set_word(dev, HFA384X_RID_TXRATECONTROL,
+		                    local->tx_rate_control) ||
+				    hostap_set_word(dev, HFA384X_RID_CNFSUPPORTEDRATES,
+	                            local->tx_rate_control) || local->func->reset_port(dev))
+			ret = -EINVAL;
+		break;
+
 	default:
 		printk(KERN_DEBUG "%s: prism2_param: unknown param %d\n",
 		       dev->name, param);
@@ -2432,6 +2446,10 @@
 		*param = local->basic_rates;
 		break;

+	case PRISM2_PARAM_OPER_RATES:
+		*param = local->tx_rate_control;
+		break;
+
 	default:
 		printk(KERN_DEBUG "%s: get_prism2_param: unknown param %d\n",
 		       dev->name, *param);
Index: driver/modules/hostap_wlan.h
===================================================================
RCS file: /cvs/hostap/driver/modules/hostap_wlan.h,v
retrieving revision 1.45
diff -u -r1.45 hostap_wlan.h
--- driver/modules/hostap_wlan.h	8 Apr 2003 04:08:27 -0000	1.45
+++ driver/modules/hostap_wlan.h	10 Apr 2003 12:32:28 -0000
@@ -881,6 +881,7 @@
 	PRISM2_PARAM_ENH_SEC = 30,
 	PRISM2_PARAM_IO_DEBUG = 31,
 	PRISM2_PARAM_BASIC_RATES = 32,
+	PRISM2_PARAM_OPER_RATES = 33,
 };

 enum { HOSTAP_ANTSEL_DO_NOT_TOUCH = 0, HOSTAP_ANTSEL_DIVERSITY = 1,





More information about the Hostap mailing list