aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/wlan-ng/hfa384x.h74
-rw-r--r--drivers/staging/wlan-ng/hfa384x_usb.c8
-rw-r--r--drivers/staging/wlan-ng/p80211conv.c23
-rw-r--r--drivers/staging/wlan-ng/p80211conv.h4
-rw-r--r--drivers/staging/wlan-ng/p80211metadef.h18
-rw-r--r--drivers/staging/wlan-ng/p80211mgmt.h42
-rw-r--r--drivers/staging/wlan-ng/p80211netdev.c7
-rw-r--r--drivers/staging/wlan-ng/p80211netdev.h44
-rw-r--r--drivers/staging/wlan-ng/p80211req.c2
-rw-r--r--drivers/staging/wlan-ng/p80211req.h2
-rw-r--r--drivers/staging/wlan-ng/p80211types.h18
-rw-r--r--drivers/staging/wlan-ng/p80211wext.c55
-rw-r--r--drivers/staging/wlan-ng/prism2fw.c60
-rw-r--r--drivers/staging/wlan-ng/prism2mgmt.c4
-rw-r--r--drivers/staging/wlan-ng/prism2mgmt.h48
-rw-r--r--drivers/staging/wlan-ng/prism2mib.c6
-rw-r--r--drivers/staging/wlan-ng/prism2sta.c18
17 files changed, 217 insertions, 216 deletions
diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 46cce8159e5..d93e6e90720 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -115,8 +115,8 @@
115 115
116/* Make a 32-bit flat address from AUX format 16-bit page and offset */ 116/* Make a 32-bit flat address from AUX format 16-bit page and offset */
117#define HFA384x_ADDR_AUX_MKFLAT(p, o) \ 117#define HFA384x_ADDR_AUX_MKFLAT(p, o) \
118 (((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \ 118 ((((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \
119 ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK)) 119 ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK)))
120 120
121/* Make CMD format offset and page from a 32-bit flat address */ 121/* Make CMD format offset and page from a 32-bit flat address */
122#define HFA384x_ADDR_CMD_MKPAGE(f) \ 122#define HFA384x_ADDR_CMD_MKPAGE(f) \
@@ -402,7 +402,7 @@ typedef struct hfa384x_authenticateStation_data {
402/*-- Configuration Record: WPAData (data portion only) --*/ 402/*-- Configuration Record: WPAData (data portion only) --*/
403typedef struct hfa384x_WPAData { 403typedef struct hfa384x_WPAData {
404 u16 datalen; 404 u16 datalen;
405 u8 data[0]; // max 80 405 u8 data[0]; /* max 80 */
406} __attribute__ ((packed)) hfa384x_WPAData_t; 406} __attribute__ ((packed)) hfa384x_WPAData_t;
407 407
408/*-------------------------------------------------------------------- 408/*--------------------------------------------------------------------
@@ -1133,7 +1133,7 @@ struct hfa384x;
1133 1133
1134typedef void (*ctlx_cmdcb_t) (struct hfa384x *, const struct hfa384x_usbctlx *); 1134typedef void (*ctlx_cmdcb_t) (struct hfa384x *, const struct hfa384x_usbctlx *);
1135 1135
1136typedef void (*ctlx_usercb_t) (struct hfa384x * hw, 1136typedef void (*ctlx_usercb_t) (struct hfa384x *hw,
1137 void *ctlxresult, void *usercb_data); 1137 void *ctlxresult, void *usercb_data);
1138 1138
1139typedef struct hfa384x_usbctlx { 1139typedef struct hfa384x_usbctlx {
@@ -1320,25 +1320,25 @@ typedef struct hfa384x {
1320 1320
1321} hfa384x_t; 1321} hfa384x_t;
1322 1322
1323void hfa384x_create(hfa384x_t * hw, struct usb_device *usb); 1323void hfa384x_create(hfa384x_t *hw, struct usb_device *usb);
1324void hfa384x_destroy(hfa384x_t * hw); 1324void hfa384x_destroy(hfa384x_t *hw);
1325 1325
1326int 1326int
1327hfa384x_corereset(hfa384x_t * hw, int holdtime, int settletime, int genesis); 1327hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis);
1328int hfa384x_drvr_commtallies(hfa384x_t * hw); 1328int hfa384x_drvr_commtallies(hfa384x_t *hw);
1329int hfa384x_drvr_disable(hfa384x_t * hw, u16 macport); 1329int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport);
1330int hfa384x_drvr_enable(hfa384x_t * hw, u16 macport); 1330int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport);
1331int hfa384x_drvr_flashdl_enable(hfa384x_t * hw); 1331int hfa384x_drvr_flashdl_enable(hfa384x_t *hw);
1332int hfa384x_drvr_flashdl_disable(hfa384x_t * hw); 1332int hfa384x_drvr_flashdl_disable(hfa384x_t *hw);
1333int hfa384x_drvr_flashdl_write(hfa384x_t * hw, u32 daddr, void *buf, u32 len); 1333int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len);
1334int hfa384x_drvr_getconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len); 1334int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len);
1335int hfa384x_drvr_ramdl_enable(hfa384x_t * hw, u32 exeaddr); 1335int hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr);
1336int hfa384x_drvr_ramdl_disable(hfa384x_t * hw); 1336int hfa384x_drvr_ramdl_disable(hfa384x_t *hw);
1337int hfa384x_drvr_ramdl_write(hfa384x_t * hw, u32 daddr, void *buf, u32 len); 1337int hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len);
1338int hfa384x_drvr_readpda(hfa384x_t * hw, void *buf, unsigned int len); 1338int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len);
1339int hfa384x_drvr_setconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len); 1339int hfa384x_drvr_setconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len);
1340 1340
1341static inline int hfa384x_drvr_getconfig16(hfa384x_t * hw, u16 rid, void *val) 1341static inline int hfa384x_drvr_getconfig16(hfa384x_t *hw, u16 rid, void *val)
1342{ 1342{
1343 int result = 0; 1343 int result = 0;
1344 result = hfa384x_drvr_getconfig(hw, rid, val, sizeof(u16)); 1344 result = hfa384x_drvr_getconfig(hw, rid, val, sizeof(u16));
@@ -1347,44 +1347,44 @@ static inline int hfa384x_drvr_getconfig16(hfa384x_t * hw, u16 rid, void *val)
1347 return result; 1347 return result;
1348} 1348}
1349 1349
1350static inline int hfa384x_drvr_setconfig16(hfa384x_t * hw, u16 rid, u16 val) 1350static inline int hfa384x_drvr_setconfig16(hfa384x_t *hw, u16 rid, u16 val)
1351{ 1351{
1352 u16 value = cpu_to_le16(val); 1352 u16 value = cpu_to_le16(val);
1353 return hfa384x_drvr_setconfig(hw, rid, &value, sizeof(value)); 1353 return hfa384x_drvr_setconfig(hw, rid, &value, sizeof(value));
1354} 1354}
1355 1355
1356int 1356int
1357hfa384x_drvr_getconfig_async(hfa384x_t * hw, 1357hfa384x_drvr_getconfig_async(hfa384x_t *hw,
1358 u16 rid, ctlx_usercb_t usercb, void *usercb_data); 1358 u16 rid, ctlx_usercb_t usercb, void *usercb_data);
1359 1359
1360int 1360int
1361hfa384x_drvr_setconfig_async(hfa384x_t * hw, 1361hfa384x_drvr_setconfig_async(hfa384x_t *hw,
1362 u16 rid, 1362 u16 rid,
1363 void *buf, 1363 void *buf,
1364 u16 len, ctlx_usercb_t usercb, void *usercb_data); 1364 u16 len, ctlx_usercb_t usercb, void *usercb_data);
1365 1365
1366static inline int 1366static inline int
1367hfa384x_drvr_setconfig16_async(hfa384x_t * hw, u16 rid, u16 val) 1367hfa384x_drvr_setconfig16_async(hfa384x_t *hw, u16 rid, u16 val)
1368{ 1368{
1369 u16 value = cpu_to_le16(val); 1369 u16 value = cpu_to_le16(val);
1370 return hfa384x_drvr_setconfig_async(hw, rid, &value, sizeof(value), 1370 return hfa384x_drvr_setconfig_async(hw, rid, &value, sizeof(value),
1371 NULL, NULL); 1371 NULL, NULL);
1372} 1372}
1373 1373
1374int hfa384x_drvr_start(hfa384x_t * hw); 1374int hfa384x_drvr_start(hfa384x_t *hw);
1375int hfa384x_drvr_stop(hfa384x_t * hw); 1375int hfa384x_drvr_stop(hfa384x_t *hw);
1376int 1376int
1377hfa384x_drvr_txframe(hfa384x_t * hw, struct sk_buff *skb, 1377hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb,
1378 p80211_hdr_t * p80211_hdr, p80211_metawep_t * p80211_wep); 1378 p80211_hdr_t *p80211_hdr, p80211_metawep_t *p80211_wep);
1379void hfa384x_tx_timeout(wlandevice_t * wlandev); 1379void hfa384x_tx_timeout(wlandevice_t *wlandev);
1380 1380
1381int hfa384x_cmd_initialize(hfa384x_t * hw); 1381int hfa384x_cmd_initialize(hfa384x_t *hw);
1382int hfa384x_cmd_enable(hfa384x_t * hw, u16 macport); 1382int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport);
1383int hfa384x_cmd_disable(hfa384x_t * hw, u16 macport); 1383int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport);
1384int hfa384x_cmd_allocate(hfa384x_t * hw, u16 len); 1384int hfa384x_cmd_allocate(hfa384x_t *hw, u16 len);
1385int hfa384x_cmd_monitor(hfa384x_t * hw, u16 enable); 1385int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable);
1386int 1386int
1387hfa384x_cmd_download(hfa384x_t * hw, 1387hfa384x_cmd_download(hfa384x_t *hw,
1388 u16 mode, u16 lowaddr, u16 highaddr, u16 codelen); 1388 u16 mode, u16 lowaddr, u16 highaddr, u16 codelen);
1389 1389
1390#endif /* __KERNEL__ */ 1390#endif /* __KERNEL__ */
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index bd2eba30484..612995b3d57 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -126,7 +126,7 @@
126#include <linux/usb.h> 126#include <linux/usb.h>
127#include <linux/byteorder/generic.h> 127#include <linux/byteorder/generic.h>
128 128
129#define SUBMIT_URB(u,f) usb_submit_urb(u,f) 129#define SUBMIT_URB(u, f) usb_submit_urb(u, f)
130 130
131#include "p80211types.h" 131#include "p80211types.h"
132#include "p80211hdr.h" 132#include "p80211hdr.h"
@@ -627,7 +627,7 @@ static hfa384x_usbctlx_t *usbctlx_alloc(void)
627{ 627{
628 hfa384x_usbctlx_t *ctlx; 628 hfa384x_usbctlx_t *ctlx;
629 629
630 ctlx = kmalloc(sizeof(*ctlx), in_interrupt()? GFP_ATOMIC : GFP_KERNEL); 630 ctlx = kmalloc(sizeof(*ctlx), in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
631 if (ctlx != NULL) { 631 if (ctlx != NULL) {
632 memset(ctlx, 0, sizeof(*ctlx)); 632 memset(ctlx, 0, sizeof(*ctlx));
633 init_completion(&ctlx->done); 633 init_completion(&ctlx->done);
@@ -675,7 +675,7 @@ struct usbctlx_cmd_completor {
675}; 675};
676typedef struct usbctlx_cmd_completor usbctlx_cmd_completor_t; 676typedef struct usbctlx_cmd_completor usbctlx_cmd_completor_t;
677 677
678static int usbctlx_cmd_completor_fn(usbctlx_completor_t * head) 678static int usbctlx_cmd_completor_fn(usbctlx_completor_t *head)
679{ 679{
680 usbctlx_cmd_completor_t *complete = (usbctlx_cmd_completor_t *) head; 680 usbctlx_cmd_completor_t *complete = (usbctlx_cmd_completor_t *) head;
681 return usbctlx_get_status(complete->cmdresp, complete->result); 681 return usbctlx_get_status(complete->cmdresp, complete->result);
@@ -3649,7 +3649,7 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev,
3649 /* check for unencrypted stuff if WEP bit set. */ 3649 /* check for unencrypted stuff if WEP bit set. */
3650 if (*(datap - hdrlen + 1) & 0x40) /* wep set */ 3650 if (*(datap - hdrlen + 1) & 0x40) /* wep set */
3651 if ((*(datap) == 0xaa) && (*(datap + 1) == 0xaa)) 3651 if ((*(datap) == 0xaa) && (*(datap + 1) == 0xaa))
3652 *(datap - hdrlen + 1) &= 0xbf; // clear wep; it's the 802.2 header! 3652 *(datap - hdrlen + 1) &= 0xbf; /* clear wep; it's the 802.2 header! */
3653 } 3653 }
3654 3654
3655 if (hw->sniff_fcs) { 3655 if (hw->sniff_fcs) {
diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c
index 5952c671073..99c5ec45b00 100644
--- a/drivers/staging/wlan-ng/p80211conv.c
+++ b/drivers/staging/wlan-ng/p80211conv.c
@@ -206,12 +206,12 @@ int skb_ether_to_p80211(wlandevice_t *wlandev, u32 ethconv,
206 /* XXXX need to pick keynum other than default? */ 206 /* XXXX need to pick keynum other than default? */
207 207
208 p80211_wep->data = kmalloc(skb->len, GFP_ATOMIC); 208 p80211_wep->data = kmalloc(skb->len, GFP_ATOMIC);
209 209 foo = wep_encrypt(wlandev, skb->data, p80211_wep->data,
210 if ((foo = wep_encrypt(wlandev, skb->data, p80211_wep->data, 210 skb->len,
211 skb->len, 211 (wlandev->hostwep &
212 (wlandev->hostwep & 212 HOSTWEP_DEFAULTKEY_MASK),
213 HOSTWEP_DEFAULTKEY_MASK), 213 p80211_wep->iv, p80211_wep->icv);
214 p80211_wep->iv, p80211_wep->icv))) { 214 if (foo) {
215 printk(KERN_WARNING 215 printk(KERN_WARNING
216 "Host en-WEP failed, dropping frame (%d).\n", 216 "Host en-WEP failed, dropping frame (%d).\n",
217 foo); 217 foo);
@@ -323,11 +323,12 @@ int skb_p80211_to_ether(wlandevice_t *wlandev, u32 ethconv,
323 skb->len); 323 skb->len);
324 return 1; 324 return 1;
325 } 325 }
326 if ((foo = wep_decrypt(wlandev, skb->data + payload_offset + 4, 326 foo = wep_decrypt(wlandev, skb->data + payload_offset + 4,
327 payload_length - 8, -1, 327 payload_length - 8, -1,
328 skb->data + payload_offset, 328 skb->data + payload_offset,
329 skb->data + payload_offset + 329 skb->data + payload_offset +
330 payload_length - 4))) { 330 payload_length - 4);
331 if (foo) {
331 /* de-wep failed, drop skb. */ 332 /* de-wep failed, drop skb. */
332 pr_debug("Host de-WEP failed, dropping frame (%d).\n", 333 pr_debug("Host de-WEP failed, dropping frame (%d).\n",
333 foo); 334 foo);
diff --git a/drivers/staging/wlan-ng/p80211conv.h b/drivers/staging/wlan-ng/p80211conv.h
index 0c62df19fa7..6fe163be24f 100644
--- a/drivers/staging/wlan-ng/p80211conv.h
+++ b/drivers/staging/wlan-ng/p80211conv.h
@@ -153,8 +153,8 @@ struct wlandevice;
153int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv, 153int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv,
154 struct sk_buff *skb); 154 struct sk_buff *skb);
155int skb_ether_to_p80211(struct wlandevice *wlandev, u32 ethconv, 155int skb_ether_to_p80211(struct wlandevice *wlandev, u32 ethconv,
156 struct sk_buff *skb, p80211_hdr_t * p80211_hdr, 156 struct sk_buff *skb, p80211_hdr_t *p80211_hdr,
157 p80211_metawep_t * p80211_wep); 157 p80211_metawep_t *p80211_wep);
158 158
159int p80211_stt_findproto(u16 proto); 159int p80211_stt_findproto(u16 proto);
160 160
diff --git a/drivers/staging/wlan-ng/p80211metadef.h b/drivers/staging/wlan-ng/p80211metadef.h
index da8b6f53c74..10605285cf6 100644
--- a/drivers/staging/wlan-ng/p80211metadef.h
+++ b/drivers/staging/wlan-ng/p80211metadef.h
@@ -190,9 +190,9 @@
190 (P80211DID_MKSECTION(2) | \ 190 (P80211DID_MKSECTION(2) | \
191 P80211DID_MKGROUP(1)) 191 P80211DID_MKGROUP(1))
192#define DIDmib_dot11mac_dot11OperationTable_dot11MACAddress \ 192#define DIDmib_dot11mac_dot11OperationTable_dot11MACAddress \
193 (P80211DID_MKSECTION(2) | \ 193 ((P80211DID_MKSECTION(2) | \
194 P80211DID_MKGROUP(1) | \ 194 P80211DID_MKGROUP(1) | \
195 P80211DID_MKITEM(1) | 0x18000000) 195 P80211DID_MKITEM(1) | 0x18000000))
196#define DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold \ 196#define DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold \
197 (P80211DID_MKSECTION(2) | \ 197 (P80211DID_MKSECTION(2) | \
198 P80211DID_MKGROUP(1) | \ 198 P80211DID_MKGROUP(1) | \
@@ -210,18 +210,18 @@
210 P80211DID_MKGROUP(1) | \ 210 P80211DID_MKGROUP(1) | \
211 P80211DID_MKITEM(5) | 0x18000000) 211 P80211DID_MKITEM(5) | 0x18000000)
212#define DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime \ 212#define DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime \
213 (P80211DID_MKSECTION(2) | \ 213 (P80211DID_MKSECTION(2) | \
214 P80211DID_MKGROUP(1) | \ 214 P80211DID_MKGROUP(1) | \
215 P80211DID_MKITEM(6) | 0x10000000) 215 P80211DID_MKITEM(6) | 0x10000000)
216#define DIDmib_cat_dot11phy \ 216#define DIDmib_cat_dot11phy \
217 P80211DID_MKSECTION(3) 217 P80211DID_MKSECTION(3)
218#define DIDmib_dot11phy_dot11PhyOperationTable \ 218#define DIDmib_dot11phy_dot11PhyOperationTable \
219 (P80211DID_MKSECTION(3) | \ 219 (P80211DID_MKSECTION(3) | \
220 P80211DID_MKGROUP(1)) 220 P80211DID_MKGROUP(1))
221#define DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel \ 221#define DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel \
222 (P80211DID_MKSECTION(3) | \ 222 (P80211DID_MKSECTION(3) | \
223 P80211DID_MKGROUP(3) | \ 223 P80211DID_MKGROUP(3) | \
224 P80211DID_MKITEM(10) | 0x18000000) 224 P80211DID_MKITEM(10) | 0x18000000)
225#define DIDmib_dot11phy_dot11PhyDSSSTable \ 225#define DIDmib_dot11phy_dot11PhyDSSSTable \
226 (P80211DID_MKSECTION(3) | \ 226 (P80211DID_MKSECTION(3) | \
227 P80211DID_MKGROUP(5)) 227 P80211DID_MKGROUP(5))
diff --git a/drivers/staging/wlan-ng/p80211mgmt.h b/drivers/staging/wlan-ng/p80211mgmt.h
index 14cdc86d167..deb52f5fd78 100644
--- a/drivers/staging/wlan-ng/p80211mgmt.h
+++ b/drivers/staging/wlan-ng/p80211mgmt.h
@@ -100,7 +100,7 @@
100#ifndef _P80211MGMT_H 100#ifndef _P80211MGMT_H
101#define _P80211MGMT_H 101#define _P80211MGMT_H
102 102
103#ifndef _P80211HDR_H 103#ifndef _P80211HDR_H
104#include "p80211hdr.h" 104#include "p80211hdr.h"
105#endif 105#endif
106 106
@@ -496,25 +496,25 @@ typedef struct wlan_fr_deauthen {
496 496
497} wlan_fr_deauthen_t; 497} wlan_fr_deauthen_t;
498 498
499void wlan_mgmt_encode_beacon(wlan_fr_beacon_t * f); 499void wlan_mgmt_encode_beacon(wlan_fr_beacon_t *f);
500void wlan_mgmt_decode_beacon(wlan_fr_beacon_t * f); 500void wlan_mgmt_decode_beacon(wlan_fr_beacon_t *f);
501void wlan_mgmt_encode_disassoc(wlan_fr_disassoc_t * f); 501void wlan_mgmt_encode_disassoc(wlan_fr_disassoc_t *f);
502void wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t * f); 502void wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t *f);
503void wlan_mgmt_encode_assocreq(wlan_fr_assocreq_t * f); 503void wlan_mgmt_encode_assocreq(wlan_fr_assocreq_t *f);
504void wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t * f); 504void wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t *f);
505void wlan_mgmt_encode_assocresp(wlan_fr_assocresp_t * f); 505void wlan_mgmt_encode_assocresp(wlan_fr_assocresp_t *f);
506void wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t * f); 506void wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t *f);
507void wlan_mgmt_encode_reassocreq(wlan_fr_reassocreq_t * f); 507void wlan_mgmt_encode_reassocreq(wlan_fr_reassocreq_t *f);
508void wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t * f); 508void wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t *f);
509void wlan_mgmt_encode_reassocresp(wlan_fr_reassocresp_t * f); 509void wlan_mgmt_encode_reassocresp(wlan_fr_reassocresp_t *f);
510void wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t * f); 510void wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t *f);
511void wlan_mgmt_encode_probereq(wlan_fr_probereq_t * f); 511void wlan_mgmt_encode_probereq(wlan_fr_probereq_t *f);
512void wlan_mgmt_decode_probereq(wlan_fr_probereq_t * f); 512void wlan_mgmt_decode_probereq(wlan_fr_probereq_t *f);
513void wlan_mgmt_encode_proberesp(wlan_fr_proberesp_t * f); 513void wlan_mgmt_encode_proberesp(wlan_fr_proberesp_t *f);
514void wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t * f); 514void wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t *f);
515void wlan_mgmt_encode_authen(wlan_fr_authen_t * f); 515void wlan_mgmt_encode_authen(wlan_fr_authen_t *f);
516void wlan_mgmt_decode_authen(wlan_fr_authen_t * f); 516void wlan_mgmt_decode_authen(wlan_fr_authen_t *f);
517void wlan_mgmt_encode_deauthen(wlan_fr_deauthen_t * f); 517void wlan_mgmt_encode_deauthen(wlan_fr_deauthen_t *f);
518void wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t * f); 518void wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t *f);
519 519
520#endif /* _P80211MGMT_H */ 520#endif /* _P80211MGMT_H */
diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
index 22424c8903e..763ab1187a1 100644
--- a/drivers/staging/wlan-ng/p80211netdev.c
+++ b/drivers/staging/wlan-ng/p80211netdev.c
@@ -586,7 +586,8 @@ static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
586 } 586 }
587 587
588 /* Allocate a buf of size req->len */ 588 /* Allocate a buf of size req->len */
589 if ((msgbuf = kmalloc(req->len, GFP_KERNEL))) { 589 msgbuf = kmalloc(req->len, GFP_KERNEL);
590 if (msgbuf) {
590 if (copy_from_user(msgbuf, (void __user *)req->data, req->len)) 591 if (copy_from_user(msgbuf, (void __user *)req->data, req->len))
591 result = -EFAULT; 592 result = -EFAULT;
592 else 593 else
@@ -646,7 +647,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
646 647
647 /* Set up some convenience pointers. */ 648 /* Set up some convenience pointers. */
648 mibattr = &dot11req.mibattribute; 649 mibattr = &dot11req.mibattribute;
649 macaddr = (p80211item_pstr6_t *) & mibattr->data; 650 macaddr = (p80211item_pstr6_t *) &mibattr->data;
650 resultcode = &dot11req.resultcode; 651 resultcode = &dot11req.resultcode;
651 652
652 /* Set up a dot11req_mibset */ 653 /* Set up a dot11req_mibset */
@@ -674,7 +675,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
674 resultcode->data = 0; 675 resultcode->data = 0;
675 676
676 /* now fire the request */ 677 /* now fire the request */
677 result = p80211req_dorequest(dev->ml_priv, (u8 *) & dot11req); 678 result = p80211req_dorequest(dev->ml_priv, (u8 *) &dot11req);
678 679
679 /* If the request wasn't successful, report an error and don't 680 /* If the request wasn't successful, report an error and don't
680 * change the netdev address 681 * change the netdev address
diff --git a/drivers/staging/wlan-ng/p80211netdev.h b/drivers/staging/wlan-ng/p80211netdev.h
index 8bd9dfb3b9b..3c8c6480056 100644
--- a/drivers/staging/wlan-ng/p80211netdev.h
+++ b/drivers/staging/wlan-ng/p80211netdev.h
@@ -179,16 +179,16 @@ typedef struct wlandevice {
179 unsigned int ethconv; 179 unsigned int ethconv;
180 180
181 /* device methods (init by MSD, used by p80211 */ 181 /* device methods (init by MSD, used by p80211 */
182 int (*open) (struct wlandevice * wlandev); 182 int (*open) (struct wlandevice *wlandev);
183 int (*close) (struct wlandevice * wlandev); 183 int (*close) (struct wlandevice *wlandev);
184 void (*reset) (struct wlandevice * wlandev); 184 void (*reset) (struct wlandevice *wlandev);
185 int (*txframe) (struct wlandevice * wlandev, struct sk_buff * skb, 185 int (*txframe) (struct wlandevice *wlandev, struct sk_buff *skb,
186 p80211_hdr_t * p80211_hdr, 186 p80211_hdr_t *p80211_hdr,
187 p80211_metawep_t * p80211_wep); 187 p80211_metawep_t *p80211_wep);
188 int (*mlmerequest) (struct wlandevice * wlandev, p80211msg_t * msg); 188 int (*mlmerequest) (struct wlandevice *wlandev, p80211msg_t *msg);
189 int (*set_multicast_list) (struct wlandevice * wlandev, 189 int (*set_multicast_list) (struct wlandevice *wlandev,
190 netdevice_t * dev); 190 netdevice_t *dev);
191 void (*tx_timeout) (struct wlandevice * wlandev); 191 void (*tx_timeout) (struct wlandevice *wlandev);
192 192
193 /* 802.11 State */ 193 /* 802.11 State */
194 u8 bssid[WLAN_BSSID_LEN]; 194 u8 bssid[WLAN_BSSID_LEN];
@@ -227,16 +227,16 @@ typedef struct wlandevice {
227} wlandevice_t; 227} wlandevice_t;
228 228
229/* WEP stuff */ 229/* WEP stuff */
230int wep_change_key(wlandevice_t * wlandev, int keynum, u8 * key, int keylen); 230int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen);
231int wep_decrypt(wlandevice_t * wlandev, u8 * buf, u32 len, int key_override, 231int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override,
232 u8 * iv, u8 * icv); 232 u8 *iv, u8 *icv);
233int wep_encrypt(wlandevice_t * wlandev, u8 * buf, u8 * dst, u32 len, int keynum, 233int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum,
234 u8 * iv, u8 * icv); 234 u8 *iv, u8 *icv);
235 235
236int wlan_setup(wlandevice_t * wlandev); 236int wlan_setup(wlandevice_t *wlandev);
237int wlan_unsetup(wlandevice_t * wlandev); 237int wlan_unsetup(wlandevice_t *wlandev);
238int register_wlandev(wlandevice_t * wlandev); 238int register_wlandev(wlandevice_t *wlandev);
239int unregister_wlandev(wlandevice_t * wlandev); 239int unregister_wlandev(wlandevice_t *wlandev);
240void p80211netdev_rx(wlandevice_t * wlandev, struct sk_buff *skb); 240void p80211netdev_rx(wlandevice_t *wlandev, struct sk_buff *skb);
241void p80211netdev_hwremoved(wlandevice_t * wlandev); 241void p80211netdev_hwremoved(wlandevice_t *wlandev);
242#endif 242#endif
diff --git a/drivers/staging/wlan-ng/p80211req.c b/drivers/staging/wlan-ng/p80211req.c
index c88156cdf68..c2e95f16682 100644
--- a/drivers/staging/wlan-ng/p80211req.c
+++ b/drivers/staging/wlan-ng/p80211req.c
@@ -94,7 +94,7 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev,
94* Potentially blocks the caller, so it's a good idea to 94* Potentially blocks the caller, so it's a good idea to
95* not call this function from an interrupt context. 95* not call this function from an interrupt context.
96----------------------------------------------------------------*/ 96----------------------------------------------------------------*/
97int p80211req_dorequest(wlandevice_t * wlandev, u8 * msgbuf) 97int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf)
98{ 98{
99 int result = 0; 99 int result = 0;
100 p80211msg_t *msg = (p80211msg_t *) msgbuf; 100 p80211msg_t *msg = (p80211msg_t *) msgbuf;
diff --git a/drivers/staging/wlan-ng/p80211req.h b/drivers/staging/wlan-ng/p80211req.h
index 5d9176762ba..a95a45a6814 100644
--- a/drivers/staging/wlan-ng/p80211req.h
+++ b/drivers/staging/wlan-ng/p80211req.h
@@ -48,6 +48,6 @@
48#ifndef _LINUX_P80211REQ_H 48#ifndef _LINUX_P80211REQ_H
49#define _LINUX_P80211REQ_H 49#define _LINUX_P80211REQ_H
50 50
51int p80211req_dorequest(wlandevice_t * wlandev, u8 * msgbuf); 51int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf);
52 52
53#endif 53#endif
diff --git a/drivers/staging/wlan-ng/p80211types.h b/drivers/staging/wlan-ng/p80211types.h
index 2b83ab0c711..41a99c59c6c 100644
--- a/drivers/staging/wlan-ng/p80211types.h
+++ b/drivers/staging/wlan-ng/p80211types.h
@@ -168,12 +168,12 @@
168 P80211DID_MASK_ISTABLE, \ 168 P80211DID_MASK_ISTABLE, \
169 P80211DID_LSB_ISTABLE) 169 P80211DID_LSB_ISTABLE)
170 170
171#define P80211DID_MKID(s,g,i,n,t,a) (P80211DID_MKSECTION(s) | \ 171#define P80211DID_MKID(s, g, i, n, t, a) (P80211DID_MKSECTION(s) | \
172 P80211DID_MKGROUP(g) | \ 172 P80211DID_MKGROUP(g) | \
173 P80211DID_MKITEM(i) | \ 173 P80211DID_MKITEM(i) | \
174 P80211DID_MKINDEX(n) | \ 174 P80211DID_MKINDEX(n) | \
175 P80211DID_MKISTABLE(t) | \ 175 P80211DID_MKISTABLE(t) | \
176 (a)) 176 (a))
177 177
178#define P80211DID_GET(a, m, l) ((((u32)(a)) >> (l)) & (m)) 178#define P80211DID_GET(a, m, l) ((((u32)(a)) >> (l)) & (m))
179 179
@@ -340,11 +340,11 @@ struct catlistitem;
340/* metadata items. Some components may choose to use more, */ 340/* metadata items. Some components may choose to use more, */
341/* less or different metadata items. */ 341/* less or different metadata items. */
342 342
343typedef void (*p80211_totext_t) (struct catlistitem *, u32 did, u8 * itembuf, 343typedef void (*p80211_totext_t) (struct catlistitem *, u32 did, u8 *itembuf,
344 char *textbuf); 344 char *textbuf);
345typedef void (*p80211_fromtext_t) (struct catlistitem *, u32 did, u8 * itembuf, 345typedef void (*p80211_fromtext_t) (struct catlistitem *, u32 did, u8 *itembuf,
346 char *textbuf); 346 char *textbuf);
347typedef u32(*p80211_valid_t) (struct catlistitem *, u32 did, u8 * itembuf); 347typedef u32(*p80211_valid_t) (struct catlistitem *, u32 did, u8 *itembuf);
348 348
349/*----------------------------------------------------------------*/ 349/*----------------------------------------------------------------*/
350/* Enumeration Lists */ 350/* Enumeration Lists */
diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c
index cc4b1ca80d6..9fb9532c72a 100644
--- a/drivers/staging/wlan-ng/p80211wext.c
+++ b/drivers/staging/wlan-ng/p80211wext.c
@@ -138,7 +138,7 @@ static int p80211wext_dorequest(wlandevice_t *wlandev, u32 did, u32 data)
138 mibitem.did = did; 138 mibitem.did = did;
139 mibitem.data = data; 139 mibitem.data = data;
140 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 140 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
141 result = p80211req_dorequest(wlandev, (u8 *) & msg); 141 result = p80211req_dorequest(wlandev, (u8 *) &msg);
142 142
143 return result; 143 return result;
144} 144}
@@ -175,7 +175,7 @@ static int p80211wext_autojoin(wlandevice_t *wlandev)
175 memcpy(msg.ssid.data.data, ssid, data.length); 175 memcpy(msg.ssid.data.data, ssid, data.length);
176 msg.ssid.data.len = data.length; 176 msg.ssid.data.len = data.length;
177 177
178 result = p80211req_dorequest(wlandev, (u8 *) & msg); 178 result = p80211req_dorequest(wlandev, (u8 *) &msg);
179 179
180 if (result) { 180 if (result) {
181 err = -EFAULT; 181 err = -EFAULT;
@@ -212,7 +212,7 @@ struct iw_statistics *p80211wext_get_wireless_stats(netdevice_t *dev)
212 if (wlandev->mlmerequest == NULL) 212 if (wlandev->mlmerequest == NULL)
213 return NULL; 213 return NULL;
214 214
215 retval = wlandev->mlmerequest(wlandev, (p80211msg_t *) & quality); 215 retval = wlandev->mlmerequest(wlandev, (p80211msg_t *) &quality);
216 216
217 wstats->qual.qual = qual_as_percent(quality.link.data); /* overall link quality */ 217 wstats->qual.qual = qual_as_percent(quality.link.data); /* overall link quality */
218 wstats->qual.level = quality.level.data; /* instant signal level */ 218 wstats->qual.level = quality.level.data; /* instant signal level */
@@ -273,7 +273,7 @@ static int p80211wext_giwfreq(netdevice_t *dev,
273 memset(&mibitem, 0, sizeof(mibitem)); 273 memset(&mibitem, 0, sizeof(mibitem));
274 mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel; 274 mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel;
275 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 275 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
276 result = p80211req_dorequest(wlandev, (u8 *) & msg); 276 result = p80211req_dorequest(wlandev, (u8 *) &msg);
277 277
278 if (result) { 278 if (result) {
279 err = -EFAULT; 279 err = -EFAULT;
@@ -321,7 +321,7 @@ static int p80211wext_siwfreq(netdevice_t *dev,
321 mibitem.data = p80211_mhz_to_channel(freq->m); 321 mibitem.data = p80211_mhz_to_channel(freq->m);
322 322
323 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 323 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
324 result = p80211req_dorequest(wlandev, (u8 *) & msg); 324 result = p80211req_dorequest(wlandev, (u8 *) &msg);
325 325
326 if (result) { 326 if (result) {
327 err = -EFAULT; 327 err = -EFAULT;
@@ -403,7 +403,7 @@ static int p80211wext_siwmode(netdevice_t *dev,
403 mibitem.did = DIDmib_p2_p2Static_p2CnfPortType; 403 mibitem.did = DIDmib_p2_p2Static_p2CnfPortType;
404 mibitem.data = (*mode == IW_MODE_ADHOC) ? 0 : 1; 404 mibitem.data = (*mode == IW_MODE_ADHOC) ? 0 : 1;
405 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 405 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
406 result = p80211req_dorequest(wlandev, (u8 *) & msg); 406 result = p80211req_dorequest(wlandev, (u8 *) &msg);
407 407
408 if (result) 408 if (result)
409 err = -EFAULT; 409 err = -EFAULT;
@@ -553,7 +553,8 @@ static int p80211wext_siwencode(netdevice_t *dev,
553 } 553 }
554 554
555 /* Check the Key index first. */ 555 /* Check the Key index first. */
556 if ((i = (erq->flags & IW_ENCODE_INDEX))) { 556 i = (erq->flags & IW_ENCODE_INDEX);
557 if (i) {
557 558
558 if ((i < 1) || (i > NUM_WEPKEYS)) { 559 if ((i < 1) || (i > NUM_WEPKEYS)) {
559 err = -EINVAL; 560 err = -EINVAL;
@@ -625,7 +626,7 @@ static int p80211wext_siwencode(netdevice_t *dev,
625 626
626 msg.msgcode = DIDmsg_dot11req_mibset; 627 msg.msgcode = DIDmsg_dot11req_mibset;
627 memcpy(&msg.mibattribute.data, &pstr, sizeof(pstr)); 628 memcpy(&msg.mibattribute.data, &pstr, sizeof(pstr));
628 result = p80211req_dorequest(wlandev, (u8 *) & msg); 629 result = p80211req_dorequest(wlandev, (u8 *) &msg);
629 630
630 if (result) { 631 if (result) {
631 err = -EFAULT; 632 err = -EFAULT;
@@ -733,7 +734,7 @@ static int p80211wext_siwessid(netdevice_t *dev,
733 msg.ssid.data.len = length; 734 msg.ssid.data.len = length;
734 735
735 pr_debug("autojoin_ssid for %s \n", essid); 736 pr_debug("autojoin_ssid for %s \n", essid);
736 result = p80211req_dorequest(wlandev, (u8 *) & msg); 737 result = p80211req_dorequest(wlandev, (u8 *) &msg);
737 pr_debug("autojoin_ssid %d\n", result); 738 pr_debug("autojoin_ssid %d\n", result);
738 739
739 if (result) { 740 if (result) {
@@ -778,7 +779,7 @@ static int p80211wext_giwrate(netdevice_t *dev,
778 memset(&mibitem, 0, sizeof(mibitem)); 779 memset(&mibitem, 0, sizeof(mibitem));
779 mibitem.did = DIDmib_p2_p2MAC_p2CurrentTxRate; 780 mibitem.did = DIDmib_p2_p2MAC_p2CurrentTxRate;
780 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 781 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
781 result = p80211req_dorequest(wlandev, (u8 *) & msg); 782 result = p80211req_dorequest(wlandev, (u8 *) &msg);
782 783
783 if (result) { 784 if (result) {
784 err = -EFAULT; 785 err = -EFAULT;
@@ -830,7 +831,7 @@ static int p80211wext_giwrts(netdevice_t *dev,
830 memset(&mibitem, 0, sizeof(mibitem)); 831 memset(&mibitem, 0, sizeof(mibitem));
831 mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold; 832 mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold;
832 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 833 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
833 result = p80211req_dorequest(wlandev, (u8 *) & msg); 834 result = p80211req_dorequest(wlandev, (u8 *) &msg);
834 835
835 if (result) { 836 if (result) {
836 err = -EFAULT; 837 err = -EFAULT;
@@ -871,7 +872,7 @@ static int p80211wext_siwrts(netdevice_t *dev,
871 mibitem.data = rts->value; 872 mibitem.data = rts->value;
872 873
873 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 874 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
874 result = p80211req_dorequest(wlandev, (u8 *) & msg); 875 result = p80211req_dorequest(wlandev, (u8 *) &msg);
875 876
876 if (result) { 877 if (result) {
877 err = -EFAULT; 878 err = -EFAULT;
@@ -897,7 +898,7 @@ static int p80211wext_giwfrag(netdevice_t *dev,
897 mibitem.did = 898 mibitem.did =
898 DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold; 899 DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold;
899 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 900 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
900 result = p80211req_dorequest(wlandev, (u8 *) & msg); 901 result = p80211req_dorequest(wlandev, (u8 *) &msg);
901 902
902 if (result) { 903 if (result) {
903 err = -EFAULT; 904 err = -EFAULT;
@@ -940,7 +941,7 @@ static int p80211wext_siwfrag(netdevice_t *dev,
940 mibitem.data = frag->value; 941 mibitem.data = frag->value;
941 942
942 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 943 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
943 result = p80211req_dorequest(wlandev, (u8 *) & msg); 944 result = p80211req_dorequest(wlandev, (u8 *) &msg);
944 945
945 if (result) { 946 if (result) {
946 err = -EFAULT; 947 err = -EFAULT;
@@ -975,7 +976,7 @@ static int p80211wext_giwretry(netdevice_t *dev,
975 mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit; 976 mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit;
976 977
977 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 978 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
978 result = p80211req_dorequest(wlandev, (u8 *) & msg); 979 result = p80211req_dorequest(wlandev, (u8 *) &msg);
979 980
980 if (result) { 981 if (result) {
981 err = -EFAULT; 982 err = -EFAULT;
@@ -989,7 +990,7 @@ static int p80211wext_giwretry(netdevice_t *dev,
989 mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit; 990 mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit;
990 991
991 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 992 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
992 result = p80211req_dorequest(wlandev, (u8 *) & msg); 993 result = p80211req_dorequest(wlandev, (u8 *) &msg);
993 994
994 if (result) { 995 if (result) {
995 err = -EFAULT; 996 err = -EFAULT;
@@ -1004,7 +1005,7 @@ static int p80211wext_giwretry(netdevice_t *dev,
1004 DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime; 1005 DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime;
1005 1006
1006 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 1007 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
1007 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1008 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1008 1009
1009 if (result) { 1010 if (result) {
1010 err = -EFAULT; 1011 err = -EFAULT;
@@ -1067,7 +1068,7 @@ static int p80211wext_siwretry(netdevice_t *dev,
1067 mibitem.data = rrq->value /= 1024; 1068 mibitem.data = rrq->value /= 1024;
1068 1069
1069 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 1070 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
1070 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1071 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1071 1072
1072 if (result) { 1073 if (result) {
1073 err = -EFAULT; 1074 err = -EFAULT;
@@ -1081,7 +1082,7 @@ static int p80211wext_siwretry(netdevice_t *dev,
1081 1082
1082 memcpy(&msg.mibattribute.data, &mibitem, 1083 memcpy(&msg.mibattribute.data, &mibitem,
1083 sizeof(mibitem)); 1084 sizeof(mibitem));
1084 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1085 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1085 1086
1086 if (result) { 1087 if (result) {
1087 err = -EFAULT; 1088 err = -EFAULT;
@@ -1096,7 +1097,7 @@ static int p80211wext_siwretry(netdevice_t *dev,
1096 1097
1097 memcpy(&msg.mibattribute.data, &mibitem, 1098 memcpy(&msg.mibattribute.data, &mibitem,
1098 sizeof(mibitem)); 1099 sizeof(mibitem));
1099 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1100 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1100 1101
1101 if (result) { 1102 if (result) {
1102 err = -EFAULT; 1103 err = -EFAULT;
@@ -1134,7 +1135,7 @@ static int p80211wext_siwtxpow(netdevice_t *dev,
1134 else 1135 else
1135 mibitem.data = rrq->value; 1136 mibitem.data = rrq->value;
1136 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 1137 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
1137 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1138 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1138 1139
1139 if (result) { 1140 if (result) {
1140 err = -EFAULT; 1141 err = -EFAULT;
@@ -1162,7 +1163,7 @@ static int p80211wext_giwtxpow(netdevice_t *dev,
1162 DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel; 1163 DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel;
1163 1164
1164 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 1165 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
1165 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1166 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1166 1167
1167 if (result) { 1168 if (result) {
1168 err = -EFAULT; 1169 err = -EFAULT;
@@ -1310,7 +1311,7 @@ static int p80211wext_siwscan(netdevice_t *dev,
1310 msg.maxchanneltime.data = 250; 1311 msg.maxchanneltime.data = 250;
1311 msg.minchanneltime.data = 200; 1312 msg.minchanneltime.data = 200;
1312 1313
1313 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1314 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1314 if (result) 1315 if (result)
1315 err = prism2_result2err(msg.resultcode.data); 1316 err = prism2_result2err(msg.resultcode.data);
1316 1317
@@ -1429,7 +1430,7 @@ static int p80211wext_giwscan(netdevice_t *dev,
1429 msg.msgcode = DIDmsg_dot11req_scan_results; 1430 msg.msgcode = DIDmsg_dot11req_scan_results;
1430 msg.bssindex.data = i; 1431 msg.bssindex.data = i;
1431 1432
1432 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1433 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1433 if ((result != 0) || 1434 if ((result != 0) ||
1434 (msg.resultcode.data != P80211ENUM_resultcode_success)) { 1435 (msg.resultcode.data != P80211ENUM_resultcode_success)) {
1435 break; 1436 break;
@@ -1504,7 +1505,7 @@ static int p80211wext_set_encodeext(struct net_device *dev,
1504 memcpy(wlandev->wep_keys[idx], ext->key, ext->key_len); 1505 memcpy(wlandev->wep_keys[idx], ext->key, ext->key_len);
1505 1506
1506 memset(&msg, 0, sizeof(msg)); 1507 memset(&msg, 0, sizeof(msg));
1507 pstr = (p80211item_pstr32_t *) & msg.mibattribute.data; 1508 pstr = (p80211item_pstr32_t *) &msg.mibattribute.data;
1508 memcpy(pstr->data.data, ext->key, ext->key_len); 1509 memcpy(pstr->data.data, ext->key, ext->key_len);
1509 pstr->data.len = ext->key_len; 1510 pstr->data.len = ext->key_len;
1510 switch (idx) { 1511 switch (idx) {
@@ -1528,7 +1529,7 @@ static int p80211wext_set_encodeext(struct net_device *dev,
1528 break; 1529 break;
1529 } 1530 }
1530 msg.msgcode = DIDmsg_dot11req_mibset; 1531 msg.msgcode = DIDmsg_dot11req_mibset;
1531 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1532 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1532 pr_debug("result (%d)\n", result); 1533 pr_debug("result (%d)\n", result);
1533 } 1534 }
1534 return result; 1535 return result;
@@ -1748,7 +1749,7 @@ struct iw_handler_def p80211wext_handler_def = {
1748 .get_wireless_stats = p80211wext_get_wireless_stats 1749 .get_wireless_stats = p80211wext_get_wireless_stats
1749}; 1750};
1750 1751
1751int p80211wext_event_associated(wlandevice_t * wlandev, int assoc) 1752int p80211wext_event_associated(wlandevice_t *wlandev, int assoc)
1752{ 1753{
1753 union iwreq_data data; 1754 union iwreq_data data;
1754 1755
diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c
index 5e95c482fb7..baa20a7c930 100644
--- a/drivers/staging/wlan-ng/prism2fw.c
+++ b/drivers/staging/wlan-ng/prism2fw.c
@@ -265,7 +265,7 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)
265 /* Build the PDA we're going to use. */ 265 /* Build the PDA we're going to use. */
266 if (read_cardpda(&pda, wlandev)) { 266 if (read_cardpda(&pda, wlandev)) {
267 printk(KERN_ERR "load_cardpda failed, exiting.\n"); 267 printk(KERN_ERR "load_cardpda failed, exiting.\n");
268 return (1); 268 return 1;
269 } 269 }
270 270
271 /* read the card's PRI-SUP */ 271 /* read the card's PRI-SUP */
@@ -287,9 +287,8 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)
287 287
288 /* DIDmsg_dot11req_mibget */ 288 /* DIDmsg_dot11req_mibget */
289 prism2mgmt_mibset_mibget(wlandev, &getmsg); 289 prism2mgmt_mibset_mibget(wlandev, &getmsg);
290 if (getmsg.resultcode.data != P80211ENUM_resultcode_success) { 290 if (getmsg.resultcode.data != P80211ENUM_resultcode_success)
291 printk(KERN_ERR "Couldn't fetch PRI-SUP info\n"); 291 printk(KERN_ERR "Couldn't fetch PRI-SUP info\n");
292 }
293 292
294 /* Already in host order */ 293 /* Already in host order */
295 priid.role = *data++; 294 priid.role = *data++;
@@ -302,19 +301,19 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)
302 result = read_fwfile(rfptr); 301 result = read_fwfile(rfptr);
303 if (result) { 302 if (result) {
304 printk(KERN_ERR "Failed to read the data exiting.\n"); 303 printk(KERN_ERR "Failed to read the data exiting.\n");
305 return (1); 304 return 1;
306 } 305 }
307 306
308 result = validate_identity(); 307 result = validate_identity();
309 308
310 if (result) { 309 if (result) {
311 printk(KERN_ERR "Incompatible firmware image.\n"); 310 printk(KERN_ERR "Incompatible firmware image.\n");
312 return (1); 311 return 1;
313 } 312 }
314 313
315 if (startaddr == 0x00000000) { 314 if (startaddr == 0x00000000) {
316 printk(KERN_ERR "Can't RAM download a Flash image!\n"); 315 printk(KERN_ERR "Can't RAM download a Flash image!\n");
317 return (1); 316 return 1;
318 } 317 }
319 318
320 /* Make the image chunks */ 319 /* Make the image chunks */
@@ -324,20 +323,20 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)
324 result = plugimage(fchunk, nfchunks, s3plug, ns3plug, &pda); 323 result = plugimage(fchunk, nfchunks, s3plug, ns3plug, &pda);
325 if (result) { 324 if (result) {
326 printk(KERN_ERR "Failed to plug data.\n"); 325 printk(KERN_ERR "Failed to plug data.\n");
327 return (1); 326 return 1;
328 } 327 }
329 328
330 /* Insert any CRCs */ 329 /* Insert any CRCs */
331 if (crcimage(fchunk, nfchunks, s3crc, ns3crc)) { 330 if (crcimage(fchunk, nfchunks, s3crc, ns3crc)) {
332 printk(KERN_ERR "Failed to insert all CRCs\n"); 331 printk(KERN_ERR "Failed to insert all CRCs\n");
333 return (1); 332 return 1;
334 } 333 }
335 334
336 /* Write the image */ 335 /* Write the image */
337 result = writeimage(wlandev, fchunk, nfchunks); 336 result = writeimage(wlandev, fchunk, nfchunks);
338 if (result) { 337 if (result) {
339 printk(KERN_ERR "Failed to ramwrite image data.\n"); 338 printk(KERN_ERR "Failed to ramwrite image data.\n");
340 return (1); 339 return 1;
341 } 340 }
342 341
343 /* clear any allocated memory */ 342 /* clear any allocated memory */
@@ -435,9 +434,8 @@ void free_chunks(imgchunk_t *fchunk, unsigned int *nfchunks)
435{ 434{
436 int i; 435 int i;
437 for (i = 0; i < *nfchunks; i++) { 436 for (i = 0; i < *nfchunks; i++) {
438 if (fchunk[i].data != NULL) { 437 if (fchunk[i].data != NULL)
439 kfree(fchunk[i].data); 438 kfree(fchunk[i].data);
440 }
441 } 439 }
442 *nfchunks = 0; 440 *nfchunks = 0;
443 memset(fchunk, 0, sizeof(*fchunk)); 441 memset(fchunk, 0, sizeof(*fchunk));
@@ -532,7 +530,7 @@ int mkimage(imgchunk_t *clist, unsigned int *ccnt)
532 if (clist[i].data == NULL) { 530 if (clist[i].data == NULL) {
533 printk(KERN_ERR 531 printk(KERN_ERR
534 "failed to allocate image space, exitting.\n"); 532 "failed to allocate image space, exitting.\n");
535 return (1); 533 return 1;
536 } 534 }
537 memset(clist[i].data, 0, clist[i].len); 535 memset(clist[i].data, 0, clist[i].len);
538 pr_debug("chunk[%d]: addr=0x%06x len=%d\n", 536 pr_debug("chunk[%d]: addr=0x%06x len=%d\n",
@@ -546,15 +544,14 @@ int mkimage(imgchunk_t *clist, unsigned int *ccnt)
546 for (j = 0; j < *ccnt; j++) { 544 for (j = 0; j < *ccnt; j++) {
547 cstart = clist[j].addr; 545 cstart = clist[j].addr;
548 cend = cstart + clist[j].len - 1; 546 cend = cstart + clist[j].len - 1;
549 if (s3start >= cstart && s3end <= cend) { 547 if (s3start >= cstart && s3end <= cend)
550 break; 548 break;
551 }
552 } 549 }
553 if (((unsigned int)j) >= (*ccnt)) { 550 if (((unsigned int)j) >= (*ccnt)) {
554 printk(KERN_ERR 551 printk(KERN_ERR
555 "s3rec(a=0x%06x,l=%d), no chunk match, exiting.\n", 552 "s3rec(a=0x%06x,l=%d), no chunk match, exiting.\n",
556 s3start, s3data[i].len); 553 s3start, s3data[i].len);
557 return (1); 554 return 1;
558 } 555 }
559 coffset = s3start - cstart; 556 coffset = s3start - cstart;
560 memcpy(clist[j].data + coffset, s3data[i].data, s3data[i].len); 557 memcpy(clist[j].data + coffset, s3data[i].data, s3data[i].len);
@@ -587,7 +584,7 @@ int mkpdrlist(pda_t *pda)
587 curroff = 0; 584 curroff = 0;
588 while (curroff < (HFA384x_PDA_LEN_MAX / 2) && 585 while (curroff < (HFA384x_PDA_LEN_MAX / 2) &&
589 le16_to_cpu(pda16[curroff + 1]) != HFA384x_PDR_END_OF_PDA) { 586 le16_to_cpu(pda16[curroff + 1]) != HFA384x_PDR_END_OF_PDA) {
590 pda->rec[pda->nrec] = (hfa384x_pdrec_t *) & (pda16[curroff]); 587 pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]);
591 588
592 if (le16_to_cpu(pda->rec[pda->nrec]->code) == HFA384x_PDR_NICID) { 589 if (le16_to_cpu(pda->rec[pda->nrec]->code) == HFA384x_PDR_NICID) {
593 memcpy(&nicid, &pda->rec[pda->nrec]->data.nicid, 590 memcpy(&nicid, &pda->rec[pda->nrec]->data.nicid,
@@ -624,10 +621,10 @@ int mkpdrlist(pda_t *pda)
624 printk(KERN_ERR 621 printk(KERN_ERR
625 "no end record found or invalid lengths in " 622 "no end record found or invalid lengths in "
626 "PDR data, exiting. %x %d\n", curroff, pda->nrec); 623 "PDR data, exiting. %x %d\n", curroff, pda->nrec);
627 return (1); 624 return 1;
628 } 625 }
629 if (le16_to_cpu(pda16[curroff + 1]) == HFA384x_PDR_END_OF_PDA) { 626 if (le16_to_cpu(pda16[curroff + 1]) == HFA384x_PDR_END_OF_PDA) {
630 pda->rec[pda->nrec] = (hfa384x_pdrec_t *) & (pda16[curroff]); 627 pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]);
631 (pda->nrec)++; 628 (pda->nrec)++;
632 } 629 }
633 return result; 630 return result;
@@ -870,7 +867,7 @@ int read_fwfile(const struct ihex_binrec *record)
870 ptr16 = (u16 *) record->data; 867 ptr16 = (u16 *) record->data;
871 868
872 /* parse what was an S3 srec and put it in the right array */ 869 /* parse what was an S3 srec and put it in the right array */
873 switch(addr) { 870 switch (addr) {
874 case S3ADDR_START: 871 case S3ADDR_START:
875 startaddr = *ptr32; 872 startaddr = *ptr32;
876 pr_debug(" S7 start addr, record=%d " 873 pr_debug(" S7 start addr, record=%d "
@@ -891,7 +888,7 @@ int read_fwfile(const struct ihex_binrec *record)
891 s3plug[ns3plug].len); 888 s3plug[ns3plug].len);
892 889
893 ns3plug++; 890 ns3plug++;
894 if ( ns3plug == S3PLUG_MAX ) { 891 if (ns3plug == S3PLUG_MAX) {
895 printk(KERN_ERR "S3 plugrec limit reached - aborting\n"); 892 printk(KERN_ERR "S3 plugrec limit reached - aborting\n");
896 return 1; 893 return 1;
897 } 894 }
@@ -908,7 +905,7 @@ int read_fwfile(const struct ihex_binrec *record)
908 s3crc[ns3crc].len, 905 s3crc[ns3crc].len,
909 s3crc[ns3crc].dowrite); 906 s3crc[ns3crc].dowrite);
910 ns3crc++; 907 ns3crc++;
911 if ( ns3crc == S3CRC_MAX ) { 908 if (ns3crc == S3CRC_MAX) {
912 printk(KERN_ERR "S3 crcrec limit reached - aborting\n"); 909 printk(KERN_ERR "S3 crcrec limit reached - aborting\n");
913 return 1; 910 return 1;
914 } 911 }
@@ -922,12 +919,12 @@ int read_fwfile(const struct ihex_binrec *record)
922 rcnt, 919 rcnt,
923 s3info[ns3info].len, 920 s3info[ns3info].len,
924 s3info[ns3info].type); 921 s3info[ns3info].type);
925 if ( ((s3info[ns3info].len - 1) * sizeof(u16)) > sizeof(s3info[ns3info].info) ) { 922 if (((s3info[ns3info].len - 1) * sizeof(u16)) > sizeof(s3info[ns3info].info)) {
926 printk(KERN_ERR " S3 inforec length too long - aborting\n"); 923 printk(KERN_ERR " S3 inforec length too long - aborting\n");
927 return 1; 924 return 1;
928 } 925 }
929 926
930 tmpinfo = (u16*)&(s3info[ns3info].info.version); 927 tmpinfo = (u16 *)&(s3info[ns3info].info.version);
931 pr_debug(" info="); 928 pr_debug(" info=");
932 for (i = 0; i < s3info[ns3info].len - 1; i++) { 929 for (i = 0; i < s3info[ns3info].len - 1; i++) {
933 tmpinfo[i] = *(ptr16 + 2 + i); 930 tmpinfo[i] = *(ptr16 + 2 + i);
@@ -936,7 +933,7 @@ int read_fwfile(const struct ihex_binrec *record)
936 pr_debug("\n"); 933 pr_debug("\n");
937 934
938 ns3info++; 935 ns3info++;
939 if ( ns3info == S3INFO_MAX ) { 936 if (ns3info == S3INFO_MAX) {
940 printk(KERN_ERR "S3 inforec limit reached - aborting\n"); 937 printk(KERN_ERR "S3 inforec limit reached - aborting\n");
941 return 1; 938 return 1;
942 } 939 }
@@ -946,7 +943,7 @@ int read_fwfile(const struct ihex_binrec *record)
946 s3data[ns3data].len = len; 943 s3data[ns3data].len = len;
947 s3data[ns3data].data = (uint8_t *) record->data; 944 s3data[ns3data].data = (uint8_t *) record->data;
948 ns3data++; 945 ns3data++;
949 if ( ns3data == S3DATA_MAX ) { 946 if (ns3data == S3DATA_MAX) {
950 printk(KERN_ERR "S3 datarec limit reached - aborting\n"); 947 printk(KERN_ERR "S3 datarec limit reached - aborting\n");
951 return 1; 948 return 1;
952 } 949 }
@@ -1024,7 +1021,7 @@ int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk,
1024 rstatemsg.enable.data = P80211ENUM_truth_true; 1021 rstatemsg.enable.data = P80211ENUM_truth_true;
1025 rstatemsg.exeaddr.data = startaddr; 1022 rstatemsg.exeaddr.data = startaddr;
1026 1023
1027 msgp = (p80211msg_t *) & rstatemsg; 1024 msgp = (p80211msg_t *) &rstatemsg;
1028 result = prism2mgmt_ramdl_state(wlandev, msgp); 1025 result = prism2mgmt_ramdl_state(wlandev, msgp);
1029 if (result) { 1026 if (result) {
1030 printk(KERN_ERR 1027 printk(KERN_ERR
@@ -1064,7 +1061,7 @@ int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk,
1064 ("Sending xxxdl_write message addr=%06x len=%d.\n", 1061 ("Sending xxxdl_write message addr=%06x len=%d.\n",
1065 currdaddr, currlen); 1062 currdaddr, currlen);
1066 1063
1067 msgp = (p80211msg_t *) & rwritemsg; 1064 msgp = (p80211msg_t *) &rwritemsg;
1068 result = prism2mgmt_ramdl_write(wlandev, msgp); 1065 result = prism2mgmt_ramdl_write(wlandev, msgp);
1069 1066
1070 /* Check the results */ 1067 /* Check the results */
@@ -1091,7 +1088,7 @@ int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk,
1091 rstatemsg.enable.data = P80211ENUM_truth_false; 1088 rstatemsg.enable.data = P80211ENUM_truth_false;
1092 rstatemsg.exeaddr.data = 0; 1089 rstatemsg.exeaddr.data = 0;
1093 1090
1094 msgp = (p80211msg_t *) & rstatemsg; 1091 msgp = (p80211msg_t *) &rstatemsg;
1095 result = prism2mgmt_ramdl_state(wlandev, msgp); 1092 result = prism2mgmt_ramdl_state(wlandev, msgp);
1096 if (result) { 1093 if (result) {
1097 printk(KERN_ERR 1094 printk(KERN_ERR
@@ -1162,7 +1159,7 @@ int validate_identity(void)
1162 /* SEC compat range */ 1159 /* SEC compat range */
1163 if ((s3info[i].info.compat.role == 1) && 1160 if ((s3info[i].info.compat.role == 1) &&
1164 (s3info[i].info.compat.id == 4)) { 1161 (s3info[i].info.compat.id == 4)) {
1165 1162 /* FIXME: isn't something missing here? */
1166 } 1163 }
1167 1164
1168 break; 1165 break;
@@ -1197,8 +1194,9 @@ int validate_identity(void)
1197 pr_debug("Unknown inforec type %d\n", s3info[i].type); 1194 pr_debug("Unknown inforec type %d\n", s3info[i].type);
1198 } 1195 }
1199 } 1196 }
1200 // walk through 1197 /* walk through */
1201 1198
1202 if (trump && (result != 2)) result = 0; 1199 if (trump && (result != 2))
1200 result = 0;
1203 return result; 1201 return result;
1204} 1202}
diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c
index 9f7d96cae8e..eb7469eaf4b 100644
--- a/drivers/staging/wlan-ng/prism2mgmt.c
+++ b/drivers/staging/wlan-ng/prism2mgmt.c
@@ -541,7 +541,7 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
541 /*** STATION ***/ 541 /*** STATION ***/
542 /* Set the REQUIRED config items */ 542 /* Set the REQUIRED config items */
543 /* SSID */ 543 /* SSID */
544 pstr = (p80211pstrd_t *) & (msg->ssid.data); 544 pstr = (p80211pstrd_t *) &(msg->ssid.data);
545 prism2mgmt_pstr2bytestr(p2bytestr, pstr); 545 prism2mgmt_pstr2bytestr(p2bytestr, pstr);
546 result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID, 546 result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID,
547 bytebuf, HFA384x_RID_CNFOWNSSID_LEN); 547 bytebuf, HFA384x_RID_CNFOWNSSID_LEN);
@@ -1034,7 +1034,7 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp)
1034 1034
1035 /* Set the ssid */ 1035 /* Set the ssid */
1036 memset(bytebuf, 0, 256); 1036 memset(bytebuf, 0, 256);
1037 pstr = (p80211pstrd_t *) & (msg->ssid.data); 1037 pstr = (p80211pstrd_t *) &(msg->ssid.data);
1038 prism2mgmt_pstr2bytestr(p2bytestr, pstr); 1038 prism2mgmt_pstr2bytestr(p2bytestr, pstr);
1039 result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID, 1039 result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID,
1040 bytebuf, 1040 bytebuf,
diff --git a/drivers/staging/wlan-ng/prism2mgmt.h b/drivers/staging/wlan-ng/prism2mgmt.h
index bdf2b3e0325..07eecebeb6c 100644
--- a/drivers/staging/wlan-ng/prism2mgmt.h
+++ b/drivers/staging/wlan-ng/prism2mgmt.h
@@ -63,43 +63,43 @@
63extern int prism2_reset_holdtime; 63extern int prism2_reset_holdtime;
64extern int prism2_reset_settletime; 64extern int prism2_reset_settletime;
65 65
66u32 prism2sta_ifstate(wlandevice_t * wlandev, u32 ifstate); 66u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate);
67 67
68void prism2sta_ev_info(wlandevice_t * wlandev, hfa384x_InfFrame_t * inf); 68void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf);
69void prism2sta_ev_txexc(wlandevice_t * wlandev, u16 status); 69void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status);
70void prism2sta_ev_tx(wlandevice_t * wlandev, u16 status); 70void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status);
71void prism2sta_ev_rx(wlandevice_t * wlandev, struct sk_buff *skb); 71void prism2sta_ev_rx(wlandevice_t *wlandev, struct sk_buff *skb);
72void prism2sta_ev_alloc(wlandevice_t * wlandev); 72void prism2sta_ev_alloc(wlandevice_t *wlandev);
73 73
74int prism2mgmt_mibset_mibget(wlandevice_t * wlandev, void *msgp); 74int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp);
75int prism2mgmt_scan(wlandevice_t * wlandev, void *msgp); 75int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp);
76int prism2mgmt_scan_results(wlandevice_t * wlandev, void *msgp); 76int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp);
77int prism2mgmt_start(wlandevice_t * wlandev, void *msgp); 77int prism2mgmt_start(wlandevice_t *wlandev, void *msgp);
78int prism2mgmt_wlansniff(wlandevice_t * wlandev, void *msgp); 78int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp);
79int prism2mgmt_readpda(wlandevice_t * wlandev, void *msgp); 79int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp);
80int prism2mgmt_ramdl_state(wlandevice_t * wlandev, void *msgp); 80int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp);
81int prism2mgmt_ramdl_write(wlandevice_t * wlandev, void *msgp); 81int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp);
82int prism2mgmt_flashdl_state(wlandevice_t * wlandev, void *msgp); 82int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp);
83int prism2mgmt_flashdl_write(wlandevice_t * wlandev, void *msgp); 83int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp);
84int prism2mgmt_autojoin(wlandevice_t * wlandev, void *msgp); 84int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp);
85 85
86/*--------------------------------------------------------------- 86/*---------------------------------------------------------------
87* conversion functions going between wlan message data types and 87* conversion functions going between wlan message data types and
88* Prism2 data types 88* Prism2 data types
89---------------------------------------------------------------*/ 89---------------------------------------------------------------*/
90/* byte area conversion functions*/ 90/* byte area conversion functions*/
91void prism2mgmt_pstr2bytearea(u8 * bytearea, p80211pstrd_t * pstr); 91void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr);
92void prism2mgmt_bytearea2pstr(u8 * bytearea, p80211pstrd_t * pstr, int len); 92void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len);
93 93
94/* byte string conversion functions*/ 94/* byte string conversion functions*/
95void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr); 95void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr);
96void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr); 96void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr);
97 97
98/* functions to convert Group Addresses */ 98/* functions to convert Group Addresses */
99void prism2mgmt_get_grpaddr(u32 did, p80211pstrd_t * pstr, hfa384x_t * priv); 99void prism2mgmt_get_grpaddr(u32 did, p80211pstrd_t *pstr, hfa384x_t *priv);
100int prism2mgmt_set_grpaddr(u32 did, 100int prism2mgmt_set_grpaddr(u32 did,
101 u8 * prism2buf, p80211pstrd_t * pstr, 101 u8 *prism2buf, p80211pstrd_t *pstr,
102 hfa384x_t * priv); 102 hfa384x_t *priv);
103int prism2mgmt_get_grpaddr_index(u32 did); 103int prism2mgmt_get_grpaddr_index(u32 did);
104 104
105void prism2sta_processing_defer(struct work_struct *data); 105void prism2sta_processing_defer(struct work_struct *data);
diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c
index 2fff0a110bc..10b671e973a 100644
--- a/drivers/staging/wlan-ng/prism2mib.c
+++ b/drivers/staging/wlan-ng/prism2mib.c
@@ -114,7 +114,7 @@ static int prism2mib_flag(mibrec_t *mib,
114 114
115static int prism2mib_wepdefaultkey(mibrec_t *mib, 115static int prism2mib_wepdefaultkey(mibrec_t *mib,
116 int isget, 116 int isget,
117 wlandevice_t * wlandev, 117 wlandevice_t *wlandev,
118 hfa384x_t *hw, 118 hfa384x_t *hw,
119 p80211msg_dot11req_mibset_t *msg, 119 p80211msg_dot11req_mibset_t *msg,
120 void *data); 120 void *data);
@@ -726,7 +726,7 @@ static int prism2mib_priv(mibrec_t *mib,
726 if (isget) { 726 if (isget) {
727 hfa384x_drvr_getconfig(hw, 727 hfa384x_drvr_getconfig(hw,
728 HFA384x_RID_CNFWPADATA, 728 HFA384x_RID_CNFWPADATA,
729 (u8 *) & wpa, 729 (u8 *) &wpa,
730 sizeof(wpa)); 730 sizeof(wpa));
731 pstr->len = le16_to_cpu(wpa.datalen); 731 pstr->len = le16_to_cpu(wpa.datalen);
732 memcpy(pstr->data, wpa.data, pstr->len); 732 memcpy(pstr->data, wpa.data, pstr->len);
@@ -737,7 +737,7 @@ static int prism2mib_priv(mibrec_t *mib,
737 result = 737 result =
738 hfa384x_drvr_setconfig(hw, 738 hfa384x_drvr_setconfig(hw,
739 HFA384x_RID_CNFWPADATA, 739 HFA384x_RID_CNFWPADATA,
740 (u8 *) & wpa, 740 (u8 *) &wpa,
741 sizeof(wpa)); 741 sizeof(wpa));
742 } 742 }
743 break; 743 break;
diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
index 50f301d6521..2da405490c6 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -1023,13 +1023,13 @@ static void prism2sta_inf_tallies(wlandevice_t *wlandev,
1023 1023
1024 cnt = sizeof(hfa384x_CommTallies32_t) / sizeof(u32); 1024 cnt = sizeof(hfa384x_CommTallies32_t) / sizeof(u32);
1025 if (inf->framelen > 22) { 1025 if (inf->framelen > 22) {
1026 dst = (u32 *) & hw->tallies; 1026 dst = (u32 *) &hw->tallies;
1027 src32 = (u32 *) & inf->info.commtallies32; 1027 src32 = (u32 *) &inf->info.commtallies32;
1028 for (i = 0; i < cnt; i++, dst++, src32++) 1028 for (i = 0; i < cnt; i++, dst++, src32++)
1029 *dst += le32_to_cpu(*src32); 1029 *dst += le32_to_cpu(*src32);
1030 } else { 1030 } else {
1031 dst = (u32 *) & hw->tallies; 1031 dst = (u32 *) &hw->tallies;
1032 src16 = (u16 *) & inf->info.commtallies16; 1032 src16 = (u16 *) &inf->info.commtallies16;
1033 for (i = 0; i < cnt; i++, dst++, src16++) 1033 for (i = 0; i < cnt; i++, dst++, src16++)
1034 *dst += le16_to_cpu(*src16); 1034 *dst += le16_to_cpu(*src16);
1035 } 1035 }
@@ -1280,7 +1280,7 @@ void prism2sta_processing_defer(struct work_struct *data)
1280 HFA384x_RID_CURRENTSSID, result); 1280 HFA384x_RID_CURRENTSSID, result);
1281 goto failed; 1281 goto failed;
1282 } 1282 }
1283 prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid, 1283 prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid,
1284 (p80211pstrd_t *) & 1284 (p80211pstrd_t *) &
1285 wlandev->ssid); 1285 wlandev->ssid);
1286 1286
@@ -1368,8 +1368,8 @@ void prism2sta_processing_defer(struct work_struct *data)
1368 HFA384x_RID_CURRENTSSID, result); 1368 HFA384x_RID_CURRENTSSID, result);
1369 goto failed; 1369 goto failed;
1370 } 1370 }
1371 prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid, 1371 prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid,
1372 (p80211pstrd_t *) & wlandev->ssid); 1372 (p80211pstrd_t *) &wlandev->ssid);
1373 1373
1374 hw->link_status = HFA384x_LINK_CONNECTED; 1374 hw->link_status = HFA384x_LINK_CONNECTED;
1375 netif_carrier_on(wlandev->netdev); 1375 netif_carrier_on(wlandev->netdev);
@@ -2028,8 +2028,8 @@ void prism2sta_commsqual_defer(struct work_struct *data)
2028 HFA384x_RID_CURRENTSSID, result); 2028 HFA384x_RID_CURRENTSSID, result);
2029 goto done; 2029 goto done;
2030 } 2030 }
2031 prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid, 2031 prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid,
2032 (p80211pstrd_t *) & wlandev->ssid); 2032 (p80211pstrd_t *) &wlandev->ssid);
2033 2033
2034 /* Reschedule timer */ 2034 /* Reschedule timer */
2035 mod_timer(&hw->commsqual_timer, jiffies + HZ); 2035 mod_timer(&hw->commsqual_timer, jiffies + HZ);