diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-12-08 17:46:33 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-01-14 05:10:10 -0500 |
commit | e6a8a3aaaac832f47092df93f46298251b136fc9 (patch) | |
tree | 81e87156ceb04fe977ea506bf58d977a2263103c /net | |
parent | e9db45578706e216d9bb0fb5f459b137da54be63 (diff) |
mac80211: fix remain-on-channel cancellation
Ilan's previous commit 1b894521e60c ("mac80211: handle HW
ROC expired properly") neglected to take into account that
hw_begun was now always set in the software implementation
as well as the offloaded case.
Fix hw_begun to only apply to the offloaded case to make
the check in Ilan's commit safe and correct.
Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/offchannel.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index 34541bcd1621..fbc34e9088de 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c | |||
@@ -257,7 +257,6 @@ static void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc, | |||
257 | 257 | ||
258 | roc->start_time = start_time; | 258 | roc->start_time = start_time; |
259 | roc->started = true; | 259 | roc->started = true; |
260 | roc->hw_begun = true; | ||
261 | 260 | ||
262 | if (roc->mgmt_tx_cookie) { | 261 | if (roc->mgmt_tx_cookie) { |
263 | if (!WARN_ON(!roc->frame)) { | 262 | if (!WARN_ON(!roc->frame)) { |
@@ -286,6 +285,7 @@ static void ieee80211_hw_roc_start(struct work_struct *work) | |||
286 | if (!roc->started) | 285 | if (!roc->started) |
287 | break; | 286 | break; |
288 | 287 | ||
288 | roc->hw_begun = true; | ||
289 | ieee80211_handle_roc_started(roc, local->hw_roc_start_time); | 289 | ieee80211_handle_roc_started(roc, local->hw_roc_start_time); |
290 | } | 290 | } |
291 | 291 | ||
@@ -529,8 +529,10 @@ ieee80211_coalesce_hw_started_roc(struct ieee80211_local *local, | |||
529 | * begin, otherwise they'll both be marked properly by the work | 529 | * begin, otherwise they'll both be marked properly by the work |
530 | * struct that runs once the driver notifies us of the beginning | 530 | * struct that runs once the driver notifies us of the beginning |
531 | */ | 531 | */ |
532 | if (cur_roc->hw_begun) | 532 | if (cur_roc->hw_begun) { |
533 | new_roc->hw_begun = true; | ||
533 | ieee80211_handle_roc_started(new_roc, now); | 534 | ieee80211_handle_roc_started(new_roc, now); |
535 | } | ||
534 | 536 | ||
535 | return true; | 537 | return true; |
536 | } | 538 | } |