aboutsummaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2012-06-25 13:39:04 -0400
committerSteven Rostedt <rostedt@goodmis.org>2012-06-25 13:39:04 -0400
commit6aa4cbaab0a7c272ffb6e53c2523c426e54ddddb (patch)
treea88f0f33246de3c4fd434d0c3dd276d20dcf5d6e /net/mac80211
parent111185bbadfe290b0b07a3c37db968f5f4d05bc7 (diff)
parent8499e79e9ee4c946ae38fd12e5d3afe8b68f2dfd (diff)
Merge tag 'v3.2.21' into v3.2-rt
This is the 3.2.21 stable release
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/iface.c12
-rw-r--r--net/mac80211/offchannel.c16
2 files changed, 28 insertions, 0 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 30d73552e9ab..f4ddf34c9692 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -495,6 +495,18 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
ieee80211_configure_filter(local);
break;
default:
+ mutex_lock(&local->mtx);
+ if (local->hw_roc_dev == sdata->dev &&
+ local->hw_roc_channel) {
+ /* ignore return value since this is racy */
+ drv_cancel_remain_on_channel(local);
+ ieee80211_queue_work(&local->hw, &local->hw_roc_done);
+ }
+ mutex_unlock(&local->mtx);
+
+ flush_work(&local->hw_roc_start);
+ flush_work(&local->hw_roc_done);
+
flush_work(&sdata->work);
/*
* When we get here, the interface is marked down.
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index 1b239beb0a11..db2c21546e86 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -246,6 +246,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,