From: matthieu castet Date: Thu, 4 Jun 2009 20:16:18 +0000 (+0200) Subject: mac80211 : fix unaligned rx skb X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dacb6f1d8fa5200efc4e609fe63a750b960993b6;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git mac80211 : fix unaligned rx skb mac80211 is checking is the skb is aligned on 32 bit boundary. But it is checking against ethernet header, whereas Linux expect IP header aligned. And ethernet ether size is 6*2+2=14, so aligning ethernet header make IP header unaligned. Signed-off-by: Matthieu CASTET Signed-off-by: John W. Linville --- diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 6a9b8e63a6b..75412518510 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -1335,7 +1335,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx) * mac80211. That also explains the __skb_push() * below. */ - align = (unsigned long)skb->data & 3; + align = ((unsigned long)(skb->data + sizeof(struct ethhdr))) & 3; if (align) { if (WARN_ON(skb_headroom(skb) < 3)) { dev_kfree_skb(skb);