1 /* src/prism2/driver/prism2mib.c
3 * Management request for mibset/mibget
5 * Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
6 * --------------------------------------------------------------------
10 * The contents of this file are subject to the Mozilla Public
11 * License Version 1.1 (the "License"); you may not use this file
12 * except in compliance with the License. You may obtain a copy of
13 * the License at http://www.mozilla.org/MPL/
15 * Software distributed under the License is distributed on an "AS
16 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
17 * implied. See the License for the specific language governing
18 * rights and limitations under the License.
20 * Alternatively, the contents of this file may be used under the
21 * terms of the GNU Public License version 2 (the "GPL"), in which
22 * case the provisions of the GPL are applicable instead of the
23 * above. If you wish to allow the use of your version of this file
24 * only under the terms of the GPL and not to allow others to use
25 * your version of this file under the MPL, indicate your decision
26 * by deleting the provisions above and replace them with the notice
27 * and other provisions required by the GPL. If you do not delete
28 * the provisions above, a recipient may use your version of this
29 * file under either the MPL or the GPL.
31 * --------------------------------------------------------------------
33 * Inquiries regarding the linux-wlan Open Source project can be
36 * AbsoluteValue Systems Inc.
38 * http://www.linux-wlan.com
40 * --------------------------------------------------------------------
42 * Portions of the development of this software were funded by
43 * Intersil Corporation as part of PRISM(R) chipset product development.
45 * --------------------------------------------------------------------
47 * The functions in this file handle the mibset/mibget management
50 * --------------------------------------------------------------------
53 /*================================================================*/
55 #define WLAN_DBVAR prism2_debug
57 #include <linux/version.h>
59 #include <linux/module.h>
60 #include <linux/kernel.h>
61 #include <linux/sched.h>
62 #include <linux/types.h>
63 #include <linux/slab.h>
64 #include <linux/wireless.h>
65 #include <linux/netdevice.h>
67 #include <linux/delay.h>
68 #include <asm/byteorder.h>
69 #include <linux/usb.h>
70 #include <linux/bitops.h>
72 /*================================================================*/
73 /* Project Includes */
75 #include "p80211types.h"
76 #include "p80211hdr.h"
77 #include "p80211mgmt.h"
78 #include "p80211conv.h"
79 #include "p80211msg.h"
80 #include "p80211netdev.h"
81 #include "p80211metadef.h"
82 #include "p80211metastruct.h"
84 #include "prism2mgmt.h"
86 /*================================================================*/
89 #define MIB_TMP_MAXLEN 200 /* Max length of RID record (in bytes). */
91 /*================================================================*/
94 #define F_STA 0x1 /* MIB is supported on stations. */
95 #define F_READ 0x2 /* MIB may be read. */
96 #define F_WRITE 0x4 /* MIB may be written. */
105 int (*func)(struct mibrec *mib,
107 wlandevice_t *wlandev,
109 p80211msg_dot11req_mibset_t *msg,
113 /*================================================================*/
114 /* Local Function Declarations */
116 static int prism2mib_bytearea2pstr(
119 wlandevice_t *wlandev,
121 p80211msg_dot11req_mibset_t *msg,
124 static int prism2mib_uint32(
127 wlandevice_t *wlandev,
129 p80211msg_dot11req_mibset_t *msg,
132 static int prism2mib_flag(
135 wlandevice_t *wlandev,
137 p80211msg_dot11req_mibset_t *msg,
140 static int prism2mib_wepdefaultkey(
143 wlandevice_t *wlandev,
145 p80211msg_dot11req_mibset_t *msg,
148 static int prism2mib_privacyinvoked(
151 wlandevice_t *wlandev,
153 p80211msg_dot11req_mibset_t *msg,
156 static int prism2mib_excludeunencrypted(
159 wlandevice_t *wlandev,
161 p80211msg_dot11req_mibset_t *msg,
164 static int prism2mib_fragmentationthreshold(
167 wlandevice_t *wlandev,
169 p80211msg_dot11req_mibset_t *msg,
172 static int prism2mib_priv(
175 wlandevice_t *wlandev,
177 p80211msg_dot11req_mibset_t *msg,
180 /*================================================================*/
181 /* Local Static Definitions */
183 static mibrec_t mibtab[] = {
186 { DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0,
188 HFA384x_RID_CNFWEPDEFAULTKEY0, 0, 0,
189 prism2mib_wepdefaultkey },
190 { DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1,
192 HFA384x_RID_CNFWEPDEFAULTKEY1, 0, 0,
193 prism2mib_wepdefaultkey },
194 { DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2,
196 HFA384x_RID_CNFWEPDEFAULTKEY2, 0, 0,
197 prism2mib_wepdefaultkey },
198 { DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3,
200 HFA384x_RID_CNFWEPDEFAULTKEY3, 0, 0,
201 prism2mib_wepdefaultkey },
202 { DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked,
203 F_STA | F_READ | F_WRITE,
204 HFA384x_RID_CNFWEPFLAGS, HFA384x_WEPFLAGS_PRIVINVOKED, 0,
205 prism2mib_privacyinvoked },
206 { DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID,
207 F_STA | F_READ | F_WRITE,
208 HFA384x_RID_CNFWEPDEFAULTKEYID, 0, 0,
210 { DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted,
211 F_STA | F_READ | F_WRITE,
212 HFA384x_RID_CNFWEPFLAGS, HFA384x_WEPFLAGS_EXCLUDE, 0,
213 prism2mib_excludeunencrypted },
217 { DIDmib_dot11mac_dot11OperationTable_dot11MACAddress,
218 F_STA | F_READ | F_WRITE,
219 HFA384x_RID_CNFOWNMACADDR, HFA384x_RID_CNFOWNMACADDR_LEN, 0,
220 prism2mib_bytearea2pstr },
221 { DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold,
222 F_STA | F_READ | F_WRITE,
223 HFA384x_RID_RTSTHRESH, 0, 0,
225 { DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit,
227 HFA384x_RID_SHORTRETRYLIMIT, 0, 0,
229 { DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit,
231 HFA384x_RID_LONGRETRYLIMIT, 0, 0,
233 { DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold,
234 F_STA | F_READ | F_WRITE,
235 HFA384x_RID_FRAGTHRESH, 0, 0,
236 prism2mib_fragmentationthreshold },
237 { DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime,
239 HFA384x_RID_MAXTXLIFETIME, 0, 0,
244 { DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel,
246 HFA384x_RID_CURRENTCHANNEL, 0, 0,
248 { DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel,
249 F_STA | F_READ | F_WRITE,
250 HFA384x_RID_TXPOWERMAX, 0, 0,
255 { DIDmib_p2_p2Static_p2CnfPortType,
256 F_STA | F_READ | F_WRITE,
257 HFA384x_RID_CNFPORTTYPE, 0, 0,
262 { DIDmib_p2_p2MAC_p2CurrentTxRate,
264 HFA384x_RID_CURRENTTXRATE, 0, 0,
267 /* And finally, lnx mibs */
268 { DIDmib_lnx_lnxConfigTable_lnxRSNAIE,
269 F_STA | F_READ | F_WRITE,
270 HFA384x_RID_CNFWPADATA, 0, 0,
272 { 0, 0, 0, 0, 0, NULL}};
274 /*================================================================*/
275 /* Function Definitions */
277 /*----------------------------------------------------------------
278 * prism2mgmt_mibset_mibget
280 * Set the value of a mib item.
283 * wlandev wlan device structure
284 * msgp ptr to msg buffer
288 * <0 success, but we're waiting for something to finish.
289 * >0 an error occurred while handling the message.
293 * process thread (usually)
295 ----------------------------------------------------------------*/
297 int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp)
299 hfa384x_t *hw = wlandev->priv;
305 p80211msg_dot11req_mibset_t *msg = msgp;
306 p80211itemd_t *mibitem;
308 msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
309 msg->resultcode.data = P80211ENUM_resultcode_success;
312 ** Determine if this is an Access Point or a station.
318 ** Find the MIB in the MIB table. Note that a MIB may be in the
319 ** table twice...once for an AP and once for a station. Make sure
320 ** to get the correct one. Note that DID=0 marks the end of the
324 mibitem = (p80211itemd_t *) msg->mibattribute.data;
326 for (mib = mibtab; mib->did != 0; mib++)
327 if (mib->did == mibitem->did && (mib->flag & which))
331 msg->resultcode.data = P80211ENUM_resultcode_not_supported;
336 ** Determine if this is a "mibget" or a "mibset". If this is a
337 ** "mibget", then make sure that the MIB may be read. Otherwise,
338 ** this is a "mibset" so make make sure that the MIB may be written.
341 isget = (msg->msgcode == DIDmsg_dot11req_mibget);
344 if (!(mib->flag & F_READ)) {
345 msg->resultcode.data =
346 P80211ENUM_resultcode_cant_get_writeonly_mib;
350 if (!(mib->flag & F_WRITE)) {
351 msg->resultcode.data =
352 P80211ENUM_resultcode_cant_set_readonly_mib;
358 ** Execute the MIB function. If things worked okay, then make
359 ** sure that the MIB function also worked okay. If so, and this
360 ** is a "mibget", then the status value must be set for both the
361 ** "mibattribute" parameter and the mib item within the data
362 ** portion of the "mibattribute".
365 result = mib->func(mib, isget, wlandev, hw, msg,
366 (void *) mibitem->data);
368 if (msg->resultcode.data == P80211ENUM_resultcode_success) {
370 WLAN_LOG_DEBUG(1, "get/set failure, result=%d\n",
372 msg->resultcode.data =
373 P80211ENUM_resultcode_implementation_failure;
376 msg->mibattribute.status =
377 P80211ENUM_msgitem_status_data_ok;
379 P80211ENUM_msgitem_status_data_ok;
388 /*----------------------------------------------------------------
389 * prism2mib_bytearea2pstr
391 * Get/set pstr data to/from a byte area.
393 * MIB record parameters:
394 * parm1 Prism2 RID value.
395 * parm2 Number of bytes of RID data.
400 * isget MIBGET/MIBSET flag.
401 * wlandev wlan device structure.
402 * priv "priv" structure.
404 * msg Message structure.
411 ----------------------------------------------------------------*/
413 static int prism2mib_bytearea2pstr(
416 wlandevice_t *wlandev,
418 p80211msg_dot11req_mibset_t *msg,
422 p80211pstrd_t *pstr = (p80211pstrd_t*) data;
423 u8 bytebuf[MIB_TMP_MAXLEN];
426 result = hfa384x_drvr_getconfig(hw, mib->parm1, bytebuf, mib->parm2);
427 prism2mgmt_bytearea2pstr(bytebuf, pstr, mib->parm2);
429 memset(bytebuf, 0, mib->parm2);
430 prism2mgmt_pstr2bytearea(bytebuf, pstr);
431 result = hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, mib->parm2);
437 /*----------------------------------------------------------------
440 * Get/set uint32 data.
442 * MIB record parameters:
443 * parm1 Prism2 RID value.
449 * isget MIBGET/MIBSET flag.
450 * wlandev wlan device structure.
451 * priv "priv" structure.
453 * msg Message structure.
460 ----------------------------------------------------------------*/
462 static int prism2mib_uint32(
465 wlandevice_t *wlandev,
467 p80211msg_dot11req_mibset_t *msg,
471 u32 *uint32 = (u32*) data;
472 u8 bytebuf[MIB_TMP_MAXLEN];
473 u16 *wordbuf = (u16*) bytebuf;
476 result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf);
478 /* [MSM] Removed, getconfig16 returns the value in host order.
479 * prism2mgmt_prism2int2p80211int(wordbuf, uint32);
482 /* [MSM] Removed, setconfig16 expects host order.
483 * prism2mgmt_p80211int2prism2int(wordbuf, uint32);
486 result = hfa384x_drvr_setconfig16(hw, mib->parm1, *wordbuf);
492 /*----------------------------------------------------------------
497 * MIB record parameters:
498 * parm1 Prism2 RID value.
499 * parm2 Bit to get/set.
504 * isget MIBGET/MIBSET flag.
505 * wlandev wlan device structure.
506 * priv "priv" structure.
508 * msg Message structure.
515 ----------------------------------------------------------------*/
517 static int prism2mib_flag(
520 wlandevice_t *wlandev,
522 p80211msg_dot11req_mibset_t *msg,
526 u32 *uint32 = (u32*) data;
527 u8 bytebuf[MIB_TMP_MAXLEN];
528 u16 *wordbuf = (u16*) bytebuf;
531 result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf);
533 /* [MSM] Removed, getconfig16 returns the value in host order.
534 * prism2mgmt_prism2int2p80211int(wordbuf, &flags);
538 *uint32 = (flags & mib->parm2) ?
539 P80211ENUM_truth_true : P80211ENUM_truth_false;
541 if ((*uint32) == P80211ENUM_truth_true)
544 flags &= ~mib->parm2;
545 /* [MSM] Removed, setconfig16 expects host order.
546 * prism2mgmt_p80211int2prism2int(wordbuf, &flags);
549 result = hfa384x_drvr_setconfig16(hw, mib->parm1, *wordbuf);
556 /*----------------------------------------------------------------
557 * prism2mib_wepdefaultkey
559 * Get/set WEP default keys.
561 * MIB record parameters:
562 * parm1 Prism2 RID value.
563 * parm2 Number of bytes of RID data.
568 * isget MIBGET/MIBSET flag.
569 * wlandev wlan device structure.
570 * priv "priv" structure.
572 * msg Message structure.
579 ----------------------------------------------------------------*/
581 static int prism2mib_wepdefaultkey(
584 wlandevice_t *wlandev,
586 p80211msg_dot11req_mibset_t *msg,
590 p80211pstrd_t *pstr = (p80211pstrd_t*) data;
591 u8 bytebuf[MIB_TMP_MAXLEN];
595 result = 0; /* Should never happen. */
597 len = (pstr->len > 5) ? HFA384x_RID_CNFWEP128DEFAULTKEY_LEN :
598 HFA384x_RID_CNFWEPDEFAULTKEY_LEN;
599 memset(bytebuf, 0, len);
600 prism2mgmt_pstr2bytearea(bytebuf, pstr);
601 result = hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, len);
607 /*----------------------------------------------------------------
608 * prism2mib_privacyinvoked
610 * Get/set the dot11PrivacyInvoked value.
612 * MIB record parameters:
613 * parm1 Prism2 RID value.
614 * parm2 Bit value for PrivacyInvoked flag.
619 * isget MIBGET/MIBSET flag.
620 * wlandev wlan device structure.
621 * priv "priv" structure.
623 * msg Message structure.
630 ----------------------------------------------------------------*/
632 static int prism2mib_privacyinvoked(
635 wlandevice_t *wlandev,
637 p80211msg_dot11req_mibset_t *msg,
642 if (wlandev->hostwep & HOSTWEP_DECRYPT) {
643 if (wlandev->hostwep & HOSTWEP_DECRYPT)
644 mib->parm2 |= HFA384x_WEPFLAGS_DISABLE_RXCRYPT;
645 if (wlandev->hostwep & HOSTWEP_ENCRYPT)
646 mib->parm2 |= HFA384x_WEPFLAGS_DISABLE_TXCRYPT;
649 result = prism2mib_flag(mib, isget, wlandev, hw, msg, data);
654 /*----------------------------------------------------------------
655 * prism2mib_excludeunencrypted
657 * Get/set the dot11ExcludeUnencrypted value.
659 * MIB record parameters:
660 * parm1 Prism2 RID value.
661 * parm2 Bit value for ExcludeUnencrypted flag.
666 * isget MIBGET/MIBSET flag.
667 * wlandev wlan device structure.
668 * priv "priv" structure.
670 * msg Message structure.
677 ----------------------------------------------------------------*/
679 static int prism2mib_excludeunencrypted(
682 wlandevice_t *wlandev,
684 p80211msg_dot11req_mibset_t *msg,
689 result = prism2mib_flag(mib, isget, wlandev, hw, msg, data);
694 /*----------------------------------------------------------------
695 * prism2mib_fragmentationthreshold
697 * Get/set the fragmentation threshold.
699 * MIB record parameters:
700 * parm1 Prism2 RID value.
706 * isget MIBGET/MIBSET flag.
707 * wlandev wlan device structure.
708 * priv "priv" structure.
710 * msg Message structure.
717 ----------------------------------------------------------------*/
719 static int prism2mib_fragmentationthreshold(
722 wlandevice_t *wlandev,
724 p80211msg_dot11req_mibset_t *msg,
728 u32 *uint32 = (u32*) data;
732 printk(KERN_WARNING "Attempt to set odd number "
733 "FragmentationThreshold\n");
734 msg->resultcode.data = P80211ENUM_resultcode_not_supported;
738 result = prism2mib_uint32(mib, isget, wlandev, hw, msg, data);
743 /*----------------------------------------------------------------
746 * Get/set values in the "priv" data structure.
748 * MIB record parameters:
755 * isget MIBGET/MIBSET flag.
756 * wlandev wlan device structure.
757 * priv "priv" structure.
759 * msg Message structure.
766 ----------------------------------------------------------------*/
768 static int prism2mib_priv(
771 wlandevice_t *wlandev,
773 p80211msg_dot11req_mibset_t *msg,
776 p80211pstrd_t *pstr = (p80211pstrd_t*) data;
781 case DIDmib_lnx_lnxConfigTable_lnxRSNAIE: {
782 hfa384x_WPAData_t wpa;
784 hfa384x_drvr_getconfig( hw, HFA384x_RID_CNFWPADATA,
785 (u8 *) &wpa, sizeof(wpa));
786 pstr->len = hfa384x2host_16(wpa.datalen);
787 memcpy(pstr->data, wpa.data, pstr->len);
789 wpa.datalen = host2hfa384x_16(pstr->len);
790 memcpy(wpa.data, pstr->data, pstr->len);
792 result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFWPADATA,
793 (u8 *) &wpa, sizeof(wpa));
798 printk(KERN_ERR "Unhandled DID 0x%08x\n", mib->did);
804 /*----------------------------------------------------------------
805 * prism2mgmt_pstr2bytestr
807 * Convert the pstr data in the WLAN message structure into an hfa384x
808 * byte string format.
811 * bytestr hfa384x byte string data type
812 * pstr wlan message data
817 ----------------------------------------------------------------*/
819 void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr)
821 bytestr->len = host2hfa384x_16((u16)(pstr->len));
822 memcpy(bytestr->data, pstr->data, pstr->len);
826 /*----------------------------------------------------------------
827 * prism2mgmt_pstr2bytearea
829 * Convert the pstr data in the WLAN message structure into an hfa384x
833 * bytearea hfa384x byte area data type
834 * pstr wlan message data
839 ----------------------------------------------------------------*/
841 void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr)
843 memcpy(bytearea, pstr->data, pstr->len);
847 /*----------------------------------------------------------------
848 * prism2mgmt_bytestr2pstr
850 * Convert the data in an hfa384x byte string format into a
851 * pstr in the WLAN message.
854 * bytestr hfa384x byte string data type
860 ----------------------------------------------------------------*/
862 void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr)
864 pstr->len = (u8)(hfa384x2host_16((u16)(bytestr->len)));
865 memcpy(pstr->data, bytestr->data, pstr->len);
869 /*----------------------------------------------------------------
870 * prism2mgmt_bytearea2pstr
872 * Convert the data in an hfa384x byte area format into a pstr
873 * in the WLAN message.
876 * bytearea hfa384x byte area data type
882 ----------------------------------------------------------------*/
884 void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len)
887 memcpy(pstr->data, bytearea, len);
891 /*----------------------------------------------------------------
892 * prism2mgmt_prism2int2p80211int
894 * Convert an hfa384x integer into a wlan integer
897 * prism2enum pointer to hfa384x integer
898 * wlanenum pointer to p80211 integer
903 ----------------------------------------------------------------*/
905 void prism2mgmt_prism2int2p80211int(u16 *prism2int, u32 *wlanint)
907 *wlanint = (u32)hfa384x2host_16(*prism2int);
911 /*----------------------------------------------------------------
912 * prism2mgmt_p80211int2prism2int
914 * Convert a wlan integer into an hfa384x integer
917 * prism2enum pointer to hfa384x integer
918 * wlanenum pointer to p80211 integer
923 ----------------------------------------------------------------*/
925 void prism2mgmt_p80211int2prism2int(u16 *prism2int, u32 *wlanint)
927 *prism2int = host2hfa384x_16((u16)(*wlanint));
931 /*----------------------------------------------------------------
932 * prism2mgmt_prism2enum2p80211enum
934 * Convert the hfa384x enumerated int into a p80211 enumerated int
937 * prism2enum pointer to hfa384x integer
938 * wlanenum pointer to p80211 integer
939 * rid hfa384x record id
944 ----------------------------------------------------------------*/
945 void prism2mgmt_prism2enum2p80211enum(u16 *prism2enum, u32 *wlanenum, u16 rid)
947 /* At the moment, the need for this functionality hasn't
948 presented itself. All the wlan enumerated values are
949 a 1-to-1 match against the Prism2 enumerated values*/
954 /*----------------------------------------------------------------
955 * prism2mgmt_p80211enum2prism2enum
957 * Convert the p80211 enumerated int into an hfa384x enumerated int
960 * prism2enum pointer to hfa384x integer
961 * wlanenum pointer to p80211 integer
962 * rid hfa384x record id
967 ----------------------------------------------------------------*/
968 void prism2mgmt_p80211enum2prism2enum(u16 *prism2enum, u32 *wlanenum, u16 rid)
970 /* At the moment, the need for this functionality hasn't
971 presented itself. All the wlan enumerated values are
972 a 1-to-1 match against the Prism2 enumerated values*/
978 /*----------------------------------------------------------------
979 * prism2mgmt_get_oprateset
981 * Convert the hfa384x bit area into a wlan octet string.
984 * rate Prism2 bit area
985 * pstr wlan octet string
990 ----------------------------------------------------------------*/
991 void prism2mgmt_get_oprateset(u16 *rate, p80211pstrd_t *pstr)
997 datarate = pstr->data;
1000 if ( BIT(0) & (*rate) ) {
1007 if ( BIT(1) & (*rate) ) {
1014 if ( BIT(2) & (*rate) ) {
1021 if ( BIT(3) & (*rate) ) {
1034 /*----------------------------------------------------------------
1035 * prism2mgmt_set_oprateset
1037 * Convert the wlan octet string into an hfa384x bit area.
1040 * rate Prism2 bit area
1041 * pstr wlan octet string
1046 ----------------------------------------------------------------*/
1047 void prism2mgmt_set_oprateset(u16 *rate, p80211pstrd_t *pstr)
1054 datarate = pstr->data;
1056 for ( i=0; i < pstr->len; i++, datarate++ ) {
1057 switch (*datarate) {
1058 case 2: /* 1 Mbps */
1061 case 4: /* 2 Mbps */
1064 case 11: /* 5.5 Mbps */
1067 case 22: /* 11 Mbps */
1071 WLAN_LOG_DEBUG(1, "Unrecoginzed Rate of %d\n",