mac80211: clear TX control on filtered frames
authorJohannes Berg <johannes@sipsolutions.net>
Sun, 17 Jan 2010 00:47:56 +0000 (01:47 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 19 Jan 2010 21:25:16 +0000 (16:25 -0500)
When an skb survived a round-trip through the driver
and needs to be re-used, its control information is
definitely not valid any more, the driver will have
overwritten it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/status.c

index 0ebcdda2420028819c0ed4f90e299d9f28f39f53..9e171b17827643c3443ff75c1e7b75765ba23efc 100644 (file)
@@ -69,6 +69,14 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
         */
        goto drop;
 
+       /*
+        * This skb 'survived' a round-trip through the driver, and
+        * hopefully the driver didn't mangle it too badly. However,
+        * we can definitely not rely on the the control information
+        * being correct. Clear it so we don't get junk there.
+        */
+       memset(&info->control, 0, sizeof(info->control));
+
        sta->tx_filtered_count++;
 
        /*