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

Commit d1bcb9f1 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

mac80211: fix alignment calculation bug



When checking whether or not a given frame needs to be
moved to be properly aligned to a 4-byte boundary, we
use & 4 which wasn't intended, this code should check
the lowest two bits.

Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7d42081a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1397,7 +1397,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
		 * mac80211. That also explains the __skb_push()
		 * below.
		 */
		align = (unsigned long)skb->data & 4;
		align = (unsigned long)skb->data & 3;
		if (align) {
			if (WARN_ON(skb_headroom(skb) < 3)) {
				dev_kfree_skb(skb);