aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wlan-ng/p80211conv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/wlan-ng/p80211conv.c')
-rw-r--r--drivers/staging/wlan-ng/p80211conv.c6
1 files changed, 4 insertions, 2 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;