aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Elwell <andrew.elwell@gmail.com>2010-02-18 17:56:12 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-04 10:59:02 -0500
commitef1a0ed7f1793531e5fb3ee489cb1e2b627f76fd (patch)
tree9ca95ba410f8ab6737abfd1f172f85727bd7f984
parent6705b68d0be284e2f9949f3657ea65d426d0f988 (diff)
Staging: wlan-ng - checkpatch.pl fixups
Basic fixups in the staging/wlan-ng directory. (First kernel patch - thanks to FOSDEM talk) Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/wlan-ng/hfa384x_usb.c12
-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.c4
-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.h12
-rw-r--r--drivers/staging/wlan-ng/p80211wext.c56
-rw-r--r--drivers/staging/wlan-ng/prism2fw.c69
-rw-r--r--drivers/staging/wlan-ng/prism2mgmt.c30
-rw-r--r--drivers/staging/wlan-ng/prism2mgmt.h48
-rw-r--r--drivers/staging/wlan-ng/prism2mib.c11
-rw-r--r--drivers/staging/wlan-ng/prism2sta.c23
15 files changed, 183 insertions, 194 deletions
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 925678babd9e..730d085c3f87 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -118,15 +118,15 @@
118#include <linux/wireless.h> 118#include <linux/wireless.h>
119#include <linux/netdevice.h> 119#include <linux/netdevice.h>
120#include <linux/timer.h> 120#include <linux/timer.h>
121#include <asm/io.h> 121#include <linux/io.h>
122#include <linux/delay.h> 122#include <linux/delay.h>
123#include <asm/byteorder.h> 123#include <asm/byteorder.h>
124#include <asm/bitops.h> 124#include <linux/bitops.h>
125#include <linux/list.h> 125#include <linux/list.h>
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);
@@ -3642,7 +3642,7 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev,
3642 /* check for unencrypted stuff if WEP bit set. */ 3642 /* check for unencrypted stuff if WEP bit set. */
3643 if (*(datap - hdrlen + 1) & 0x40) /* wep set */ 3643 if (*(datap - hdrlen + 1) & 0x40) /* wep set */
3644 if ((*(datap) == 0xaa) && (*(datap + 1) == 0xaa)) 3644 if ((*(datap) == 0xaa) && (*(datap + 1) == 0xaa))
3645 *(datap - hdrlen + 1) &= 0xbf; // clear wep; it's the 802.2 header! 3645 *(datap - hdrlen + 1) &= 0xbf; /* clear wep; it's the 802.2 header! */
3646 } 3646 }
3647 3647
3648 if (hw->sniff_fcs) { 3648 if (hw->sniff_fcs) {
diff --git a/drivers/staging/wlan-ng/p80211conv.h b/drivers/staging/wlan-ng/p80211conv.h
index 0c62df19fa7f..6fe163be24f6 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 da8b6f53c74f..0ccfba1294de 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 14cdc86d1676..deb52f5fd780 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 22424c8903ee..e27d72cf5714 100644
--- a/drivers/staging/wlan-ng/p80211netdev.c
+++ b/drivers/staging/wlan-ng/p80211netdev.c
@@ -646,7 +646,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
646 646
647 /* Set up some convenience pointers. */ 647 /* Set up some convenience pointers. */
648 mibattr = &dot11req.mibattribute; 648 mibattr = &dot11req.mibattribute;
649 macaddr = (p80211item_pstr6_t *) & mibattr->data; 649 macaddr = (p80211item_pstr6_t *) &mibattr->data;
650 resultcode = &dot11req.resultcode; 650 resultcode = &dot11req.resultcode;
651 651
652 /* Set up a dot11req_mibset */ 652 /* Set up a dot11req_mibset */
@@ -674,7 +674,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
674 resultcode->data = 0; 674 resultcode->data = 0;
675 675
676 /* now fire the request */ 676 /* now fire the request */
677 result = p80211req_dorequest(dev->ml_priv, (u8 *) & dot11req); 677 result = p80211req_dorequest(dev->ml_priv, (u8 *) &dot11req);
678 678
679 /* If the request wasn't successful, report an error and don't 679 /* If the request wasn't successful, report an error and don't
680 * change the netdev address 680 * change the netdev address
diff --git a/drivers/staging/wlan-ng/p80211netdev.h b/drivers/staging/wlan-ng/p80211netdev.h
index 8bd9dfb3b9b4..3c8c64800567 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 c88156cdf681..c2e95f166828 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 5d9176762ba7..a95a45a6814d 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 2b83ab0c711b..db235517df92 100644
--- a/drivers/staging/wlan-ng/p80211types.h
+++ b/drivers/staging/wlan-ng/p80211types.h
@@ -168,10 +168,10 @@
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
@@ -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 74d8022adb24..040c9e3e1d51 100644
--- a/drivers/staging/wlan-ng/p80211wext.c
+++ b/drivers/staging/wlan-ng/p80211wext.c
@@ -46,8 +46,8 @@
46#include <linux/wireless.h> 46#include <linux/wireless.h>
47#include <net/iw_handler.h> 47#include <net/iw_handler.h>
48#include <linux/if_arp.h> 48#include <linux/if_arp.h>
49#include <asm/bitops.h> 49#include <linux/bitops.h>
50#include <asm/uaccess.h> 50#include <linux/uaccess.h>
51#include <asm/byteorder.h> 51#include <asm/byteorder.h>
52#include <linux/if_ether.h> 52#include <linux/if_ether.h>
53#include <linux/bitops.h> 53#include <linux/bitops.h>
@@ -137,7 +137,7 @@ static int p80211wext_dorequest(wlandevice_t *wlandev, u32 did, u32 data)
137 mibitem.did = did; 137 mibitem.did = did;
138 mibitem.data = data; 138 mibitem.data = data;
139 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 139 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
140 result = p80211req_dorequest(wlandev, (u8 *) & msg); 140 result = p80211req_dorequest(wlandev, (u8 *) &msg);
141 141
142 return result; 142 return result;
143} 143}
@@ -174,7 +174,7 @@ static int p80211wext_autojoin(wlandevice_t *wlandev)
174 memcpy(msg.ssid.data.data, ssid, data.length); 174 memcpy(msg.ssid.data.data, ssid, data.length);
175 msg.ssid.data.len = data.length; 175 msg.ssid.data.len = data.length;
176 176
177 result = p80211req_dorequest(wlandev, (u8 *) & msg); 177 result = p80211req_dorequest(wlandev, (u8 *) &msg);
178 178
179 if (result) { 179 if (result) {
180 err = -EFAULT; 180 err = -EFAULT;
@@ -211,7 +211,7 @@ struct iw_statistics *p80211wext_get_wireless_stats(netdevice_t *dev)
211 if (wlandev->mlmerequest == NULL) 211 if (wlandev->mlmerequest == NULL)
212 return NULL; 212 return NULL;
213 213
214 retval = wlandev->mlmerequest(wlandev, (p80211msg_t *) & quality); 214 retval = wlandev->mlmerequest(wlandev, (p80211msg_t *) &quality);
215 215
216 wstats->qual.qual = qual_as_percent(quality.link.data); /* overall link quality */ 216 wstats->qual.qual = qual_as_percent(quality.link.data); /* overall link quality */
217 wstats->qual.level = quality.level.data; /* instant signal level */ 217 wstats->qual.level = quality.level.data; /* instant signal level */
@@ -271,7 +271,7 @@ static int p80211wext_giwfreq(netdevice_t *dev,
271 msg.msgcode = DIDmsg_dot11req_mibget; 271 msg.msgcode = DIDmsg_dot11req_mibget;
272 mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel; 272 mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel;
273 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 273 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
274 result = p80211req_dorequest(wlandev, (u8 *) & msg); 274 result = p80211req_dorequest(wlandev, (u8 *) &msg);
275 275
276 if (result) { 276 if (result) {
277 err = -EFAULT; 277 err = -EFAULT;
@@ -318,7 +318,7 @@ static int p80211wext_siwfreq(netdevice_t *dev,
318 mibitem.data = p80211_mhz_to_channel(freq->m); 318 mibitem.data = p80211_mhz_to_channel(freq->m);
319 319
320 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 320 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
321 result = p80211req_dorequest(wlandev, (u8 *) & msg); 321 result = p80211req_dorequest(wlandev, (u8 *) &msg);
322 322
323 if (result) { 323 if (result) {
324 err = -EFAULT; 324 err = -EFAULT;
@@ -399,7 +399,7 @@ static int p80211wext_siwmode(netdevice_t *dev,
399 mibitem.did = DIDmib_p2_p2Static_p2CnfPortType; 399 mibitem.did = DIDmib_p2_p2Static_p2CnfPortType;
400 mibitem.data = (*mode == IW_MODE_ADHOC) ? 0 : 1; 400 mibitem.data = (*mode == IW_MODE_ADHOC) ? 0 : 1;
401 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 401 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
402 result = p80211req_dorequest(wlandev, (u8 *) & msg); 402 result = p80211req_dorequest(wlandev, (u8 *) &msg);
403 403
404 if (result) 404 if (result)
405 err = -EFAULT; 405 err = -EFAULT;
@@ -621,7 +621,7 @@ static int p80211wext_siwencode(netdevice_t *dev,
621 621
622 msg.msgcode = DIDmsg_dot11req_mibset; 622 msg.msgcode = DIDmsg_dot11req_mibset;
623 memcpy(&msg.mibattribute.data, &pstr, sizeof(pstr)); 623 memcpy(&msg.mibattribute.data, &pstr, sizeof(pstr));
624 result = p80211req_dorequest(wlandev, (u8 *) & msg); 624 result = p80211req_dorequest(wlandev, (u8 *) &msg);
625 625
626 if (result) { 626 if (result) {
627 err = -EFAULT; 627 err = -EFAULT;
@@ -729,7 +729,7 @@ static int p80211wext_siwessid(netdevice_t *dev,
729 msg.ssid.data.len = length; 729 msg.ssid.data.len = length;
730 730
731 pr_debug("autojoin_ssid for %s \n", essid); 731 pr_debug("autojoin_ssid for %s \n", essid);
732 result = p80211req_dorequest(wlandev, (u8 *) & msg); 732 result = p80211req_dorequest(wlandev, (u8 *) &msg);
733 pr_debug("autojoin_ssid %d\n", result); 733 pr_debug("autojoin_ssid %d\n", result);
734 734
735 if (result) { 735 if (result) {
@@ -773,7 +773,7 @@ static int p80211wext_giwrate(netdevice_t *dev,
773 msg.msgcode = DIDmsg_dot11req_mibget; 773 msg.msgcode = DIDmsg_dot11req_mibget;
774 mibitem.did = DIDmib_p2_p2MAC_p2CurrentTxRate; 774 mibitem.did = DIDmib_p2_p2MAC_p2CurrentTxRate;
775 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 775 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
776 result = p80211req_dorequest(wlandev, (u8 *) & msg); 776 result = p80211req_dorequest(wlandev, (u8 *) &msg);
777 777
778 if (result) { 778 if (result) {
779 err = -EFAULT; 779 err = -EFAULT;
@@ -824,7 +824,7 @@ static int p80211wext_giwrts(netdevice_t *dev,
824 msg.msgcode = DIDmsg_dot11req_mibget; 824 msg.msgcode = DIDmsg_dot11req_mibget;
825 mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold; 825 mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold;
826 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 826 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
827 result = p80211req_dorequest(wlandev, (u8 *) & msg); 827 result = p80211req_dorequest(wlandev, (u8 *) &msg);
828 828
829 if (result) { 829 if (result) {
830 err = -EFAULT; 830 err = -EFAULT;
@@ -864,7 +864,7 @@ static int p80211wext_siwrts(netdevice_t *dev,
864 mibitem.data = rts->value; 864 mibitem.data = rts->value;
865 865
866 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 866 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
867 result = p80211req_dorequest(wlandev, (u8 *) & msg); 867 result = p80211req_dorequest(wlandev, (u8 *) &msg);
868 868
869 if (result) { 869 if (result) {
870 err = -EFAULT; 870 err = -EFAULT;
@@ -889,7 +889,7 @@ static int p80211wext_giwfrag(netdevice_t *dev,
889 mibitem.did = 889 mibitem.did =
890 DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold; 890 DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold;
891 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 891 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
892 result = p80211req_dorequest(wlandev, (u8 *) & msg); 892 result = p80211req_dorequest(wlandev, (u8 *) &msg);
893 893
894 if (result) { 894 if (result) {
895 err = -EFAULT; 895 err = -EFAULT;
@@ -931,7 +931,7 @@ static int p80211wext_siwfrag(netdevice_t *dev,
931 mibitem.data = frag->value; 931 mibitem.data = frag->value;
932 932
933 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 933 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
934 result = p80211req_dorequest(wlandev, (u8 *) & msg); 934 result = p80211req_dorequest(wlandev, (u8 *) &msg);
935 935
936 if (result) { 936 if (result) {
937 err = -EFAULT; 937 err = -EFAULT;
@@ -965,7 +965,7 @@ static int p80211wext_giwretry(netdevice_t *dev,
965 mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit; 965 mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit;
966 966
967 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 967 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
968 result = p80211req_dorequest(wlandev, (u8 *) & msg); 968 result = p80211req_dorequest(wlandev, (u8 *) &msg);
969 969
970 if (result) { 970 if (result) {
971 err = -EFAULT; 971 err = -EFAULT;
@@ -979,7 +979,7 @@ static int p80211wext_giwretry(netdevice_t *dev,
979 mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit; 979 mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit;
980 980
981 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 981 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
982 result = p80211req_dorequest(wlandev, (u8 *) & msg); 982 result = p80211req_dorequest(wlandev, (u8 *) &msg);
983 983
984 if (result) { 984 if (result) {
985 err = -EFAULT; 985 err = -EFAULT;
@@ -994,7 +994,7 @@ static int p80211wext_giwretry(netdevice_t *dev,
994 DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime; 994 DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime;
995 995
996 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 996 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
997 result = p80211req_dorequest(wlandev, (u8 *) & msg); 997 result = p80211req_dorequest(wlandev, (u8 *) &msg);
998 998
999 if (result) { 999 if (result) {
1000 err = -EFAULT; 1000 err = -EFAULT;
@@ -1055,7 +1055,7 @@ static int p80211wext_siwretry(netdevice_t *dev,
1055 mibitem.data = rrq->value /= 1024; 1055 mibitem.data = rrq->value /= 1024;
1056 1056
1057 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 1057 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
1058 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1058 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1059 1059
1060 if (result) { 1060 if (result) {
1061 err = -EFAULT; 1061 err = -EFAULT;
@@ -1069,7 +1069,7 @@ static int p80211wext_siwretry(netdevice_t *dev,
1069 1069
1070 memcpy(&msg.mibattribute.data, &mibitem, 1070 memcpy(&msg.mibattribute.data, &mibitem,
1071 sizeof(mibitem)); 1071 sizeof(mibitem));
1072 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1072 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1073 1073
1074 if (result) { 1074 if (result) {
1075 err = -EFAULT; 1075 err = -EFAULT;
@@ -1084,7 +1084,7 @@ static int p80211wext_siwretry(netdevice_t *dev,
1084 1084
1085 memcpy(&msg.mibattribute.data, &mibitem, 1085 memcpy(&msg.mibattribute.data, &mibitem,
1086 sizeof(mibitem)); 1086 sizeof(mibitem));
1087 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1087 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1088 1088
1089 if (result) { 1089 if (result) {
1090 err = -EFAULT; 1090 err = -EFAULT;
@@ -1121,7 +1121,7 @@ static int p80211wext_siwtxpow(netdevice_t *dev,
1121 else 1121 else
1122 mibitem.data = rrq->value; 1122 mibitem.data = rrq->value;
1123 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 1123 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
1124 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1124 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1125 1125
1126 if (result) { 1126 if (result) {
1127 err = -EFAULT; 1127 err = -EFAULT;
@@ -1147,7 +1147,7 @@ static int p80211wext_giwtxpow(netdevice_t *dev,
1147 DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel; 1147 DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel;
1148 1148
1149 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); 1149 memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
1150 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1150 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1151 1151
1152 if (result) { 1152 if (result) {
1153 err = -EFAULT; 1153 err = -EFAULT;
@@ -1295,7 +1295,7 @@ static int p80211wext_siwscan(netdevice_t *dev,
1295 msg.maxchanneltime.data = 250; 1295 msg.maxchanneltime.data = 250;
1296 msg.minchanneltime.data = 200; 1296 msg.minchanneltime.data = 200;
1297 1297
1298 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1298 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1299 if (result) 1299 if (result)
1300 err = prism2_result2err(msg.resultcode.data); 1300 err = prism2_result2err(msg.resultcode.data);
1301 1301
@@ -1414,7 +1414,7 @@ static int p80211wext_giwscan(netdevice_t *dev,
1414 msg.msgcode = DIDmsg_dot11req_scan_results; 1414 msg.msgcode = DIDmsg_dot11req_scan_results;
1415 msg.bssindex.data = i; 1415 msg.bssindex.data = i;
1416 1416
1417 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1417 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1418 if ((result != 0) || 1418 if ((result != 0) ||
1419 (msg.resultcode.data != P80211ENUM_resultcode_success)) { 1419 (msg.resultcode.data != P80211ENUM_resultcode_success)) {
1420 break; 1420 break;
@@ -1489,7 +1489,7 @@ static int p80211wext_set_encodeext(struct net_device *dev,
1489 memcpy(wlandev->wep_keys[idx], ext->key, ext->key_len); 1489 memcpy(wlandev->wep_keys[idx], ext->key, ext->key_len);
1490 1490
1491 memset(&msg, 0, sizeof(msg)); 1491 memset(&msg, 0, sizeof(msg));
1492 pstr = (p80211item_pstr32_t *) & msg.mibattribute.data; 1492 pstr = (p80211item_pstr32_t *) &msg.mibattribute.data;
1493 memcpy(pstr->data.data, ext->key, ext->key_len); 1493 memcpy(pstr->data.data, ext->key, ext->key_len);
1494 pstr->data.len = ext->key_len; 1494 pstr->data.len = ext->key_len;
1495 switch (idx) { 1495 switch (idx) {
@@ -1513,7 +1513,7 @@ static int p80211wext_set_encodeext(struct net_device *dev,
1513 break; 1513 break;
1514 } 1514 }
1515 msg.msgcode = DIDmsg_dot11req_mibset; 1515 msg.msgcode = DIDmsg_dot11req_mibset;
1516 result = p80211req_dorequest(wlandev, (u8 *) & msg); 1516 result = p80211req_dorequest(wlandev, (u8 *) &msg);
1517 pr_debug("result (%d)\n", result); 1517 pr_debug("result (%d)\n", result);
1518 } 1518 }
1519 return result; 1519 return result;
@@ -1737,7 +1737,7 @@ struct iw_handler_def p80211wext_handler_def = {
1737 .get_wireless_stats = p80211wext_get_wireless_stats 1737 .get_wireless_stats = p80211wext_get_wireless_stats
1738}; 1738};
1739 1739
1740int p80211wext_event_associated(wlandevice_t * wlandev, int assoc) 1740int p80211wext_event_associated(wlandevice_t *wlandev, int assoc)
1741{ 1741{
1742 union iwreq_data data; 1742 union iwreq_data data;
1743 1743
diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c
index aaa70ed57710..343614561f4c 100644
--- a/drivers/staging/wlan-ng/prism2fw.c
+++ b/drivers/staging/wlan-ng/prism2fw.c
@@ -108,9 +108,9 @@ typedef struct pda {
108} pda_t; 108} pda_t;
109 109
110typedef struct imgchunk { 110typedef struct imgchunk {
111 u32 addr; /* start address */ 111 u32 addr; /* start address */
112 u32 len; /* in bytes */ 112 u32 len; /* in bytes */
113 u16 crc; /* CRC value (if it falls at a chunk boundary) */ 113 u16 crc; /* CRC value (if it falls at a chunk boundary) */
114 u8 *data; 114 u8 *data;
115} imgchunk_t; 115} imgchunk_t;
116 116
@@ -264,7 +264,7 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)
264 /* Build the PDA we're going to use. */ 264 /* Build the PDA we're going to use. */
265 if (read_cardpda(&pda, wlandev)) { 265 if (read_cardpda(&pda, wlandev)) {
266 printk(KERN_ERR "load_cardpda failed, exiting.\n"); 266 printk(KERN_ERR "load_cardpda failed, exiting.\n");
267 return (1); 267 return 1;
268 } 268 }
269 269
270 /* read the card's PRI-SUP */ 270 /* read the card's PRI-SUP */
@@ -286,9 +286,8 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)
286 286
287 /* DIDmsg_dot11req_mibget */ 287 /* DIDmsg_dot11req_mibget */
288 prism2mgmt_mibset_mibget(wlandev, &getmsg); 288 prism2mgmt_mibset_mibget(wlandev, &getmsg);
289 if (getmsg.resultcode.data != P80211ENUM_resultcode_success) { 289 if (getmsg.resultcode.data != P80211ENUM_resultcode_success)
290 printk(KERN_ERR "Couldn't fetch PRI-SUP info\n"); 290 printk(KERN_ERR "Couldn't fetch PRI-SUP info\n");
291 }
292 291
293 /* Already in host order */ 292 /* Already in host order */
294 priid.role = *data++; 293 priid.role = *data++;
@@ -301,19 +300,19 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)
301 result = read_fwfile(rfptr); 300 result = read_fwfile(rfptr);
302 if (result) { 301 if (result) {
303 printk(KERN_ERR "Failed to read the data exiting.\n"); 302 printk(KERN_ERR "Failed to read the data exiting.\n");
304 return (1); 303 return 1;
305 } 304 }
306 305
307 result = validate_identity(); 306 result = validate_identity();
308 307
309 if (result) { 308 if (result) {
310 printk(KERN_ERR "Incompatible firmware image.\n"); 309 printk(KERN_ERR "Incompatible firmware image.\n");
311 return (1); 310 return 1;
312 } 311 }
313 312
314 if (startaddr == 0x00000000) { 313 if (startaddr == 0x00000000) {
315 printk(KERN_ERR "Can't RAM download a Flash image!\n"); 314 printk(KERN_ERR "Can't RAM download a Flash image!\n");
316 return (1); 315 return 1;
317 } 316 }
318 317
319 /* Make the image chunks */ 318 /* Make the image chunks */
@@ -323,20 +322,20 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)
323 result = plugimage(fchunk, nfchunks, s3plug, ns3plug, &pda); 322 result = plugimage(fchunk, nfchunks, s3plug, ns3plug, &pda);
324 if (result) { 323 if (result) {
325 printk(KERN_ERR "Failed to plug data.\n"); 324 printk(KERN_ERR "Failed to plug data.\n");
326 return (1); 325 return 1;
327 } 326 }
328 327
329 /* Insert any CRCs */ 328 /* Insert any CRCs */
330 if (crcimage(fchunk, nfchunks, s3crc, ns3crc)) { 329 if (crcimage(fchunk, nfchunks, s3crc, ns3crc)) {
331 printk(KERN_ERR "Failed to insert all CRCs\n"); 330 printk(KERN_ERR "Failed to insert all CRCs\n");
332 return (1); 331 return 1;
333 } 332 }
334 333
335 /* Write the image */ 334 /* Write the image */
336 result = writeimage(wlandev, fchunk, nfchunks); 335 result = writeimage(wlandev, fchunk, nfchunks);
337 if (result) { 336 if (result) {
338 printk(KERN_ERR "Failed to ramwrite image data.\n"); 337 printk(KERN_ERR "Failed to ramwrite image data.\n");
339 return (1); 338 return 1;
340 } 339 }
341 340
342 /* clear any allocated memory */ 341 /* clear any allocated memory */
@@ -434,9 +433,8 @@ void free_chunks(imgchunk_t *fchunk, unsigned int *nfchunks)
434{ 433{
435 int i; 434 int i;
436 for (i = 0; i < *nfchunks; i++) { 435 for (i = 0; i < *nfchunks; i++) {
437 if (fchunk[i].data != NULL) { 436 if (fchunk[i].data != NULL)
438 kfree(fchunk[i].data); 437 kfree(fchunk[i].data);
439 }
440 } 438 }
441 *nfchunks = 0; 439 *nfchunks = 0;
442 memset(fchunk, 0, sizeof(*fchunk)); 440 memset(fchunk, 0, sizeof(*fchunk));
@@ -531,7 +529,7 @@ int mkimage(imgchunk_t *clist, unsigned int *ccnt)
531 if (clist[i].data == NULL) { 529 if (clist[i].data == NULL) {
532 printk(KERN_ERR 530 printk(KERN_ERR
533 "failed to allocate image space, exitting.\n"); 531 "failed to allocate image space, exitting.\n");
534 return (1); 532 return 1;
535 } 533 }
536 memset(clist[i].data, 0, clist[i].len); 534 memset(clist[i].data, 0, clist[i].len);
537 pr_debug("chunk[%d]: addr=0x%06x len=%d\n", 535 pr_debug("chunk[%d]: addr=0x%06x len=%d\n",
@@ -545,15 +543,14 @@ int mkimage(imgchunk_t *clist, unsigned int *ccnt)
545 for (j = 0; j < *ccnt; j++) { 543 for (j = 0; j < *ccnt; j++) {
546 cstart = clist[j].addr; 544 cstart = clist[j].addr;
547 cend = cstart + clist[j].len - 1; 545 cend = cstart + clist[j].len - 1;
548 if (s3start >= cstart && s3end <= cend) { 546 if (s3start >= cstart && s3end <= cend)
549 break; 547 break;
550 }
551 } 548 }
552 if (((unsigned int)j) >= (*ccnt)) { 549 if (((unsigned int)j) >= (*ccnt)) {
553 printk(KERN_ERR 550 printk(KERN_ERR
554 "s3rec(a=0x%06x,l=%d), no chunk match, exiting.\n", 551 "s3rec(a=0x%06x,l=%d), no chunk match, exiting.\n",
555 s3start, s3data[i].len); 552 s3start, s3data[i].len);
556 return (1); 553 return 1;
557 } 554 }
558 coffset = s3start - cstart; 555 coffset = s3start - cstart;
559 memcpy(clist[j].data + coffset, s3data[i].data, s3data[i].len); 556 memcpy(clist[j].data + coffset, s3data[i].data, s3data[i].len);
@@ -586,7 +583,7 @@ int mkpdrlist(pda_t *pda)
586 curroff = 0; 583 curroff = 0;
587 while (curroff < (HFA384x_PDA_LEN_MAX / 2) && 584 while (curroff < (HFA384x_PDA_LEN_MAX / 2) &&
588 le16_to_cpu(pda16[curroff + 1]) != HFA384x_PDR_END_OF_PDA) { 585 le16_to_cpu(pda16[curroff + 1]) != HFA384x_PDR_END_OF_PDA) {
589 pda->rec[pda->nrec] = (hfa384x_pdrec_t *) & (pda16[curroff]); 586 pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]);
590 587
591 if (le16_to_cpu(pda->rec[pda->nrec]->code) == HFA384x_PDR_NICID) { 588 if (le16_to_cpu(pda->rec[pda->nrec]->code) == HFA384x_PDR_NICID) {
592 memcpy(&nicid, &pda->rec[pda->nrec]->data.nicid, 589 memcpy(&nicid, &pda->rec[pda->nrec]->data.nicid,
@@ -623,10 +620,10 @@ int mkpdrlist(pda_t *pda)
623 printk(KERN_ERR 620 printk(KERN_ERR
624 "no end record found or invalid lengths in " 621 "no end record found or invalid lengths in "
625 "PDR data, exiting. %x %d\n", curroff, pda->nrec); 622 "PDR data, exiting. %x %d\n", curroff, pda->nrec);
626 return (1); 623 return 1;
627 } 624 }
628 if (le16_to_cpu(pda16[curroff + 1]) == HFA384x_PDR_END_OF_PDA) { 625 if (le16_to_cpu(pda16[curroff + 1]) == HFA384x_PDR_END_OF_PDA) {
629 pda->rec[pda->nrec] = (hfa384x_pdrec_t *) & (pda16[curroff]); 626 pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]);
630 (pda->nrec)++; 627 (pda->nrec)++;
631 } 628 }
632 return result; 629 return result;
@@ -869,7 +866,7 @@ int read_fwfile(const struct ihex_binrec *record)
869 ptr16 = (u16 *) record->data; 866 ptr16 = (u16 *) record->data;
870 867
871 /* parse what was an S3 srec and put it in the right array */ 868 /* parse what was an S3 srec and put it in the right array */
872 switch(addr) { 869 switch (addr) {
873 case S3ADDR_START: 870 case S3ADDR_START:
874 startaddr = *ptr32; 871 startaddr = *ptr32;
875 pr_debug(" S7 start addr, record=%d " 872 pr_debug(" S7 start addr, record=%d "
@@ -890,7 +887,7 @@ int read_fwfile(const struct ihex_binrec *record)
890 s3plug[ns3plug].len); 887 s3plug[ns3plug].len);
891 888
892 ns3plug++; 889 ns3plug++;
893 if ( ns3plug == S3PLUG_MAX ) { 890 if (ns3plug == S3PLUG_MAX) {
894 printk(KERN_ERR "S3 plugrec limit reached - aborting\n"); 891 printk(KERN_ERR "S3 plugrec limit reached - aborting\n");
895 return 1; 892 return 1;
896 } 893 }
@@ -907,7 +904,7 @@ int read_fwfile(const struct ihex_binrec *record)
907 s3crc[ns3crc].len, 904 s3crc[ns3crc].len,
908 s3crc[ns3crc].dowrite); 905 s3crc[ns3crc].dowrite);
909 ns3crc++; 906 ns3crc++;
910 if ( ns3crc == S3CRC_MAX ) { 907 if (ns3crc == S3CRC_MAX) {
911 printk(KERN_ERR "S3 crcrec limit reached - aborting\n"); 908 printk(KERN_ERR "S3 crcrec limit reached - aborting\n");
912 return 1; 909 return 1;
913 } 910 }
@@ -921,12 +918,12 @@ int read_fwfile(const struct ihex_binrec *record)
921 rcnt, 918 rcnt,
922 s3info[ns3info].len, 919 s3info[ns3info].len,
923 s3info[ns3info].type); 920 s3info[ns3info].type);
924 if ( ((s3info[ns3info].len - 1) * sizeof(u16)) > sizeof(s3info[ns3info].info) ) { 921 if (((s3info[ns3info].len - 1) * sizeof(u16)) > sizeof(s3info[ns3info].info)) {
925 printk(KERN_ERR " S3 inforec length too long - aborting\n"); 922 printk(KERN_ERR " S3 inforec length too long - aborting\n");
926 return 1; 923 return 1;
927 } 924 }
928 925
929 tmpinfo = (u16*)&(s3info[ns3info].info.version); 926 tmpinfo = (u16 *)&(s3info[ns3info].info.version);
930 pr_debug(" info="); 927 pr_debug(" info=");
931 for (i = 0; i < s3info[ns3info].len - 1; i++) { 928 for (i = 0; i < s3info[ns3info].len - 1; i++) {
932 tmpinfo[i] = *(ptr16 + 2 + i); 929 tmpinfo[i] = *(ptr16 + 2 + i);
@@ -935,7 +932,7 @@ int read_fwfile(const struct ihex_binrec *record)
935 pr_debug("\n"); 932 pr_debug("\n");
936 933
937 ns3info++; 934 ns3info++;
938 if ( ns3info == S3INFO_MAX ) { 935 if (ns3info == S3INFO_MAX) {
939 printk(KERN_ERR "S3 inforec limit reached - aborting\n"); 936 printk(KERN_ERR "S3 inforec limit reached - aborting\n");
940 return 1; 937 return 1;
941 } 938 }
@@ -945,7 +942,7 @@ int read_fwfile(const struct ihex_binrec *record)
945 s3data[ns3data].len = len; 942 s3data[ns3data].len = len;
946 s3data[ns3data].data = (uint8_t *) record->data; 943 s3data[ns3data].data = (uint8_t *) record->data;
947 ns3data++; 944 ns3data++;
948 if ( ns3data == S3DATA_MAX ) { 945 if (ns3data == S3DATA_MAX) {
949 printk(KERN_ERR "S3 datarec limit reached - aborting\n"); 946 printk(KERN_ERR "S3 datarec limit reached - aborting\n");
950 return 1; 947 return 1;
951 } 948 }
@@ -1023,7 +1020,7 @@ int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk,
1023 rstatemsg.enable.data = P80211ENUM_truth_true; 1020 rstatemsg.enable.data = P80211ENUM_truth_true;
1024 rstatemsg.exeaddr.data = startaddr; 1021 rstatemsg.exeaddr.data = startaddr;
1025 1022
1026 msgp = (p80211msg_t *) & rstatemsg; 1023 msgp = (p80211msg_t *) &rstatemsg;
1027 result = prism2mgmt_ramdl_state(wlandev, msgp); 1024 result = prism2mgmt_ramdl_state(wlandev, msgp);
1028 if (result) { 1025 if (result) {
1029 printk(KERN_ERR 1026 printk(KERN_ERR
@@ -1063,7 +1060,7 @@ int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk,
1063 ("Sending xxxdl_write message addr=%06x len=%d.\n", 1060 ("Sending xxxdl_write message addr=%06x len=%d.\n",
1064 currdaddr, currlen); 1061 currdaddr, currlen);
1065 1062
1066 msgp = (p80211msg_t *) & rwritemsg; 1063 msgp = (p80211msg_t *) &rwritemsg;
1067 result = prism2mgmt_ramdl_write(wlandev, msgp); 1064 result = prism2mgmt_ramdl_write(wlandev, msgp);
1068 1065
1069 /* Check the results */ 1066 /* Check the results */
@@ -1090,7 +1087,7 @@ int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk,
1090 rstatemsg.enable.data = P80211ENUM_truth_false; 1087 rstatemsg.enable.data = P80211ENUM_truth_false;
1091 rstatemsg.exeaddr.data = 0; 1088 rstatemsg.exeaddr.data = 0;
1092 1089
1093 msgp = (p80211msg_t *) & rstatemsg; 1090 msgp = (p80211msg_t *) &rstatemsg;
1094 result = prism2mgmt_ramdl_state(wlandev, msgp); 1091 result = prism2mgmt_ramdl_state(wlandev, msgp);
1095 if (result) { 1092 if (result) {
1096 printk(KERN_ERR 1093 printk(KERN_ERR
@@ -1160,10 +1157,7 @@ int validate_identity(void)
1160 } 1157 }
1161 /* SEC compat range */ 1158 /* SEC compat range */
1162 if ((s3info[i].info.compat.role == 1) && 1159 if ((s3info[i].info.compat.role == 1) &&
1163 (s3info[i].info.compat.id == 4)) { 1160 (s3info[i].info.compat.id == 4))
1164
1165 }
1166
1167 break; 1161 break;
1168 case 3: 1162 case 3:
1169 pr_debug("Seq: %#x\n", s3info[i].info.buildseq); 1163 pr_debug("Seq: %#x\n", s3info[i].info.buildseq);
@@ -1196,8 +1190,9 @@ int validate_identity(void)
1196 pr_debug("Unknown inforec type %d\n", s3info[i].type); 1190 pr_debug("Unknown inforec type %d\n", s3info[i].type);
1197 } 1191 }
1198 } 1192 }
1199 // walk through 1193 /* walk through */
1200 1194
1201 if (trump && (result != 2)) result = 0; 1195 if (trump && (result != 2))
1196 result = 0;
1202 return result; 1197 return result;
1203} 1198}
diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c
index 9f7d96cae8e3..ad163da72ae4 100644
--- a/drivers/staging/wlan-ng/prism2mgmt.c
+++ b/drivers/staging/wlan-ng/prism2mgmt.c
@@ -67,7 +67,7 @@
67#include <linux/wireless.h> 67#include <linux/wireless.h>
68#include <linux/netdevice.h> 68#include <linux/netdevice.h>
69#include <linux/delay.h> 69#include <linux/delay.h>
70#include <asm/io.h> 70#include <linux/io.h>
71#include <asm/byteorder.h> 71#include <asm/byteorder.h>
72#include <linux/random.h> 72#include <linux/random.h>
73#include <linux/usb.h> 73#include <linux/usb.h>
@@ -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,
@@ -1123,8 +1123,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
1123 if (hw->presniff_port_type != 0) { 1123 if (hw->presniff_port_type != 0) {
1124 word = hw->presniff_port_type; 1124 word = hw->presniff_port_type;
1125 result = hfa384x_drvr_setconfig16(hw, 1125 result = hfa384x_drvr_setconfig16(hw,
1126 HFA384x_RID_CNFPORTTYPE, 1126 HFA384x_RID_CNFPORTTYPE,
1127 word); 1127 word);
1128 if (result) { 1128 if (result) {
1129 pr_debug 1129 pr_debug
1130 ("failed to restore porttype, result=%d\n", 1130 ("failed to restore porttype, result=%d\n",
@@ -1156,10 +1156,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
1156 if (wlandev->netdev->type == ARPHRD_ETHER) { 1156 if (wlandev->netdev->type == ARPHRD_ETHER) {
1157 /* Save macport 0 state */ 1157 /* Save macport 0 state */
1158 result = hfa384x_drvr_getconfig16(hw, 1158 result = hfa384x_drvr_getconfig16(hw,
1159 HFA384x_RID_CNFPORTTYPE, 1159 HFA384x_RID_CNFPORTTYPE,
1160 & 1160 &(hw->presniff_port_type));
1161 (hw->
1162 presniff_port_type));
1163 if (result) { 1161 if (result) {
1164 pr_debug 1162 pr_debug
1165 ("failed to read porttype, result=%d\n", 1163 ("failed to read porttype, result=%d\n",
@@ -1168,10 +1166,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
1168 } 1166 }
1169 /* Save the wepflags state */ 1167 /* Save the wepflags state */
1170 result = hfa384x_drvr_getconfig16(hw, 1168 result = hfa384x_drvr_getconfig16(hw,
1171 HFA384x_RID_CNFWEPFLAGS, 1169 HFA384x_RID_CNFWEPFLAGS,
1172 & 1170 &(hw->presniff_wepflags));
1173 (hw->
1174 presniff_wepflags));
1175 if (result) { 1171 if (result) {
1176 pr_debug 1172 pr_debug
1177 ("failed to read wepflags, result=%d\n", 1173 ("failed to read wepflags, result=%d\n",
@@ -1218,8 +1214,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
1218 /* Set the port type to pIbss */ 1214 /* Set the port type to pIbss */
1219 word = HFA384x_PORTTYPE_PSUEDOIBSS; 1215 word = HFA384x_PORTTYPE_PSUEDOIBSS;
1220 result = hfa384x_drvr_setconfig16(hw, 1216 result = hfa384x_drvr_setconfig16(hw,
1221 HFA384x_RID_CNFPORTTYPE, 1217 HFA384x_RID_CNFPORTTYPE,
1222 word); 1218 word);
1223 if (result) { 1219 if (result) {
1224 pr_debug 1220 pr_debug
1225 ("failed to set porttype %d, result=%d\n", 1221 ("failed to set porttype %d, result=%d\n",
@@ -1235,8 +1231,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
1235 HFA384x_WEPFLAGS_DISABLE_RXCRYPT; 1231 HFA384x_WEPFLAGS_DISABLE_RXCRYPT;
1236 result = 1232 result =
1237 hfa384x_drvr_setconfig16(hw, 1233 hfa384x_drvr_setconfig16(hw,
1238 HFA384x_RID_CNFWEPFLAGS, 1234 HFA384x_RID_CNFWEPFLAGS,
1239 word); 1235 word);
1240 } 1236 }
1241 1237
1242 if (result) { 1238 if (result) {
diff --git a/drivers/staging/wlan-ng/prism2mgmt.h b/drivers/staging/wlan-ng/prism2mgmt.h
index bdf2b3e03253..07eecebeb6cc 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 2fff0a110bcb..0cbbe510307e 100644
--- a/drivers/staging/wlan-ng/prism2mib.c
+++ b/drivers/staging/wlan-ng/prism2mib.c
@@ -113,8 +113,7 @@ static int prism2mib_flag(mibrec_t *mib,
113 p80211msg_dot11req_mibset_t *msg, void *data); 113 p80211msg_dot11req_mibset_t *msg, void *data);
114 114
115static int prism2mib_wepdefaultkey(mibrec_t *mib, 115static int prism2mib_wepdefaultkey(mibrec_t *mib,
116 int isget, 116 int isget, wlandevice_t *wlandev,
117 wlandevice_t * wlandev,
118 hfa384x_t *hw, 117 hfa384x_t *hw,
119 p80211msg_dot11req_mibset_t *msg, 118 p80211msg_dot11req_mibset_t *msg,
120 void *data); 119 void *data);
@@ -726,7 +725,7 @@ static int prism2mib_priv(mibrec_t *mib,
726 if (isget) { 725 if (isget) {
727 hfa384x_drvr_getconfig(hw, 726 hfa384x_drvr_getconfig(hw,
728 HFA384x_RID_CNFWPADATA, 727 HFA384x_RID_CNFWPADATA,
729 (u8 *) & wpa, 728 (u8 *) &wpa,
730 sizeof(wpa)); 729 sizeof(wpa));
731 pstr->len = le16_to_cpu(wpa.datalen); 730 pstr->len = le16_to_cpu(wpa.datalen);
732 memcpy(pstr->data, wpa.data, pstr->len); 731 memcpy(pstr->data, wpa.data, pstr->len);
@@ -736,9 +735,9 @@ static int prism2mib_priv(mibrec_t *mib,
736 735
737 result = 736 result =
738 hfa384x_drvr_setconfig(hw, 737 hfa384x_drvr_setconfig(hw,
739 HFA384x_RID_CNFWPADATA, 738 HFA384x_RID_CNFWPADATA,
740 (u8 *) & wpa, 739 (u8 *) &wpa,
741 sizeof(wpa)); 740 sizeof(wpa));
742 } 741 }
743 break; 742 break;
744 } 743 }
diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
index 50f301d65212..32a3db854625 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -64,7 +64,7 @@
64#include <linux/byteorder/generic.h> 64#include <linux/byteorder/generic.h>
65#include <linux/ctype.h> 65#include <linux/ctype.h>
66 66
67#include <asm/io.h> 67#include <linux/io.h>
68#include <linux/delay.h> 68#include <linux/delay.h>
69#include <asm/byteorder.h> 69#include <asm/byteorder.h>
70#include <linux/if_arp.h> 70#include <linux/if_arp.h>
@@ -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,9 +1280,8 @@ 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 *) &wlandev->ssid);
1285 wlandev->ssid);
1286 1285
1287 /* Collect the port status */ 1286 /* Collect the port status */
1288 result = hfa384x_drvr_getconfig16(hw, 1287 result = hfa384x_drvr_getconfig16(hw,
@@ -1368,8 +1367,8 @@ void prism2sta_processing_defer(struct work_struct *data)
1368 HFA384x_RID_CURRENTSSID, result); 1367 HFA384x_RID_CURRENTSSID, result);
1369 goto failed; 1368 goto failed;
1370 } 1369 }
1371 prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid, 1370 prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid,
1372 (p80211pstrd_t *) & wlandev->ssid); 1371 (p80211pstrd_t *) &wlandev->ssid);
1373 1372
1374 hw->link_status = HFA384x_LINK_CONNECTED; 1373 hw->link_status = HFA384x_LINK_CONNECTED;
1375 netif_carrier_on(wlandev->netdev); 1374 netif_carrier_on(wlandev->netdev);
@@ -2028,8 +2027,8 @@ void prism2sta_commsqual_defer(struct work_struct *data)
2028 HFA384x_RID_CURRENTSSID, result); 2027 HFA384x_RID_CURRENTSSID, result);
2029 goto done; 2028 goto done;
2030 } 2029 }
2031 prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid, 2030 prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid,
2032 (p80211pstrd_t *) & wlandev->ssid); 2031 (p80211pstrd_t *) &wlandev->ssid);
2033 2032
2034 /* Reschedule timer */ 2033 /* Reschedule timer */
2035 mod_timer(&hw->commsqual_timer, jiffies + HZ); 2034 mod_timer(&hw->commsqual_timer, jiffies + HZ);