aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/offchannel.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-05-31 15:09:27 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-17 11:23:10 -0700
commit55fe02e968371dd1c0b5b1f9411f2fc8c2b84e7e (patch)
tree6939af2e01bbb78ee67d1084df3cba308d385288 /net/mac80211/offchannel.c
parent9bef1b2492b95dc848cbde1ad021efc355a0b350 (diff)
downloadkernel_samsung_smdk4412-55fe02e968371dd1c0b5b1f9411f2fc8c2b84e7e.zip
kernel_samsung_smdk4412-55fe02e968371dd1c0b5b1f9411f2fc8c2b84e7e.tar.gz
kernel_samsung_smdk4412-55fe02e968371dd1c0b5b1f9411f2fc8c2b84e7e.tar.bz2
mac80211: clean up remain-on-channel on interface stop
commit 71ecfa1893034eeb1c93e02e22ee2ad26d080858 upstream. When any interface goes down, it could be the one that we were doing a remain-on-channel with. We therefore need to cancel the remain-on-channel and flush the related work structs so they don't run after the interface has been removed or even destroyed. It's also possible in this case that an off-channel SKB was never transmitted, so free it if this is the case. Note that this can also happen if the driver finishes the off-channel period without ever starting it. Reported-by: Nirav Shah <nirav.j2.shah@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/mac80211/offchannel.c')
-rw-r--r--net/mac80211/offchannel.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index 13427b1..c55eb9d 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -251,6 +251,22 @@ static void ieee80211_hw_roc_done(struct work_struct *work)
return;
}
+ /* was never transmitted */
+ if (local->hw_roc_skb) {
+ u64 cookie;
+
+ cookie = local->hw_roc_cookie ^ 2;
+
+ cfg80211_mgmt_tx_status(local->hw_roc_dev, cookie,
+ local->hw_roc_skb->data,
+ local->hw_roc_skb->len, false,
+ GFP_KERNEL);
+
+ kfree_skb(local->hw_roc_skb);
+ local->hw_roc_skb = NULL;
+ local->hw_roc_skb_for_status = NULL;
+ }
+
if (!local->hw_roc_for_tx)
cfg80211_remain_on_channel_expired(local->hw_roc_dev,
local->hw_roc_cookie,