Staging: wlan-ng: multiple safe style cleanups
authorSvenne Krap <svenne@krap.dk>
Sun, 14 Feb 2010 17:59:00 +0000 (18:59 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 4 Mar 2010 00:42:58 +0000 (16:42 -0800)
Cleanups as suggested by checkpatch.pl utiltiy.
.o's from before and after cleanup have matching SHA1s.

Signed-off-by: Svenne Krap <svenne@krap.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 files changed:
drivers/staging/wlan-ng/hfa384x.h
drivers/staging/wlan-ng/hfa384x_usb.c
drivers/staging/wlan-ng/p80211conv.c
drivers/staging/wlan-ng/p80211conv.h
drivers/staging/wlan-ng/p80211metadef.h
drivers/staging/wlan-ng/p80211mgmt.h
drivers/staging/wlan-ng/p80211netdev.c
drivers/staging/wlan-ng/p80211netdev.h
drivers/staging/wlan-ng/p80211req.c
drivers/staging/wlan-ng/p80211req.h
drivers/staging/wlan-ng/p80211types.h
drivers/staging/wlan-ng/p80211wext.c
drivers/staging/wlan-ng/prism2fw.c
drivers/staging/wlan-ng/prism2mgmt.c
drivers/staging/wlan-ng/prism2mgmt.h
drivers/staging/wlan-ng/prism2mib.c
drivers/staging/wlan-ng/prism2sta.c

index 46cce81..d93e6e9 100644 (file)
 
 /* Make a 32-bit flat address from AUX format 16-bit page and offset */
 #define                HFA384x_ADDR_AUX_MKFLAT(p, o)   \
-               (((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \
-               ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK))
+               ((((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \
+               ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK)))
 
 /* Make CMD format offset and page from a 32-bit flat address */
 #define                HFA384x_ADDR_CMD_MKPAGE(f) \
@@ -402,7 +402,7 @@ typedef struct hfa384x_authenticateStation_data {
 /*-- Configuration Record: WPAData       (data portion only) --*/
 typedef struct hfa384x_WPAData {
        u16 datalen;
-       u8 data[0];             // max 80
+       u8 data[0];             /* max 80 */
 } __attribute__ ((packed)) hfa384x_WPAData_t;
 
 /*--------------------------------------------------------------------
@@ -1133,7 +1133,7 @@ struct hfa384x;
 
 typedef void (*ctlx_cmdcb_t) (struct hfa384x *, const struct hfa384x_usbctlx *);
 
-typedef void (*ctlx_usercb_t) (struct hfa384x * hw,
+typedef void (*ctlx_usercb_t) (struct hfa384x *hw,
                               void *ctlxresult, void *usercb_data);
 
 typedef struct hfa384x_usbctlx {
@@ -1320,25 +1320,25 @@ typedef struct hfa384x {
 
 } hfa384x_t;
 
-void hfa384x_create(hfa384x_t * hw, struct usb_device *usb);
-void hfa384x_destroy(hfa384x_t * hw);
+void hfa384x_create(hfa384x_t *hw, struct usb_device *usb);
+void hfa384x_destroy(hfa384x_t *hw);
 
 int
-hfa384x_corereset(hfa384x_t * hw, int holdtime, int settletime, int genesis);
-int hfa384x_drvr_commtallies(hfa384x_t * hw);
-int hfa384x_drvr_disable(hfa384x_t * hw, u16 macport);
-int hfa384x_drvr_enable(hfa384x_t * hw, u16 macport);
-int hfa384x_drvr_flashdl_enable(hfa384x_t * hw);
-int hfa384x_drvr_flashdl_disable(hfa384x_t * hw);
-int hfa384x_drvr_flashdl_write(hfa384x_t * hw, u32 daddr, void *buf, u32 len);
-int hfa384x_drvr_getconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len);
-int hfa384x_drvr_ramdl_enable(hfa384x_t * hw, u32 exeaddr);
-int hfa384x_drvr_ramdl_disable(hfa384x_t * hw);
-int hfa384x_drvr_ramdl_write(hfa384x_t * hw, u32 daddr, void *buf, u32 len);
-int hfa384x_drvr_readpda(hfa384x_t * hw, void *buf, unsigned int len);
-int hfa384x_drvr_setconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len);
-
-static inline int hfa384x_drvr_getconfig16(hfa384x_t * hw, u16 rid, void *val)
+hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis);
+int hfa384x_drvr_commtallies(hfa384x_t *hw);
+int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport);
+int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport);
+int hfa384x_drvr_flashdl_enable(hfa384x_t *hw);
+int hfa384x_drvr_flashdl_disable(hfa384x_t *hw);
+int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len);
+int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len);
+int hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr);
+int hfa384x_drvr_ramdl_disable(hfa384x_t *hw);
+int hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len);
+int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len);
+int hfa384x_drvr_setconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len);
+
+static inline int hfa384x_drvr_getconfig16(hfa384x_t *hw, u16 rid, void *val)
 {
        int result = 0;
        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)
        return result;
 }
 
-static inline int hfa384x_drvr_setconfig16(hfa384x_t * hw, u16 rid, u16 val)
+static inline int hfa384x_drvr_setconfig16(hfa384x_t *hw, u16 rid, u16 val)
 {
        u16 value = cpu_to_le16(val);
        return hfa384x_drvr_setconfig(hw, rid, &value, sizeof(value));
 }
 
 int
-hfa384x_drvr_getconfig_async(hfa384x_t * hw,
+hfa384x_drvr_getconfig_async(hfa384x_t *hw,
                             u16 rid, ctlx_usercb_t usercb, void *usercb_data);
 
 int
-hfa384x_drvr_setconfig_async(hfa384x_t * hw,
+hfa384x_drvr_setconfig_async(hfa384x_t *hw,
                             u16 rid,
                             void *buf,
                             u16 len, ctlx_usercb_t usercb, void *usercb_data);
 
 static inline int
-hfa384x_drvr_setconfig16_async(hfa384x_t * hw, u16 rid, u16 val)
+hfa384x_drvr_setconfig16_async(hfa384x_t *hw, u16 rid, u16 val)
 {
        u16 value = cpu_to_le16(val);
        return hfa384x_drvr_setconfig_async(hw, rid, &value, sizeof(value),
                                            NULL, NULL);
 }
 
-int hfa384x_drvr_start(hfa384x_t * hw);
-int hfa384x_drvr_stop(hfa384x_t * hw);
+int hfa384x_drvr_start(hfa384x_t *hw);
+int hfa384x_drvr_stop(hfa384x_t *hw);
 int
-hfa384x_drvr_txframe(hfa384x_t * hw, struct sk_buff *skb,
-                    p80211_hdr_t * p80211_hdr, p80211_metawep_t * p80211_wep);
-void hfa384x_tx_timeout(wlandevice_t * wlandev);
-
-int hfa384x_cmd_initialize(hfa384x_t * hw);
-int hfa384x_cmd_enable(hfa384x_t * hw, u16 macport);
-int hfa384x_cmd_disable(hfa384x_t * hw, u16 macport);
-int hfa384x_cmd_allocate(hfa384x_t * hw, u16 len);
-int hfa384x_cmd_monitor(hfa384x_t * hw, u16 enable);
+hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb,
+                    p80211_hdr_t *p80211_hdr, p80211_metawep_t *p80211_wep);
+void hfa384x_tx_timeout(wlandevice_t *wlandev);
+
+int hfa384x_cmd_initialize(hfa384x_t *hw);
+int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport);
+int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport);
+int hfa384x_cmd_allocate(hfa384x_t *hw, u16 len);
+int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable);
 int
-hfa384x_cmd_download(hfa384x_t * hw,
+hfa384x_cmd_download(hfa384x_t *hw,
                     u16 mode, u16 lowaddr, u16 highaddr, u16 codelen);
 
 #endif /* __KERNEL__ */
index bd2eba3..612995b 100644 (file)
 #include <linux/usb.h>
 #include <linux/byteorder/generic.h>
 
-#define SUBMIT_URB(u,f)  usb_submit_urb(u,f)
+#define SUBMIT_URB(u, f)  usb_submit_urb(u, f)
 
 #include "p80211types.h"
 #include "p80211hdr.h"
@@ -627,7 +627,7 @@ static hfa384x_usbctlx_t *usbctlx_alloc(void)
 {
        hfa384x_usbctlx_t *ctlx;
 
-       ctlx = kmalloc(sizeof(*ctlx), in_interrupt()? GFP_ATOMIC : GFP_KERNEL);
+       ctlx = kmalloc(sizeof(*ctlx), in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
        if (ctlx != NULL) {
                memset(ctlx, 0, sizeof(*ctlx));
                init_completion(&ctlx->done);
@@ -675,7 +675,7 @@ struct usbctlx_cmd_completor {
 };
 typedef struct usbctlx_cmd_completor usbctlx_cmd_completor_t;
 
-static int usbctlx_cmd_completor_fn(usbctlx_completor_t * head)
+static int usbctlx_cmd_completor_fn(usbctlx_completor_t *head)
 {
        usbctlx_cmd_completor_t *complete = (usbctlx_cmd_completor_t *) head;
        return usbctlx_get_status(complete->cmdresp, complete->result);
@@ -3649,7 +3649,7 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev,
                /* check for unencrypted stuff if WEP bit set. */
                if (*(datap - hdrlen + 1) & 0x40)       /* wep set */
                        if ((*(datap) == 0xaa) && (*(datap + 1) == 0xaa))
-                               *(datap - hdrlen + 1) &= 0xbf;  // clear wep; it's the 802.2 header!
+                               *(datap - hdrlen + 1) &= 0xbf;  /* clear wep; it's the 802.2 header! */
        }
 
        if (hw->sniff_fcs) {
index 5952c67..99c5ec4 100644 (file)
@@ -206,12 +206,12 @@ int skb_ether_to_p80211(wlandevice_t *wlandev, u32 ethconv,
                /* XXXX need to pick keynum other than default? */
 
                p80211_wep->data = kmalloc(skb->len, GFP_ATOMIC);
-
-               if ((foo = wep_encrypt(wlandev, skb->data, p80211_wep->data,
-                                      skb->len,
-                                      (wlandev->hostwep &
-                                       HOSTWEP_DEFAULTKEY_MASK),
-                                      p80211_wep->iv, p80211_wep->icv))) {
+               foo = wep_encrypt(wlandev, skb->data, p80211_wep->data,
+                       skb->len,
+                       (wlandev->hostwep &
+                       HOSTWEP_DEFAULTKEY_MASK),
+                       p80211_wep->iv, p80211_wep->icv);
+               if (foo) {
                        printk(KERN_WARNING
                               "Host en-WEP failed, dropping frame (%d).\n",
                               foo);
@@ -323,11 +323,12 @@ int skb_p80211_to_ether(wlandevice_t *wlandev, u32 ethconv,
                               skb->len);
                        return 1;
                }
-               if ((foo = wep_decrypt(wlandev, skb->data + payload_offset + 4,
-                                      payload_length - 8, -1,
-                                      skb->data + payload_offset,
-                                      skb->data + payload_offset +
-                                      payload_length - 4))) {
+               foo = wep_decrypt(wlandev, skb->data + payload_offset + 4,
+                       payload_length - 8, -1,
+                       skb->data + payload_offset,
+                       skb->data + payload_offset +
+                       payload_length - 4);
+               if (foo) {
                        /* de-wep failed, drop skb. */
                        pr_debug("Host de-WEP failed, dropping frame (%d).\n",
                                 foo);
index 0c62df1..6fe163b 100644 (file)
@@ -153,8 +153,8 @@ struct wlandevice;
 int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv,
                        struct sk_buff *skb);
 int skb_ether_to_p80211(struct wlandevice *wlandev, u32 ethconv,
-                       struct sk_buff *skb, p80211_hdr_t * p80211_hdr,
-                       p80211_metawep_t * p80211_wep);
+                       struct sk_buff *skb, p80211_hdr_t *p80211_hdr,
+                       p80211_metawep_t *p80211_wep);
 
 int p80211_stt_findproto(u16 proto);
 
index da8b6f5..1060528 100644 (file)
                        (P80211DID_MKSECTION(2) | \
                        P80211DID_MKGROUP(1))
 #define DIDmib_dot11mac_dot11OperationTable_dot11MACAddress \
-                        (P80211DID_MKSECTION(2) | \
-                        P80211DID_MKGROUP(1) | \
-                        P80211DID_MKITEM(1) | 0x18000000)
+                       ((P80211DID_MKSECTION(2) | \
+                       P80211DID_MKGROUP(1) | \
+                       P80211DID_MKITEM(1) | 0x18000000))
 #define DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold \
                        (P80211DID_MKSECTION(2) | \
                        P80211DID_MKGROUP(1) | \
                        P80211DID_MKGROUP(1) | \
                        P80211DID_MKITEM(5) | 0x18000000)
 #define DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime \
-                       (P80211DID_MKSECTION(2) | \
-                       P80211DID_MKGROUP(1) | \
-                       P80211DID_MKITEM(6) | 0x10000000)
+                       (P80211DID_MKSECTION(2) | \
+                       P80211DID_MKGROUP(1) | \
+                       P80211DID_MKITEM(6) | 0x10000000)
 #define DIDmib_cat_dot11phy \
                        P80211DID_MKSECTION(3)
 #define DIDmib_dot11phy_dot11PhyOperationTable \
                        (P80211DID_MKSECTION(3) | \
                        P80211DID_MKGROUP(1))
 #define DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel \
-                       (P80211DID_MKSECTION(3) | \
-                       P80211DID_MKGROUP(3) | \
-                       P80211DID_MKITEM(10) | 0x18000000)
+                       (P80211DID_MKSECTION(3) | \
+                       P80211DID_MKGROUP(3) | \
+                       P80211DID_MKITEM(10) | 0x18000000)
 #define DIDmib_dot11phy_dot11PhyDSSSTable \
                        (P80211DID_MKSECTION(3) | \
                        P80211DID_MKGROUP(5))
index 14cdc86..deb52f5 100644 (file)
 #ifndef _P80211MGMT_H
 #define _P80211MGMT_H
 
-#ifndef  _P80211HDR_H
+#ifndef _P80211HDR_H
 #include "p80211hdr.h"
 #endif
 
@@ -496,25 +496,25 @@ typedef struct wlan_fr_deauthen {
 
 } wlan_fr_deauthen_t;
 
-void wlan_mgmt_encode_beacon(wlan_fr_beacon_t * f);
-void wlan_mgmt_decode_beacon(wlan_fr_beacon_t * f);
-void wlan_mgmt_encode_disassoc(wlan_fr_disassoc_t * f);
-void wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t * f);
-void wlan_mgmt_encode_assocreq(wlan_fr_assocreq_t * f);
-void wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t * f);
-void wlan_mgmt_encode_assocresp(wlan_fr_assocresp_t * f);
-void wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t * f);
-void wlan_mgmt_encode_reassocreq(wlan_fr_reassocreq_t * f);
-void wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t * f);
-void wlan_mgmt_encode_reassocresp(wlan_fr_reassocresp_t * f);
-void wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t * f);
-void wlan_mgmt_encode_probereq(wlan_fr_probereq_t * f);
-void wlan_mgmt_decode_probereq(wlan_fr_probereq_t * f);
-void wlan_mgmt_encode_proberesp(wlan_fr_proberesp_t * f);
-void wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t * f);
-void wlan_mgmt_encode_authen(wlan_fr_authen_t * f);
-void wlan_mgmt_decode_authen(wlan_fr_authen_t * f);
-void wlan_mgmt_encode_deauthen(wlan_fr_deauthen_t * f);
-void wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t * f);
+void wlan_mgmt_encode_beacon(wlan_fr_beacon_t *f);
+void wlan_mgmt_decode_beacon(wlan_fr_beacon_t *f);
+void wlan_mgmt_encode_disassoc(wlan_fr_disassoc_t *f);
+void wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t *f);
+void wlan_mgmt_encode_assocreq(wlan_fr_assocreq_t *f);
+void wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t *f);
+void wlan_mgmt_encode_assocresp(wlan_fr_assocresp_t *f);
+void wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t *f);
+void wlan_mgmt_encode_reassocreq(wlan_fr_reassocreq_t *f);
+void wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t *f);
+void wlan_mgmt_encode_reassocresp(wlan_fr_reassocresp_t *f);
+void wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t *f);
+void wlan_mgmt_encode_probereq(wlan_fr_probereq_t *f);
+void wlan_mgmt_decode_probereq(wlan_fr_probereq_t *f);
+void wlan_mgmt_encode_proberesp(wlan_fr_proberesp_t *f);
+void wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t *f);
+void wlan_mgmt_encode_authen(wlan_fr_authen_t *f);
+void wlan_mgmt_decode_authen(wlan_fr_authen_t *f);
+void wlan_mgmt_encode_deauthen(wlan_fr_deauthen_t *f);
+void wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t *f);
 
 #endif /* _P80211MGMT_H */
