diff options
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r-- | drivers/staging/wlan-ng/hfa384x.h | 3 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/hfa384x_usb.c | 6 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/p80211conv.c | 2 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/p80211hdr.h | 2 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/p80211netdev.c | 4 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/prism2fw.c | 9 |
6 files changed, 12 insertions, 14 deletions
diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index 1f2c78c..20d146b 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h @@ -1376,6 +1376,7 @@ 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)); if (result == 0) *((u16 *) val) = le16_to_cpu(*((u16 *) val)); @@ -1385,6 +1386,7 @@ static inline int hfa384x_drvr_getconfig16(hfa384x_t *hw, u16 rid, void *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)); } @@ -1402,6 +1404,7 @@ static inline int 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); } diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 898bde7..55d2f56 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -3583,12 +3583,8 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev, } skb = dev_alloc_skb(skblen); - if (skb == NULL) { - netdev_err(hw->wlandev->netdev, - "alloc_skb failed trying to allocate %d bytes\n", - skblen); + if (skb == NULL) return; - } /* only prepend the prism header if in the right mode */ if ((wlandev->netdev->type == ARPHRD_IEEE80211_PRISM) && diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index 3b5468c..7eaaf9a 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c @@ -107,7 +107,7 @@ int skb_ether_to_p80211(wlandevice_t *wlandev, u32 ethconv, struct p80211_metawep *p80211_wep) { - u16 fc; + __le16 fc; u16 proto; struct wlan_ethhdr e_hdr; struct wlan_llc *e_llc; diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h index 66b5e20..79d9b20 100644 --- a/drivers/staging/wlan-ng/p80211hdr.h +++ b/drivers/staging/wlan-ng/p80211hdr.h @@ -148,7 +148,7 @@ /* Generic 802.11 Header types */ struct p80211_hdr_a3 { - u16 fc; + __le16 fc; u16 dur; u8 a1[ETH_ALEN]; u8 a2[ETH_ALEN]; diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 2dd9bf8..a9c1e0b 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -358,7 +358,7 @@ static int p80211knetdev_hard_start_xmit(struct sk_buff *skb, * and return success . * TODO: we need a saner way to handle this */ - if (skb->protocol != ETH_P_80211_RAW) { + if (be16_to_cpu(skb->protocol) != ETH_P_80211_RAW) { netif_start_queue(wlandev->netdev); netdev_notice(netdev, "Tx attempt prior to association, frame dropped.\n"); netdev->stats.tx_dropped++; @@ -369,7 +369,7 @@ static int p80211knetdev_hard_start_xmit(struct sk_buff *skb, } /* Check for raw transmits */ - if (skb->protocol == ETH_P_80211_RAW) { + if (be16_to_cpu(skb->protocol) == ETH_P_80211_RAW) { if (!capable(CAP_NET_ADMIN)) { result = 1; goto failed; diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index 6c38f79..9408644 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c @@ -238,7 +238,8 @@ static int prism2_fwtry(struct usb_device *udev, wlandevice_t *wlandev) * 0 - success * ~0 - failure ----------------------------------------------------------------*/ -static int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev) +static int prism2_fwapply(const struct ihex_binrec *rfptr, + wlandevice_t *wlandev) { signed int result = 0; struct p80211msg_dot11req_mibget getmsg; @@ -986,8 +987,8 @@ static int writeimage(wlandevice_t *wlandev, struct imgchunk *fchunk, u32 currlen; u32 currdaddr; - rstmsg = kmalloc(sizeof(*rstmsg), GFP_KERNEL); - rwrmsg = kmalloc(sizeof(*rwrmsg), GFP_KERNEL); + rstmsg = kzalloc(sizeof(*rstmsg), GFP_KERNEL); + rwrmsg = kzalloc(sizeof(*rwrmsg), GFP_KERNEL); if (!rstmsg || !rwrmsg) { kfree(rstmsg); kfree(rwrmsg); @@ -997,7 +998,6 @@ static int writeimage(wlandevice_t *wlandev, struct imgchunk *fchunk, } /* Initialize the messages */ - memset(rstmsg, 0, sizeof(*rstmsg)); strcpy(rstmsg->devname, wlandev->name); rstmsg->msgcode = DIDmsg_p2req_ramdl_state; rstmsg->msglen = sizeof(*rstmsg); @@ -1011,7 +1011,6 @@ static int writeimage(wlandevice_t *wlandev, struct imgchunk *fchunk, rstmsg->exeaddr.len = sizeof(u32); rstmsg->resultcode.len = sizeof(u32); - memset(rwrmsg, 0, sizeof(*rwrmsg)); strcpy(rwrmsg->devname, wlandev->name); rwrmsg->msgcode = DIDmsg_p2req_ramdl_write; rwrmsg->msglen = sizeof(*rwrmsg); |