From: Johannes Berg Date: Sun, 17 Jan 2010 00:47:56 +0000 (+0100) Subject: mac80211: clear TX control on filtered frames X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=697e6a0fb0c8783695d4b4a5d7131476b296d623;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git mac80211: clear TX control on filtered frames 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 Signed-off-by: John W. Linville --- diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 0ebcdda24200..9e171b178276 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -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++; /*