diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-26 15:46:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-26 15:46:08 -0700 |
commit | 23908db413eccd77084b09c9b0a4451dfb0524c0 (patch) | |
tree | 646f21a92496bdc04175e95642b0ecb2dc3dd09e /drivers/staging/wlan-ng | |
parent | Merge tag 'driver-core-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core (diff) | |
parent | staging: wilc1000: disable driver due to build warnings (diff) | |
download | linux-dev-23908db413eccd77084b09c9b0a4451dfb0524c0.tar.xz linux-dev-23908db413eccd77084b09c9b0a4451dfb0524c0.zip |
Merge tag 'staging-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver updates from Greg KH:
"Here's the big, really big, staging tree patches for 4.2-rc1.
Loads of stuff in here, almost all just coding style fixes / churn,
and a few new drivers as well, one of which I just disabled from the
build a few minutes ago due to way too many build warnings.
Other than the one "disable this driver" patch, all of these have been
in linux-next for quite a while with no reported issues"
* tag 'staging-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1163 commits)
staging: wilc1000: disable driver due to build warnings
Staging: rts5208: fix CHANGE_LINK_STATE value
Staging: sm750fb: ddk750_swi2c.c: Insert spaces before parenthesis
Staging: sm750fb: ddk750_swi2c.c: Place braces on correct lines
Staging: sm750fb: ddk750_swi2c.c: Insert spaces around operators
Staging: sm750fb: ddk750_swi2c.c: Replace spaces with tabs
Staging: sm750fb: ddk750_swi2c.h: Shorten lines to under 80 characters
Staging: sm750fb: ddk750_swi2c.h: Replace spaces with tabs
Staging: sm750fb: modedb.h: Shorten lines to under 80 characters
Staging: sm750fb: modedb.h: Replace spaces with tabs
staging: comedi: addi_apci_3120: rename 'this_board' variables
staging: comedi: addi_apci_1516: rename 'this_board' variables
staging: comedi: ni_atmio: cleanup ni_getboardtype()
staging: comedi: vmk80xx: sanity check context used to get the boardinfo
staging: comedi: vmk80xx: rename 'boardinfo' variables
staging: comedi: dt3000: rename 'this_board' variables
staging: comedi: adv_pci_dio: rename 'this_board' variables
staging: comedi: cb_pcidas64: rename 'thisboard' variables
staging: comedi: cb_pcidas: rename 'thisboard' variables
staging: comedi: me4000: rename 'thisboard' variables
...
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r-- | drivers/staging/wlan-ng/p80211conv.c | 6 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/p80211wep.c | 14 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/prism2fw.c | 8 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/prism2sta.c | 23 |
4 files changed, 24 insertions, 27 deletions
diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index bd69e8cf200f..49f2ef88929d 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c @@ -129,7 +129,7 @@ int skb_ether_to_p80211(wlandevice_t *wlandev, u32 ethconv, } else { /* step 1: classify ether frame, DIX or 802.3? */ proto = ntohs(e_hdr.type); - if (proto <= 1500) { + if (proto <= ETH_DATA_LEN) { pr_debug("802.3 len: %d\n", skb->len); /* codes <= 1500 reserved for 802.3 lengths */ /* it's 802.3, pass ether payload unchanged, */ @@ -207,6 +207,8 @@ 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 (!p80211_wep->data) + return -ENOMEM; foo = wep_encrypt(wlandev, skb->data, p80211_wep->data, skb->len, (wlandev->hostwep & HOSTWEP_DEFAULTKEY_MASK), @@ -529,7 +531,7 @@ int p80211_stt_findproto(u16 proto) Need to do some testing to confirm. */ - if (proto == 0x80f3) /* APPLETALK */ + if (proto == ETH_P_AARP) /* APPLETALK */ return 1; return 0; diff --git a/drivers/staging/wlan-ng/p80211wep.c b/drivers/staging/wlan-ng/p80211wep.c index c4fabadf5d74..c363456d93a3 100644 --- a/drivers/staging/wlan-ng/p80211wep.c +++ b/drivers/staging/wlan-ng/p80211wep.c @@ -53,7 +53,6 @@ #include <linux/random.h> #include <linux/kernel.h> -/* #define WEP_DEBUG */ #include "p80211hdr.h" #include "p80211types.h" @@ -133,10 +132,6 @@ int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen) if (keynum >= NUM_WEPKEYS) return -1; -#ifdef WEP_DEBUG - pr_debug("WEP key %d len %d = %*phC\n", keynum, keylen, - 8, key); -#endif wlandev->wep_keylens[keynum] = keylen; memcpy(wlandev->wep_keys[keynum], key, keylen); @@ -181,10 +176,6 @@ int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override, keylen += 3; /* add in IV bytes */ -#ifdef WEP_DEBUG - pr_debug("D %d: %*ph (%d %d) %*phC\n", len, 3, key, - keyidx, keylen, 5, key + 3); -#endif /* set up the RC4 state */ for (i = 0; i < 256; i++) @@ -258,11 +249,6 @@ int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum, keylen += 3; /* add in IV bytes */ -#ifdef WEP_DEBUG - pr_debug("E %d (%d/%d %d) %*ph %*phC\n", len, - iv[3], keynum, keylen, 3, key, 5, key + 3); -#endif - /* set up the RC4 state */ for (i = 0; i < 256; i++) s[i] = i; diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index 9408644cc8b8..fe36613589ae 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c @@ -708,7 +708,10 @@ static int plugimage(struct imgchunk *fchunk, unsigned int nfchunks, continue; } - /* Validate plug address against chunk data and identify chunk */ + /* + * Validate plug address against + * chunk data and identify chunk + */ for (c = 0; c < nfchunks; c++) { cstart = fchunk[c].addr; cend = fchunk[c].addr + fchunk[c].len; @@ -923,7 +926,8 @@ static 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)) { pr_err("S3 inforec length too long - aborting\n"); return 1; } diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index ddb294e7044f..0329c521d17c 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -428,7 +428,8 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) result = hfa384x_drvr_start(hw); if (result) { netdev_err(wlandev->netdev, - "hfa384x_drvr_start() failed,result=%d\n", (int)result); + "hfa384x_drvr_start() failed,result=%d\n", + (int)result); result = P80211ENUM_resultcode_implementation_failure; wlandev->msdstate = WLAN_MSD_HWPRESENT; @@ -471,7 +472,8 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) result = hfa384x_drvr_start(hw); if (result) { netdev_err(wlandev->netdev, - "hfa384x_drvr_start() failed,result=%d\n", (int)result); + "hfa384x_drvr_start() failed,result=%d\n", + (int)result); result = P80211ENUM_resultcode_implementation_failure; wlandev->msdstate = WLAN_MSD_HWPRESENT; @@ -481,7 +483,8 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) result = prism2sta_getcardinfo(wlandev); if (result) { netdev_err(wlandev->netdev, - "prism2sta_getcardinfo() failed,result=%d\n", (int)result); + "prism2sta_getcardinfo() failed,result=%d\n", + (int)result); result = P80211ENUM_resultcode_implementation_failure; hfa384x_drvr_stop(hw); @@ -491,7 +494,8 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) result = prism2sta_globalsetup(wlandev); if (result) { netdev_err(wlandev->netdev, - "prism2sta_globalsetup() failed,result=%d\n", (int)result); + "prism2sta_globalsetup() failed,result=%d\n", + (int)result); result = P80211ENUM_resultcode_implementation_failure; hfa384x_drvr_stop(hw); @@ -1244,9 +1248,9 @@ void prism2sta_processing_defer(struct work_struct *data) HFA384x_RID_CURRENTSSID, result); return; } - prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *) &ssid, - (p80211pstrd_t *) & - wlandev->ssid); + prism2mgmt_bytestr2pstr( + (struct hfa384x_bytestr *) &ssid, + (p80211pstrd_t *) &wlandev->ssid); /* Collect the port status */ result = hfa384x_drvr_getconfig16(hw, @@ -1658,8 +1662,9 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, if (hw->authlist.cnt >= WLAN_AUTH_MAX) { rec.status = P80211ENUM_status_ap_full; } else { - ether_addr_copy(hw->authlist.addr[hw->authlist.cnt], - rec.address); + ether_addr_copy( + hw->authlist.addr[hw->authlist.cnt], + rec.address); hw->authlist.cnt++; added = 1; } |