index 22424c8..763ab11 100644 (file)
@@ -586,7 +586,8 @@ static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
        }
 
        /* Allocate a buf of size req->len */
-       if ((msgbuf = kmalloc(req->len, GFP_KERNEL))) {
+       msgbuf = kmalloc(req->len, GFP_KERNEL);
+       if (msgbuf) {
                if (copy_from_user(msgbuf, (void __user *)req->data, req->len))
                        result = -EFAULT;
                else
@@ -646,7 +647,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
 
        /* Set up some convenience pointers. */
        mibattr = &dot11req.mibattribute;
-       macaddr = (p80211item_pstr6_t *) & mibattr->data;
+       macaddr = (p80211item_pstr6_t *) &mibattr->data;
        resultcode = &dot11req.resultcode;
 
        /* Set up a dot11req_mibset */
@@ -674,7 +675,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
        resultcode->data = 0;
 
        /* now fire the request */
-       result = p80211req_dorequest(dev->ml_priv, (u8 *) & dot11req);
+       result = p80211req_dorequest(dev->ml_priv, (u8 *) &dot11req);
 
        /* If the request wasn't successful, report an error and don't
         * change the netdev address
index 8bd9dfb..3c8c648 100644 (file)
@@ -179,16 +179,16 @@ typedef struct wlandevice {
        unsigned int ethconv;
 
        /* device methods (init by MSD, used by p80211 */
-       int (*open) (struct wlandevice * wlandev);
-       int (*close) (struct wlandevice * wlandev);
-       void (*reset) (struct wlandevice * wlandev);
-       int (*txframe) (struct wlandevice * wlandev, struct sk_buff * skb,
-                       p80211_hdr_t * p80211_hdr,
-                       p80211_metawep_t * p80211_wep);
-       int (*mlmerequest) (struct wlandevice * wlandev, p80211msg_t * msg);
-       int (*set_multicast_list) (struct wlandevice * wlandev,
-                                  netdevice_t * dev);
-       void (*tx_timeout) (struct wlandevice * wlandev);
+       int (*open) (struct wlandevice *wlandev);
+       int (*close) (struct wlandevice *wlandev);
+       void (*reset) (struct wlandevice *wlandev);
+       int (*txframe) (struct wlandevice *wlandev, struct sk_buff *skb,
+                       p80211_hdr_t *p80211_hdr,
+                       p80211_metawep_t *p80211_wep);
+       int (*mlmerequest) (struct wlandevice *wlandev, p80211msg_t *msg);
+       int (*set_multicast_list) (struct wlandevice *wlandev,
+                                  netdevice_t *dev);
+       void (*tx_timeout) (struct wlandevice *wlandev);
 
        /* 802.11 State */
        u8 bssid[WLAN_BSSID_LEN];
@@ -227,16 +227,16 @@ typedef struct wlandevice {
 } wlandevice_t;
 
 /* WEP stuff */
-int wep_change_key(wlandevice_t * wlandev, int keynum, u8 * key, int keylen);
-int wep_decrypt(wlandevice_t * wlandev, u8 * buf, u32 len, int key_override,
-               u8 * iv, u8 * icv);
-int wep_encrypt(wlandevice_t * wlandev, u8 * buf, u8 * dst, u32 len, int keynum,
-               u8 * iv, u8 * icv);
-
-int wlan_setup(wlandevice_t * wlandev);
-int wlan_unsetup(wlandevice_t * wlandev);
-int register_wlandev(wlandevice_t * wlandev);
-int unregister_wlandev(wlandevice_t * wlandev);
-void p80211netdev_rx(wlandevice_t * wlandev, struct sk_buff *skb);
-void p80211netdev_hwremoved(wlandevice_t * wlandev);
+int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen);
+int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override,
+               u8 *iv, u8 *icv);
+int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum,
+               u8 *iv, u8 *icv);
+
+int wlan_setup(wlandevice_t *wlandev);
+int wlan_unsetup(wlandevice_t *wlandev);
+int register_wlandev(wlandevice_t *wlandev);
+int unregister_wlandev(wlandevice_t *wlandev);
+void p80211netdev_rx(wlandevice_t *wlandev, struct sk_buff *skb);
+void p80211netdev_hwremoved(wlandevice_t *wlandev);
 #endif
