Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 892bd629 authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'mac80211-for-davem-2015-05-19' of...

Merge tag 'mac80211-for-davem-2015-05-19' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211



Johannes Berg says:

====================
This has just a single fix, for a WEP tailroom check
problem that leads to dropped frames.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents b7b0ed91 47b4e1fc
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -98,8 +98,7 @@ static u8 *ieee80211_wep_add_iv(struct ieee80211_local *local,

	hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED);

	if (WARN_ON(skb_tailroom(skb) < IEEE80211_WEP_ICV_LEN ||
		    skb_headroom(skb) < IEEE80211_WEP_IV_LEN))
	if (WARN_ON(skb_headroom(skb) < IEEE80211_WEP_IV_LEN))
		return NULL;

	hdrlen = ieee80211_hdrlen(hdr->frame_control);
@@ -167,6 +166,9 @@ int ieee80211_wep_encrypt(struct ieee80211_local *local,
	size_t len;
	u8 rc4key[3 + WLAN_KEY_LEN_WEP104];

	if (WARN_ON(skb_tailroom(skb) < IEEE80211_WEP_ICV_LEN))
		return -1;

	iv = ieee80211_wep_add_iv(local, skb, keylen, keyidx);
	if (!iv)
		return -1;