53 #include <linux/module.h>
54 #include <linux/kernel.h>
55 #include <linux/sched.h>
56 #include <linux/types.h>
57 #include <linux/wireless.h>
58 #include <linux/netdevice.h>
61 #include <asm/byteorder.h>
63 #include <linux/bitops.h>
76 #define MIB_TMP_MAXLEN 200
95 static int prism2mib_bytearea2pstr(
struct mibrec *mib,
102 static int prism2mib_uint32(
struct mibrec *mib,
108 static int prism2mib_flag(
struct mibrec *mib,
114 static int prism2mib_wepdefaultkey(
struct mibrec *mib,
121 static int prism2mib_privacyinvoked(
struct mibrec *mib,
128 static int prism2mib_excludeunencrypted(
struct mibrec *mib,
135 static int prism2mib_fragmentationthreshold(
struct mibrec *mib,
142 static int prism2mib_priv(
struct mibrec *mib,
148 static struct mibrec mibtab[] = {
154 prism2mib_wepdefaultkey},
158 prism2mib_wepdefaultkey},
162 prism2mib_wepdefaultkey},
166 prism2mib_wepdefaultkey},
170 prism2mib_privacyinvoked},
178 prism2mib_excludeunencrypted},
185 prism2mib_bytearea2pstr},
201 prism2mib_fragmentationthreshold},
237 {0, 0, 0, 0, 0,
NULL}
262 hfa384x_t *
hw = wlandev->
priv;
289 for (mib = mibtab; mib->
did != 0; mib++)
290 if (mib->
did == mibitem->
did && (mib->
flag & which))
328 result = mib->
func(mib, isget, wlandev, hw, msg, (
void *)mibitem->
data);
332 pr_debug(
"get/set failure, result=%d\n", result);
374 static int prism2mib_bytearea2pstr(
struct mibrec *mib,
424 static int prism2mib_uint32(
struct mibrec *mib,
433 u16 *wordbuf = (
u16 *) bytebuf;
436 result = hfa384x_drvr_getconfig16(hw, mib->
parm1, wordbuf);
440 result = hfa384x_drvr_setconfig16(hw, mib->
parm1, *wordbuf);
471 static int prism2mib_flag(
struct mibrec *mib,
478 u32 *uint32 = (
u32 *) data;
480 u16 *wordbuf = (
u16 *) bytebuf;
483 result = hfa384x_drvr_getconfig16(hw, mib->
parm1, wordbuf);
487 *uint32 = (flags & mib->
parm2) ?
493 flags &= ~mib->
parm2;
496 hfa384x_drvr_setconfig16(hw, mib->
parm1, *wordbuf);
528 static int prism2mib_wepdefaultkey(
struct mibrec *mib,
578 static int prism2mib_privacyinvoked(
struct mibrec *mib,
594 result = prism2mib_flag(mib, isget, wlandev, hw, msg, data);
624 static int prism2mib_excludeunencrypted(
struct mibrec *mib,
633 result = prism2mib_flag(mib, isget, wlandev, hw, msg, data);
663 static int prism2mib_fragmentationthreshold(
struct mibrec *mib,
671 u32 *uint32 = (
u32 *) data;
676 "FragmentationThreshold\n");
682 result = prism2mib_uint32(mib, isget, wlandev, hw, msg, data);
712 static int prism2mib_priv(
struct mibrec *mib,
830 pstr->
len = (
u8) len;