index c88156c..c2e95f1 100644 (file)
@@ -94,7 +94,7 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev,
 *      Potentially blocks the caller, so it's a good idea to
 *      not call this function from an interrupt context.
 ----------------------------------------------------------------*/
-int p80211req_dorequest(wlandevice_t * wlandev, u8 * msgbuf)
+int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf)
 {
        int result = 0;
        p80211msg_t *msg = (p80211msg_t *) msgbuf;
index 5d91767..a95a45a 100644 (file)
@@ -48,6 +48,6 @@
 #ifndef _LINUX_P80211REQ_H
 #define _LINUX_P80211REQ_H
 
-int p80211req_dorequest(wlandevice_t * wlandev, u8 * msgbuf);
+int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf);
 
 #endif
index 2b83ab0..41a99c5 100644 (file)
                                        P80211DID_MASK_ISTABLE, \
                                        P80211DID_LSB_ISTABLE)
 
-#define P80211DID_MKID(s,g,i,n,t,a)    (P80211DID_MKSECTION(s) | \
-                                               P80211DID_MKGROUP(g) | \
-                                               P80211DID_MKITEM(i) | \
-                                               P80211DID_MKINDEX(n) | \
-                                               P80211DID_MKISTABLE(t) | \
-                                               (a))
+#define P80211DID_MKID(s, g, i, n, t, a)       (P80211DID_MKSECTION(s) | \
+                                       P80211DID_MKGROUP(g) | \
+                                       P80211DID_MKITEM(i) | \
+                                       P80211DID_MKINDEX(n) | \
+                                       P80211DID_MKISTABLE(t) | \
+                                       (a))
 
 #define P80211DID_GET(a, m, l) ((((u32)(a)) >> (l)) & (m))
 
