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 #include <linux/version.h>
54 #include <linux/module.h>
55 #include <linux/kernel.h>
56 #include <linux/sched.h>
57 #include <linux/types.h>
58 #include <linux/slab.h>
59 #include <linux/wireless.h>
60 #include <linux/netdevice.h>
62 #include <linux/delay.h>
63 #include <asm/byteorder.h>
64 #include <linux/usb.h>
65 #include <linux/bitops.h>
67 #include "p80211types.h"
68 #include "p80211hdr.h"
69 #include "p80211mgmt.h"
70 #include "p80211conv.h"
71 #include "p80211msg.h"
72 #include "p80211netdev.h"
73 #include "p80211metadef.h"
74 #include "p80211metastruct.h"
76 #include "prism2mgmt.h"
78 #define MIB_TMP_MAXLEN 200 /* Max length of RID record (in bytes). */
80 #define F_STA 0x1 /* MIB is supported on stations. */
81 #define F_READ 0x2 /* MIB may be read. */
82 #define F_WRITE 0x4 /* MIB may be written. */
84 typedef struct mibrec {
90 int (*func) (struct mibrec *mib,
92 wlandevice_t *wlandev,
94 p80211msg_dot11req_mibset_t *msg, void *data);
97 static int prism2mib_bytearea2pstr(mibrec_t *mib,
99 wlandevice_t *wlandev,
101 p80211msg_dot11req_mibset_t *msg,
104 static int prism2mib_uint32(mibrec_t *mib,
106 wlandevice_t *wlandev,
108 p80211msg_dot11req_mibset_t *msg, void *data);
110 static int prism2mib_flag(mibrec_t *mib,
112 wlandevice_t *wlandev,
114 p80211msg_dot11req_mibset_t *msg, void *data);
116 static int prism2mib_wepdefaultkey(mibrec_t *mib,
118 wlandevice_t *wlandev,
120 p80211msg_dot11req_mibset_t *msg,
123 static int prism2mib_privacyinvoked(mibrec_t *mib,
125 wlandevice_t *wlandev,
127 p80211msg_dot11req_mibset_t *msg,
130 static int prism2mib_excludeunencrypted(mibrec_t *mib,
132 wlandevice_t *wlandev,
134 p80211msg_dot11req_mibset_t *msg,
137 static int prism2mib_fragmentationthreshold(mibrec_t *mib,
139 wlandevice_t *wlandev,
141 p80211msg_dot11req_mibset_t *msg,
144 static int prism2mib_priv(mibrec_t *mib,
146 wlandevice_t *wlandev,
148 p80211msg_dot11req_mibset_t *msg, void *data);
150 static mibrec_t mibtab[] = {
153 {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0,
155 HFA384x_RID_CNFWEPDEFAULTKEY0, 0, 0,
156 prism2mib_wepdefaultkey},
157 {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1,
159 HFA384x_RID_CNFWEPDEFAULTKEY1, 0, 0,
160 prism2mib_wepdefaultkey},
161 {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2,
163 HFA384x_RID_CNFWEPDEFAULTKEY2, 0, 0,
164 prism2mib_wepdefaultkey},
165 {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3,
167 HFA384x_RID_CNFWEPDEFAULTKEY3, 0, 0,
168 prism2mib_wepdefaultkey},
169 {DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked,
170 F_STA | F_READ | F_WRITE,
171 HFA384x_RID_CNFWEPFLAGS, HFA384x_WEPFLAGS_PRIVINVOKED, 0,
172 prism2mib_privacyinvoked},
173 {DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID,
174 F_STA | F_READ | F_WRITE,
175 HFA384x_RID_CNFWEPDEFAULTKEYID, 0, 0,
177 {DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted,
178 F_STA | F_READ | F_WRITE,
179 HFA384x_RID_CNFWEPFLAGS, HFA384x_WEPFLAGS_EXCLUDE, 0,
180 prism2mib_excludeunencrypted},
184 {DIDmib_dot11mac_dot11OperationTable_dot11MACAddress,
185 F_STA | F_READ | F_WRITE,
186 HFA384x_RID_CNFOWNMACADDR, HFA384x_RID_CNFOWNMACADDR_LEN, 0,
187 prism2mib_bytearea2pstr},
188 {DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold,
189 F_STA | F_READ | F_WRITE,
190 HFA384x_RID_RTSTHRESH, 0, 0,
192 {DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit,
194 HFA384x_RID_SHORTRETRYLIMIT, 0, 0,
196 {DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit,
198 HFA384x_RID_LONGRETRYLIMIT, 0, 0,
200 {DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold,
201 F_STA | F_READ | F_WRITE,
202 HFA384x_RID_FRAGTHRESH, 0, 0,
203 prism2mib_fragmentationthreshold},
204 {DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime,
206 HFA384x_RID_MAXTXLIFETIME, 0, 0,
211 {DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel,
213 HFA384x_RID_CURRENTCHANNEL, 0, 0,
215 {DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel,
216 F_STA | F_READ | F_WRITE,
217 HFA384x_RID_TXPOWERMAX, 0, 0,
222 {DIDmib_p2_p2Static_p2CnfPortType,
223 F_STA | F_READ | F_WRITE,
224 HFA384x_RID_CNFPORTTYPE, 0, 0,
229 {DIDmib_p2_p2MAC_p2CurrentTxRate,
231 HFA384x_RID_CURRENTTXRATE, 0, 0,
234 /* And finally, lnx mibs */
235 {DIDmib_lnx_lnxConfigTable_lnxRSNAIE,
236 F_STA | F_READ | F_WRITE,
237 HFA384x_RID_CNFWPADATA, 0, 0,
239 {0, 0, 0, 0, 0, NULL}
242 /*----------------------------------------------------------------
243 * prism2mgmt_mibset_mibget
245 * Set the value of a mib item.
248 * wlandev wlan device structure
249 * msgp ptr to msg buffer
253 * <0 success, but we're waiting for something to finish.
254 * >0 an error occurred while handling the message.
258 * process thread (usually)
260 ----------------------------------------------------------------*/
262 int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp)
264 hfa384x_t *hw = wlandev->priv;
270 p80211msg_dot11req_mibset_t *msg = msgp;
271 p80211itemd_t *mibitem;
273 msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
274 msg->resultcode.data = P80211ENUM_resultcode_success;
277 ** Determine if this is an Access Point or a station.
283 ** Find the MIB in the MIB table. Note that a MIB may be in the
284 ** table twice...once for an AP and once for a station. Make sure
285 ** to get the correct one. Note that DID=0 marks the end of the
289 mibitem = (p80211itemd_t *) msg->mibattribute.data;
291 for (mib = mibtab; mib->did != 0; mib++)
292 if (mib->did == mibitem->did && (mib->flag & which))
296 msg->resultcode.data = P80211ENUM_resultcode_not_supported;
301 ** Determine if this is a "mibget" or a "mibset". If this is a
302 ** "mibget", then make sure that the MIB may be read. Otherwise,
303 ** this is a "mibset" so make make sure that the MIB may be written.
306 isget = (msg->msgcode == DIDmsg_dot11req_mibget);
309 if (!(mib->flag & F_READ)) {
310 msg->resultcode.data =
311 P80211ENUM_resultcode_cant_get_writeonly_mib;
315 if (!(mib->flag & F_WRITE)) {
316 msg->resultcode.data =
317 P80211ENUM_resultcode_cant_set_readonly_mib;
323 ** Execute the MIB function. If things worked okay, then make
324 ** sure that the MIB function also worked okay. If so, and this
325 ** is a "mibget", then the status value must be set for both the
326 ** "mibattribute" parameter and the mib item within the data
327 ** portion of the "mibattribute".
330 result = mib->func(mib, isget, wlandev, hw, msg, (void *)mibitem->data);
332 if (msg->resultcode.data == P80211ENUM_resultcode_success) {
334 pr_debug("get/set failure, result=%d\n",
336 msg->resultcode.data =
337 P80211ENUM_resultcode_implementation_failure;
340 msg->mibattribute.status =
341 P80211ENUM_msgitem_status_data_ok;
343 P80211ENUM_msgitem_status_data_ok;
352 /*----------------------------------------------------------------
353 * prism2mib_bytearea2pstr
355 * Get/set pstr data to/from a byte area.
357 * MIB record parameters:
358 * parm1 Prism2 RID value.
359 * parm2 Number of bytes of RID data.
364 * isget MIBGET/MIBSET flag.
365 * wlandev wlan device structure.
366 * priv "priv" structure.
368 * msg Message structure.
375 ----------------------------------------------------------------*/
377 static int prism2mib_bytearea2pstr(mibrec_t *mib,
379 wlandevice_t *wlandev,
381 p80211msg_dot11req_mibset_t *msg,
385 p80211pstrd_t *pstr = (p80211pstrd_t *) data;
386 u8 bytebuf[MIB_TMP_MAXLEN];
390 hfa384x_drvr_getconfig(hw, mib->parm1, bytebuf, mib->parm2);
391 prism2mgmt_bytearea2pstr(bytebuf, pstr, mib->parm2);
393 memset(bytebuf, 0, mib->parm2);
394 prism2mgmt_pstr2bytearea(bytebuf, pstr);
396 hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, mib->parm2);
402 /*----------------------------------------------------------------
405 * Get/set uint32 data.
407 * MIB record parameters:
408 * parm1 Prism2 RID value.
414 * isget MIBGET/MIBSET flag.
415 * wlandev wlan device structure.
416 * priv "priv" structure.
418 * msg Message structure.
425 ----------------------------------------------------------------*/
427 static int prism2mib_uint32(mibrec_t *mib,
429 wlandevice_t *wlandev,
431 p80211msg_dot11req_mibset_t *msg, void *data)
434 u32 *uint32 = (u32 *) data;
435 u8 bytebuf[MIB_TMP_MAXLEN];
436 u16 *wordbuf = (u16 *) bytebuf;
439 result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf);
441 /* [MSM] Removed, getconfig16 returns the value in host order.
442 * prism2mgmt_prism2int2p80211int(wordbuf, uint32);
445 /* [MSM] Removed, setconfig16 expects host order.
446 * prism2mgmt_p80211int2prism2int(wordbuf, uint32);
449 result = hfa384x_drvr_setconfig16(hw, mib->parm1, *wordbuf);
455 /*----------------------------------------------------------------
460 * MIB record parameters:
461 * parm1 Prism2 RID value.
462 * parm2 Bit to get/set.
467 * isget MIBGET/MIBSET flag.
468 * wlandev wlan device structure.
469 * priv "priv" structure.
471 * msg Message structure.
478 ----------------------------------------------------------------*/
480 static int prism2mib_flag(mibrec_t *mib,
482 wlandevice_t *wlandev,
484 p80211msg_dot11req_mibset_t *msg, void *data)
487 u32 *uint32 = (u32 *) data;
488 u8 bytebuf[MIB_TMP_MAXLEN];
489 u16 *wordbuf = (u16 *) bytebuf;
492 result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf);
494 /* [MSM] Removed, getconfig16 returns the value in host order.
495 * prism2mgmt_prism2int2p80211int(wordbuf, &flags);
499 *uint32 = (flags & mib->parm2) ?
500 P80211ENUM_truth_true : P80211ENUM_truth_false;
502 if ((*uint32) == P80211ENUM_truth_true)
505 flags &= ~mib->parm2;
506 /* [MSM] Removed, setconfig16 expects host order.
507 * prism2mgmt_p80211int2prism2int(wordbuf, &flags);
511 hfa384x_drvr_setconfig16(hw, mib->parm1, *wordbuf);
518 /*----------------------------------------------------------------
519 * prism2mib_wepdefaultkey
521 * Get/set WEP default keys.
523 * MIB record parameters:
524 * parm1 Prism2 RID value.
525 * parm2 Number of bytes of RID data.
530 * isget MIBGET/MIBSET flag.
531 * wlandev wlan device structure.
532 * priv "priv" structure.
534 * msg Message structure.
541 ----------------------------------------------------------------*/
543 static int prism2mib_wepdefaultkey(mibrec_t *mib,
545 wlandevice_t *wlandev,
547 p80211msg_dot11req_mibset_t *msg,
551 p80211pstrd_t *pstr = (p80211pstrd_t *) data;
552 u8 bytebuf[MIB_TMP_MAXLEN];
556 result = 0; /* Should never happen. */
558 len = (pstr->len > 5) ? HFA384x_RID_CNFWEP128DEFAULTKEY_LEN :
559 HFA384x_RID_CNFWEPDEFAULTKEY_LEN;
560 memset(bytebuf, 0, len);
561 prism2mgmt_pstr2bytearea(bytebuf, pstr);
562 result = hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, len);
568 /*----------------------------------------------------------------
569 * prism2mib_privacyinvoked
571 * Get/set the dot11PrivacyInvoked value.
573 * MIB record parameters:
574 * parm1 Prism2 RID value.
575 * parm2 Bit value for PrivacyInvoked flag.
580 * isget MIBGET/MIBSET flag.
581 * wlandev wlan device structure.
582 * priv "priv" structure.
584 * msg Message structure.
591 ----------------------------------------------------------------*/
593 static int prism2mib_privacyinvoked(mibrec_t *mib,
595 wlandevice_t *wlandev,
597 p80211msg_dot11req_mibset_t *msg,
602 if (wlandev->hostwep & HOSTWEP_DECRYPT) {
603 if (wlandev->hostwep & HOSTWEP_DECRYPT)
604 mib->parm2 |= HFA384x_WEPFLAGS_DISABLE_RXCRYPT;
605 if (wlandev->hostwep & HOSTWEP_ENCRYPT)
606 mib->parm2 |= HFA384x_WEPFLAGS_DISABLE_TXCRYPT;
609 result = prism2mib_flag(mib, isget, wlandev, hw, msg, data);
614 /*----------------------------------------------------------------
615 * prism2mib_excludeunencrypted
617 * Get/set the dot11ExcludeUnencrypted value.
619 * MIB record parameters:
620 * parm1 Prism2 RID value.
621 * parm2 Bit value for ExcludeUnencrypted flag.
626 * isget MIBGET/MIBSET flag.
627 * wlandev wlan device structure.
628 * priv "priv" structure.
630 * msg Message structure.
637 ----------------------------------------------------------------*/
639 static int prism2mib_excludeunencrypted(mibrec_t *mib,
641 wlandevice_t *wlandev,
643 p80211msg_dot11req_mibset_t *msg,
648 result = prism2mib_flag(mib, isget, wlandev, hw, msg, data);
653 /*----------------------------------------------------------------
654 * prism2mib_fragmentationthreshold
656 * Get/set the fragmentation threshold.
658 * MIB record parameters:
659 * parm1 Prism2 RID value.
665 * isget MIBGET/MIBSET flag.
666 * wlandev wlan device structure.
667 * priv "priv" structure.
669 * msg Message structure.
676 ----------------------------------------------------------------*/
678 static int prism2mib_fragmentationthreshold(mibrec_t *mib,
680 wlandevice_t *wlandev,
682 p80211msg_dot11req_mibset_t *msg,
686 u32 *uint32 = (u32 *) data;
690 printk(KERN_WARNING "Attempt to set odd number "
691 "FragmentationThreshold\n");
692 msg->resultcode.data =
693 P80211ENUM_resultcode_not_supported;
697 result = prism2mib_uint32(mib, isget, wlandev, hw, msg, data);
702 /*----------------------------------------------------------------
705 * Get/set values in the "priv" data structure.
707 * MIB record parameters:
714 * isget MIBGET/MIBSET flag.
715 * wlandev wlan device structure.
716 * priv "priv" structure.
718 * msg Message structure.
725 ----------------------------------------------------------------*/
727 static int prism2mib_priv(mibrec_t *mib,
729 wlandevice_t *wlandev,
731 p80211msg_dot11req_mibset_t *msg, void *data)
733 p80211pstrd_t *pstr = (p80211pstrd_t *) data;
738 case DIDmib_lnx_lnxConfigTable_lnxRSNAIE:{
739 hfa384x_WPAData_t wpa;
741 hfa384x_drvr_getconfig(hw,
742 HFA384x_RID_CNFWPADATA,
745 pstr->len = hfa384x2host_16(wpa.datalen);
746 memcpy(pstr->data, wpa.data, pstr->len);
748 wpa.datalen = host2hfa384x_16(pstr->len);
749 memcpy(wpa.data, pstr->data, pstr->len);
752 hfa384x_drvr_setconfig(hw,
753 HFA384x_RID_CNFWPADATA,
760 printk(KERN_ERR "Unhandled DID 0x%08x\n", mib->did);
766 /*----------------------------------------------------------------
767 * prism2mgmt_pstr2bytestr
769 * Convert the pstr data in the WLAN message structure into an hfa384x
770 * byte string format.
773 * bytestr hfa384x byte string data type
774 * pstr wlan message data
779 ----------------------------------------------------------------*/
781 void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr)
783 bytestr->len = host2hfa384x_16((u16) (pstr->len));
784 memcpy(bytestr->data, pstr->data, pstr->len);
787 /*----------------------------------------------------------------
788 * prism2mgmt_pstr2bytearea
790 * Convert the pstr data in the WLAN message structure into an hfa384x
794 * bytearea hfa384x byte area data type
795 * pstr wlan message data
800 ----------------------------------------------------------------*/
802 void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr)
804 memcpy(bytearea, pstr->data, pstr->len);
807 /*----------------------------------------------------------------
808 * prism2mgmt_bytestr2pstr
810 * Convert the data in an hfa384x byte string format into a
811 * pstr in the WLAN message.
814 * bytestr hfa384x byte string data type
820 ----------------------------------------------------------------*/
822 void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr)
824 pstr->len = (u8) (hfa384x2host_16((u16) (bytestr->len)));
825 memcpy(pstr->data, bytestr->data, pstr->len);
828 /*----------------------------------------------------------------
829 * prism2mgmt_bytearea2pstr
831 * Convert the data in an hfa384x byte area format into a pstr
832 * in the WLAN message.
835 * bytearea hfa384x byte area data type
841 ----------------------------------------------------------------*/
843 void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len)
845 pstr->len = (u8) len;
846 memcpy(pstr->data, bytearea, len);
849 /*----------------------------------------------------------------
850 * prism2mgmt_prism2int2p80211int
852 * Convert an hfa384x integer into a wlan integer
855 * prism2enum pointer to hfa384x integer
856 * wlanenum pointer to p80211 integer
861 ----------------------------------------------------------------*/
863 void prism2mgmt_prism2int2p80211int(u16 *prism2int, u32 *wlanint)
865 *wlanint = (u32) hfa384x2host_16(*prism2int);
868 /*----------------------------------------------------------------
869 * prism2mgmt_p80211int2prism2int
871 * Convert a wlan integer into an hfa384x integer
874 * prism2enum pointer to hfa384x integer
875 * wlanenum pointer to p80211 integer
880 ----------------------------------------------------------------*/
882 void prism2mgmt_p80211int2prism2int(u16 *prism2int, u32 *wlanint)
884 *prism2int = host2hfa384x_16((u16) (*wlanint));
887 /*----------------------------------------------------------------
888 * prism2mgmt_prism2enum2p80211enum
890 * Convert the hfa384x enumerated int into a p80211 enumerated int
893 * prism2enum pointer to hfa384x integer
894 * wlanenum pointer to p80211 integer
895 * rid hfa384x record id
900 ----------------------------------------------------------------*/
901 void prism2mgmt_prism2enum2p80211enum(u16 *prism2enum, u32 *wlanenum, u16 rid)
903 /* At the moment, the need for this functionality hasn't
904 presented itself. All the wlan enumerated values are
905 a 1-to-1 match against the Prism2 enumerated values */
909 /*----------------------------------------------------------------
910 * prism2mgmt_p80211enum2prism2enum
912 * Convert the p80211 enumerated int into an hfa384x enumerated int
915 * prism2enum pointer to hfa384x integer
916 * wlanenum pointer to p80211 integer
917 * rid hfa384x record id
922 ----------------------------------------------------------------*/
923 void prism2mgmt_p80211enum2prism2enum(u16 *prism2enum, u32 *wlanenum, u16 rid)
925 /* At the moment, the need for this functionality hasn't
926 presented itself. All the wlan enumerated values are
927 a 1-to-1 match against the Prism2 enumerated values */
931 /*----------------------------------------------------------------
932 * prism2mgmt_get_oprateset
934 * Convert the hfa384x bit area into a wlan octet string.
937 * rate Prism2 bit area
938 * pstr wlan octet string
943 ----------------------------------------------------------------*/
944 void prism2mgmt_get_oprateset(u16 *rate, p80211pstrd_t *pstr)
950 datarate = pstr->data;
953 if (BIT(0) & (*rate)) {
960 if (BIT(1) & (*rate)) {
967 if (BIT(2) & (*rate)) {
974 if (BIT(3) & (*rate)) {
985 /*----------------------------------------------------------------
986 * prism2mgmt_set_oprateset
988 * Convert the wlan octet string into an hfa384x bit area.
991 * rate Prism2 bit area
992 * pstr wlan octet string
997 ----------------------------------------------------------------*/
998 void prism2mgmt_set_oprateset(u16 *rate, p80211pstrd_t *pstr)
1005 datarate = pstr->data;
1007 for (i = 0; i < pstr->len; i++, datarate++) {
1008 switch (*datarate) {
1009 case 2: /* 1 Mbps */
1012 case 4: /* 2 Mbps */
1015 case 11: /* 5.5 Mbps */
1018 case 22: /* 11 Mbps */
1022 pr_debug("Unrecoginzed Rate of %d\n",