]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/mac80211/rx.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
[karo-tx-linux.git] / net / mac80211 / rx.c
index e4f325f68fd35ffc12b19168b5af7af394c141d2..6e2a7bcd8cb888ce24be03cc56cb2516ca95fade 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <linux/jiffies.h>
+#include <linux/slab.h>
 #include <linux/kernel.h>
 #include <linux/skbuff.h>
 #include <linux/netdevice.h>
@@ -1252,6 +1253,12 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)
        if (skb_linearize(rx->skb))
                return RX_DROP_UNUSABLE;
 
+       /*
+        *  skb_linearize() might change the skb->data and
+        *  previously cached variables (in this case, hdr) need to
+        *  be refreshed with the new data.
+        */
+       hdr = (struct ieee80211_hdr *)rx->skb->data;
        seq = (sc & IEEE80211_SCTL_SEQ) >> 4;
 
        if (frag == 0) {