@@ -340,11 +340,11 @@ struct catlistitem;
 /*  metadata items.  Some components may choose to use more, */
 /*  less or different metadata items. */
 
-typedef void (*p80211_totext_t) (struct catlistitem *, u32 did, u8 * itembuf,
+typedef void (*p80211_totext_t) (struct catlistitem *, u32 did, u8 *itembuf,
                                 char *textbuf);
-typedef void (*p80211_fromtext_t) (struct catlistitem *, u32 did, u8 * itembuf,
+typedef void (*p80211_fromtext_t) (struct catlistitem *, u32 did, u8 *itembuf,
                                   char *textbuf);
-typedef u32(*p80211_valid_t) (struct catlistitem *, u32 did, u8 * itembuf);
+typedef u32(*p80211_valid_t) (struct catlistitem *, u32 did, u8 *itembuf);
 
 /*----------------------------------------------------------------*/
 /* Enumeration Lists */
index cc4b1ca..9fb9532 100644 (file)
@@ -138,7 +138,7 @@ static int p80211wext_dorequest(wlandevice_t *wlandev, u32 did, u32 data)
        mibitem.did = did;
        mibitem.data = data;
        memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
        return result;
 }
@@ -175,7 +175,7 @@ static int p80211wext_autojoin(wlandevice_t *wlandev)
        memcpy(msg.ssid.data.data, ssid, data.length);
        msg.ssid.data.len = data.length;
 
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
        if (result) {
                err = -EFAULT;
@@ -212,7 +212,7 @@ struct iw_statistics *p80211wext_get_wireless_stats(netdevice_t *dev)
        if (wlandev->mlmerequest == NULL)
                return NULL;
 
-       retval = wlandev->mlmerequest(wlandev, (p80211msg_t *) & quality);
+       retval = wlandev->mlmerequest(wlandev, (p80211msg_t *) &quality);
 
        wstats->qual.qual = qual_as_percent(quality.link.data); /* overall link quality */
        wstats->qual.level = quality.level.data;        /* instant signal level */
@@ -273,7 +273,7 @@ static int p80211wext_giwfreq(netdevice_t *dev,
        memset(&mibitem, 0, sizeof(mibitem));
        mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel;
        memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
        if (result) {
                err = -EFAULT;
@@ -321,7 +321,7 @@ static int p80211wext_siwfreq(netdevice_t *dev,
                mibitem.data = p80211_mhz_to_channel(freq->m);
 
        memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
        if (result) {
                err = -EFAULT;
@@ -403,7 +403,7 @@ static int p80211wext_siwmode(netdevice_t *dev,
        mibitem.did = DIDmib_p2_p2Static_p2CnfPortType;
        mibitem.data = (*mode == IW_MODE_ADHOC) ? 0 : 1;
        memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
        if (result)
                err = -EFAULT;
@@ -553,7 +553,8 @@ static int p80211wext_siwencode(netdevice_t *dev,
        }
 
        /* Check the Key index first. */
-       if ((i = (erq->flags & IW_ENCODE_INDEX))) {
+    i = (erq->flags & IW_ENCODE_INDEX);
+       if (i) {
 
                if ((i < 1) || (i > NUM_WEPKEYS)) {
                        err = -EINVAL;
@@ -625,7 +626,7 @@ static int p80211wext_siwencode(netdevice_t *dev,
 
                        msg.msgcode = DIDmsg_dot11req_mibset;
                        memcpy(&msg.mibattribute.data, &pstr, sizeof(pstr));
-                       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+                       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
                        if (result) {
                                err = -EFAULT;
@@ -733,7 +734,7 @@ static int p80211wext_siwessid(netdevice_t *dev,
        msg.ssid.data.len = length;
 
        pr_debug("autojoin_ssid for %s \n", essid);
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
        pr_debug("autojoin_ssid %d\n", result);
 
        if (result) {
@@ -778,7 +779,7 @@ static int p80211wext_giwrate(netdevice_t *dev,
        memset(&mibitem, 0, sizeof(mibitem));
        mibitem.did = DIDmib_p2_p2MAC_p2CurrentTxRate;
        memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
        if (result) {
                err = -EFAULT;
@@ -830,7 +831,7 @@ static int p80211wext_giwrts(netdevice_t *dev,
        memset(&mibitem, 0, sizeof(mibitem));
        mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold;
        memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
        if (result) {
                err = -EFAULT;
@@ -871,7 +872,7 @@ static int p80211wext_siwrts(netdevice_t *dev,
                mibitem.data = rts->value;
 
        memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
        if (result) {
                err = -EFAULT;
@@ -897,7 +898,7 @@ static int p80211wext_giwfrag(netdevice_t *dev,
        mibitem.did =
            DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold;
        memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
        if (result) {
                err = -EFAULT;
@@ -940,7 +941,7 @@ static int p80211wext_siwfrag(netdevice_t *dev,
                mibitem.data = frag->value;
 
        memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
        if (result) {
                err = -EFAULT;
@@ -975,7 +976,7 @@ static int p80211wext_giwretry(netdevice_t *dev,
        mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit;
 
        memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
        if (result) {
                err = -EFAULT;
@@ -989,7 +990,7 @@ static int p80211wext_giwretry(netdevice_t *dev,
        mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit;
 
        memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
        if (result) {
                err = -EFAULT;
@@ -1004,7 +1005,7 @@ static int p80211wext_giwretry(netdevice_t *dev,
            DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime;
 
        memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
        if (result) {
                err = -EFAULT;
@@ -1067,7 +1068,7 @@ static int p80211wext_siwretry(netdevice_t *dev,
                mibitem.data = rrq->value /= 1024;
 
                memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
-               result = p80211req_dorequest(wlandev, (u8 *) & msg);
+               result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
                if (result) {
                        err = -EFAULT;
@@ -1081,7 +1082,7 @@ static int p80211wext_siwretry(netdevice_t *dev,
 
                        memcpy(&msg.mibattribute.data, &mibitem,
                               sizeof(mibitem));
-                       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+                       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
                        if (result) {
                                err = -EFAULT;
@@ -1096,7 +1097,7 @@ static int p80211wext_siwretry(netdevice_t *dev,
 
                        memcpy(&msg.mibattribute.data, &mibitem,
                               sizeof(mibitem));
-                       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+                       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
                        if (result) {
                                err = -EFAULT;
@@ -1134,7 +1135,7 @@ static int p80211wext_siwtxpow(netdevice_t *dev,
        else
                mibitem.data = rrq->value;
        memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
        if (result) {
                err = -EFAULT;
@@ -1162,7 +1163,7 @@ static int p80211wext_giwtxpow(netdevice_t *dev,
            DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel;
 
        memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
 
        if (result) {
                err = -EFAULT;
@@ -1310,7 +1311,7 @@ static int p80211wext_siwscan(netdevice_t *dev,
        msg.maxchanneltime.data = 250;
        msg.minchanneltime.data = 200;
 
-       result = p80211req_dorequest(wlandev, (u8 *) & msg);
+       result = p80211req_dorequest(wlandev, (u8 *) &msg);
        if (result)
                err = prism2_result2err(msg.resultcode.data);
 
@@ -1429,7 +1430,7 @@ static int p80211wext_giwscan(netdevice_t *dev,
                msg.msgcode = DIDmsg_dot11req_scan_results;
                msg.bssindex.data = i;
 
-               result = p80211req_dorequest(wlandev, (u8 *) & msg);
+               result = p80211req_dorequest(wlandev, (u8 *) &msg);
                if ((result != 0) ||
                    (msg.resultcode.data != P80211ENUM_resultcode_success)) {
                        break;
@@ -1504,7 +1505,7 @@ static int p80211wext_set_encodeext(struct net_device *dev,
                memcpy(wlandev->wep_keys[idx], ext->key, ext->key_len);
 
                memset(&msg, 0, sizeof(msg));
-               pstr = (p80211item_pstr32_t *) & msg.mibattribute.data;
+               pstr = (p80211item_pstr32_t *) &msg.mibattribute.data;
                memcpy(pstr->data.data, ext->key, ext->key_len);
                pstr->data.len = ext->key_len;
                switch (idx) {
@@ -1528,7 +1529,7 @@ static int p80211wext_set_encodeext(struct net_device *dev,
                        break;
                }
                msg.msgcode = DIDmsg_dot11req_mibset;
-               result = p80211req_dorequest(wlandev, (u8 *) & msg);
+               result = p80211req_dorequest(wlandev, (u8 *) &msg);
                pr_debug("result (%d)\n", result);
        }
        return result;
@@ -1748,7 +1749,7 @@ struct iw_handler_def p80211wext_handler_def = {
        .get_wireless_stats = p80211wext_get_wireless_stats
 };
 
-int p80211wext_event_associated(wlandevice_t * wlandev, int assoc)
+int p80211wext_event_associated(wlandevice_t *wlandev, int assoc)
 {
        union iwreq_data data;
 
index 5e95c48..baa20a7 100644 (file)
@@ -265,7 +265,7 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)
        /* Build the PDA we're going to use. */
        if (read_cardpda(&pda, wlandev)) {
                printk(KERN_ERR "load_cardpda failed, exiting.\n");
-               return (1);
+               return 1;
        }
 
        /* read the card's PRI-SUP */
@@ -287,9 +287,8 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)
 
        /* DIDmsg_dot11req_mibget */
        prism2mgmt_mibset_mibget(wlandev, &getmsg);
-       if (getmsg.resultcode.data != P80211ENUM_resultcode_success) {
+       if (getmsg.resultcode.data != P80211ENUM_resultcode_success)
                printk(KERN_ERR "Couldn't fetch PRI-SUP info\n");
-       }
 
        /* Already in host order */
        priid.role = *data++;
@@ -302,19 +301,19 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)
        result = read_fwfile(rfptr);
        if (result) {
                printk(KERN_ERR "Failed to read the data exiting.\n");
-               return (1);
+               return 1;
        }
 
        result = validate_identity();
 
        if (result) {
                printk(KERN_ERR "Incompatible firmware image.\n");
-               return (1);
+               return 1;
        }
 
        if (startaddr == 0x00000000) {
                printk(KERN_ERR "Can't RAM download a Flash image!\n");
-               return (1);
+               return 1;
        }
 
        /* Make the image chunks */
@@ -324,20 +323,20 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)
        result = plugimage(fchunk, nfchunks, s3plug, ns3plug, &pda);
        if (result) {
                printk(KERN_ERR "Failed to plug data.\n");
-               return (1);
+               return 1;
        }
 
        /* Insert any CRCs */
        if (crcimage(fchunk, nfchunks, s3crc, ns3crc)) {
                printk(KERN_ERR "Failed to insert all CRCs\n");
-               return (1);
+               return 1;
        }
 
        /* Write the image */
        result = writeimage(wlandev, fchunk, nfchunks);
        if (result) {
                printk(KERN_ERR "Failed to ramwrite image data.\n");
-               return (1);
+               return 1;
        }
 
        /* clear any allocated memory */
@@ -435,9 +434,8 @@ void free_chunks(imgchunk_t *fchunk, unsigned int *nfchunks)
 {
        int i;
        for (i = 0; i < *nfchunks; i++) {
-               if (fchunk[i].data != NULL) {
+               if (fchunk[i].data != NULL)
                        kfree(fchunk[i].data);
-               }
        }
        *nfchunks = 0;
        memset(fchunk, 0, sizeof(*fchunk));
@@ -532,7 +530,7 @@ int mkimage(imgchunk_t *clist, unsigned int *ccnt)
                if (clist[i].data == NULL) {
                        printk(KERN_ERR
                               "failed to allocate image space, exitting.\n");
-                       return (1);
+                       return 1;
                }
                memset(clist[i].data, 0, clist[i].len);
                pr_debug("chunk[%d]: addr=0x%06x len=%d\n",
@@ -546,15 +544,14 @@ int mkimage(imgchunk_t *clist, unsigned int *ccnt)
                for (j = 0; j < *ccnt; j++) {
                        cstart = clist[j].addr;
                        cend = cstart + clist[j].len - 1;
-                       if (s3start >= cstart && s3end <= cend) {
+                       if (s3start >= cstart && s3end <= cend)
                                break;
-                       }
                }
                if (((unsigned int)j) >= (*ccnt)) {
                        printk(KERN_ERR
                               "s3rec(a=0x%06x,l=%d), no chunk match, exiting.\n",
                               s3start, s3data[i].len);
-                       return (1);
+                       return 1;
                }
                coffset = s3start - cstart;
                memcpy(clist[j].data + coffset, s3data[i].data, s3data[i].len);
@@ -587,7 +584,7 @@ int mkpdrlist(pda_t *pda)
        curroff = 0;
        while (curroff < (HFA384x_PDA_LEN_MAX / 2) &&
               le16_to_cpu(pda16[curroff + 1]) != HFA384x_PDR_END_OF_PDA) {
-               pda->rec[pda->nrec] = (hfa384x_pdrec_t *) & (pda16[curroff]);
+               pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]);
 
                if (le16_to_cpu(pda->rec[pda->nrec]->code) == HFA384x_PDR_NICID) {
                        memcpy(&nicid, &pda->rec[pda->nrec]->data.nicid,
@@ -624,10 +621,10 @@ int mkpdrlist(pda_t *pda)
                printk(KERN_ERR
                       "no end record found or invalid lengths in "
                       "PDR data, exiting. %x %d\n", curroff, pda->nrec);
-               return (1);
+               return 1;
        }
        if (le16_to_cpu(pda16[curroff + 1]) == HFA384x_PDR_END_OF_PDA) {
-               pda->rec[pda->nrec] = (hfa384x_pdrec_t *) & (pda16[curroff]);
+               pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]);
                (pda->nrec)++;
        }
        return result;
@@ -870,7 +867,7 @@ int read_fwfile(const struct ihex_binrec *record)
                ptr16 = (u16 *) record->data;
 
                /* parse what was an S3 srec and put it in the right array */
-               switch(addr) {
+               switch (addr) {
                case S3ADDR_START:
                        startaddr = *ptr32;
                        pr_debug("  S7 start addr, record=%d "
@@ -891,7 +888,7 @@ int read_fwfile(const struct ihex_binrec *record)
                                      s3plug[ns3plug].len);
 
                        ns3plug++;
-                       if ( ns3plug == S3PLUG_MAX ) {
+                       if (ns3plug == S3PLUG_MAX) {
                                printk(KERN_ERR "S3 plugrec limit reached - aborting\n");
                                return 1;
                        }
@@ -908,7 +905,7 @@ int read_fwfile(const struct ihex_binrec *record)
                                      s3crc[ns3crc].len,
                                      s3crc[ns3crc].dowrite);
                        ns3crc++;
-                       if ( ns3crc == S3CRC_MAX ) {
+                       if (ns3crc == S3CRC_MAX) {
                                printk(KERN_ERR "S3 crcrec limit reached - aborting\n");
                                return 1;
                        }
@@ -922,12 +919,12 @@ int read_fwfile(const struct ihex_binrec *record)
                                      rcnt,
                                      s3info[ns3info].len,
                                      s3info[ns3info].type);
-                       if ( ((s3info[ns3info].len - 1) * sizeof(u16)) > sizeof(s3info[ns3info].info) ) {
+                       if (((s3info[ns3info].len - 1) * sizeof(u16)) > sizeof(s3info[ns3info].info)) {
                                printk(KERN_ERR " S3 inforec length too long - aborting\n");
                                return 1;
                        }
 
-                       tmpinfo = (u16*)&(s3info[ns3info].info.version);
+                       tmpinfo = (u16 *)&(s3info[ns3info].info.version);
                        pr_debug("            info=");
                        for (i = 0; i < s3info[ns3info].len - 1; i++) {
                                tmpinfo[i] = *(ptr16 + 2 + i);
@@ -936,7 +933,7 @@ int read_fwfile(const struct ihex_binrec *record)
                        pr_debug("\n");
 
                        ns3info++;
-                       if ( ns3info == S3INFO_MAX ) {
+                       if (ns3info == S3INFO_MAX) {
                                printk(KERN_ERR "S3 inforec limit reached - aborting\n");
                                return 1;
                        }
@@ -946,7 +943,7 @@ int read_fwfile(const struct ihex_binrec *record)
                        s3data[ns3data].len = len;
                        s3data[ns3data].data = (uint8_t *) record->data;
                        ns3data++;
-                       if ( ns3data == S3DATA_MAX ) {
+                       if (ns3data == S3DATA_MAX) {
                                printk(KERN_ERR "S3 datarec limit reached - aborting\n");
                                return 1;
                        }
@@ -1024,7 +1021,7 @@ int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk,
        rstatemsg.enable.data = P80211ENUM_truth_true;
        rstatemsg.exeaddr.data = startaddr;
 
-       msgp = (p80211msg_t *) & rstatemsg;
+       msgp = (p80211msg_t *) &rstatemsg;
        result = prism2mgmt_ramdl_state(wlandev, msgp);
        if (result) {
                printk(KERN_ERR
@@ -1064,7 +1061,7 @@ int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk,
                            ("Sending xxxdl_write message addr=%06x len=%d.\n",
                             currdaddr, currlen);
 
-                       msgp = (p80211msg_t *) & rwritemsg;
+                       msgp = (p80211msg_t *) &rwritemsg;
                        result = prism2mgmt_ramdl_write(wlandev, msgp);
 
                        /* Check the results */
@@ -1091,7 +1088,7 @@ int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk,
        rstatemsg.enable.data = P80211ENUM_truth_false;
        rstatemsg.exeaddr.data = 0;
 
-       msgp = (p80211msg_t *) & rstatemsg;
+       msgp = (p80211msg_t *) &rstatemsg;
        result = prism2mgmt_ramdl_state(wlandev, msgp);
        if (result) {
                printk(KERN_ERR
@@ -1162,7 +1159,7 @@ int validate_identity(void)
                        /* SEC compat range */
                        if ((s3info[i].info.compat.role == 1) &&
                            (s3info[i].info.compat.id == 4)) {
-
+                /* FIXME: isn't something missing here? */
                        }
 
                        break;
@@ -1197,8 +1194,9 @@ int validate_identity(void)
                        pr_debug("Unknown inforec type %d\n", s3info[i].type);
                }
        }
-       // walk through
+       /* walk through */
 
-       if (trump && (result != 2)) result = 0;
+       if (trump && (result != 2))
+               result = 0;
        return result;
 }
index 9f7d96c..eb7469e 100644 (file)
@@ -541,7 +541,7 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
        /*** STATION ***/
        /* Set the REQUIRED config items */
        /* SSID */
-       pstr = (p80211pstrd_t *) & (msg->ssid.data);
+       pstr = (p80211pstrd_t *) &(msg->ssid.data);
        prism2mgmt_pstr2bytestr(p2bytestr, pstr);
        result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID,
                                        bytebuf, HFA384x_RID_CNFOWNSSID_LEN);
@@ -1034,7 +1034,7 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp)
 
        /* Set the ssid */
        memset(bytebuf, 0, 256);
-       pstr = (p80211pstrd_t *) & (msg->ssid.data);
+       pstr = (p80211pstrd_t *) &(msg->ssid.data);
        prism2mgmt_pstr2bytestr(p2bytestr, pstr);
        result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID,
                                        bytebuf,
index bdf2b3e..07eeceb 100644 (file)
 extern int prism2_reset_holdtime;
 extern int prism2_reset_settletime;
 
-u32 prism2sta_ifstate(wlandevice_t * wlandev, u32 ifstate);
+u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate);
 
-void prism2sta_ev_info(wlandevice_t * wlandev, hfa384x_InfFrame_t * inf);
-void prism2sta_ev_txexc(wlandevice_t * wlandev, u16 status);
-void prism2sta_ev_tx(wlandevice_t * wlandev, u16 status);
-void prism2sta_ev_rx(wlandevice_t * wlandev, struct sk_buff *skb);
-void prism2sta_ev_alloc(wlandevice_t * wlandev);
+void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf);
+void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status);
+void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status);
+void prism2sta_ev_rx(wlandevice_t *wlandev, struct sk_buff *skb);
+void prism2sta_ev_alloc(wlandevice_t *wlandev);
 
-int prism2mgmt_mibset_mibget(wlandevice_t * wlandev, void *msgp);
-int prism2mgmt_scan(wlandevice_t * wlandev, void *msgp);
-int prism2mgmt_scan_results(wlandevice_t * wlandev, void *msgp);
-int prism2mgmt_start(wlandevice_t * wlandev, void *msgp);
-int prism2mgmt_wlansniff(wlandevice_t * wlandev, void *msgp);
-int prism2mgmt_readpda(wlandevice_t * wlandev, void *msgp);
-int prism2mgmt_ramdl_state(wlandevice_t * wlandev, void *msgp);
-int prism2mgmt_ramdl_write(wlandevice_t * wlandev, void *msgp);
-int prism2mgmt_flashdl_state(wlandevice_t * wlandev, void *msgp);
-int prism2mgmt_flashdl_write(wlandevice_t * wlandev, void *msgp);
-int prism2mgmt_autojoin(wlandevice_t * wlandev, void *msgp);
+int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp);
+int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp);
+int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp);
+int prism2mgmt_start(wlandevice_t *wlandev, void *msgp);
+int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp);
+int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp);
+int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp);
+int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp);
+int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp);
+int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp);
+int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp);
 
 /*---------------------------------------------------------------
 * conversion functions going between wlan message data types and
 * Prism2 data types
 ---------------------------------------------------------------*/
 /* byte area conversion functions*/
-void prism2mgmt_pstr2bytearea(u8 * bytearea, p80211pstrd_t * pstr);
-void prism2mgmt_bytearea2pstr(u8 * bytearea, p80211pstrd_t * pstr, int len);
+void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr);
+void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len);
 
 /* byte string conversion functions*/
-void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr);
-void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr);
+void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr);
+void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr);
 
 /* functions to convert Group Addresses */
-void prism2mgmt_get_grpaddr(u32 did, p80211pstrd_t * pstr, hfa384x_t * priv);
+void prism2mgmt_get_grpaddr(u32 did, p80211pstrd_t *pstr, hfa384x_t *priv);
 int prism2mgmt_set_grpaddr(u32 did,
-                          u8 * prism2buf, p80211pstrd_t * pstr,
-                          hfa384x_t * priv);
+                          u8 *prism2buf, p80211pstrd_t *pstr,
+                          hfa384x_t *priv);
 int prism2mgmt_get_grpaddr_index(u32 did);
 
 void prism2sta_processing_defer(struct work_struct *data);
index 2fff0a1..10b671e 100644 (file)
@@ -114,7 +114,7 @@ static int prism2mib_flag(mibrec_t *mib,
 
 static int prism2mib_wepdefaultkey(mibrec_t *mib,
                                   int isget,
-                                  wlandevice_t * wlandev,
+                                  wlandevice_t *wlandev,
                                   hfa384x_t *hw,
                                   p80211msg_dot11req_mibset_t *msg,
                                   void *data);
@@ -726,7 +726,7 @@ static int prism2mib_priv(mibrec_t *mib,
                        if (isget) {
                                hfa384x_drvr_getconfig(hw,
                                                       HFA384x_RID_CNFWPADATA,
-                                                      (u8 *) & wpa,
+                                                      (u8 *) &wpa,
                                                       sizeof(wpa));
                                pstr->len = le16_to_cpu(wpa.datalen);
                                memcpy(pstr->data, wpa.data, pstr->len);
@@ -737,7 +737,7 @@ static int prism2mib_priv(mibrec_t *mib,
                                result =
                                    hfa384x_drvr_setconfig(hw,
                                                           HFA384x_RID_CNFWPADATA,
-                                                          (u8 *) & wpa,
+                                                          (u8 *) &wpa,
                                                           sizeof(wpa));
                        }
                        break;
index 50f301d..2da4054 100644 (file)
@@ -1023,13 +1023,13 @@ static void prism2sta_inf_tallies(wlandevice_t *wlandev,
 
        cnt = sizeof(hfa384x_CommTallies32_t) / sizeof(u32);
        if (inf->framelen > 22) {
-               dst = (u32 *) & hw->tallies;
-               src32 = (u32 *) & inf->info.commtallies32;
+               dst = (u32 *) &hw->tallies;
+               src32 = (u32 *) &inf->info.commtallies32;
                for (i = 0; i < cnt; i++, dst++, src32++)
                        *dst += le32_to_cpu(*src32);
        } else {
-               dst = (u32 *) & hw->tallies;
-               src16 = (u16 *) & inf->info.commtallies16;
+               dst = (u32 *) &hw->tallies;
+               src16 = (u16 *) &inf->info.commtallies16;
                for (i = 0; i < cnt; i++, dst++, src16++)
                        *dst += le16_to_cpu(*src16);
        }
@@ -1280,7 +1280,7 @@ void prism2sta_processing_defer(struct work_struct *data)
                                     HFA384x_RID_CURRENTSSID, result);
                                goto failed;
                        }
-                       prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid,
+                       prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid,
                                                (p80211pstrd_t *) &
                                                wlandev->ssid);
 
@@ -1368,8 +1368,8 @@ void prism2sta_processing_defer(struct work_struct *data)
                                 HFA384x_RID_CURRENTSSID, result);
                        goto failed;
                }
-               prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid,
-                                       (p80211pstrd_t *) & wlandev->ssid);
+               prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid,
+                                       (p80211pstrd_t *) &wlandev->ssid);
 
                hw->link_status = HFA384x_LINK_CONNECTED;
                netif_carrier_on(wlandev->netdev);
@@ -2028,8 +2028,8 @@ void prism2sta_commsqual_defer(struct work_struct *data)
                         HFA384x_RID_CURRENTSSID, result);
                goto done;
        }
-       prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid,
-                               (p80211pstrd_t *) & wlandev->ssid);
+       prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid,
+                               (p80211pstrd_t *) &wlandev->ssid);
 
        /* Reschedule timer */
        mod_timer(&hw->commsqual_timer, jiffies + HZ);