diff options
author | Eliad Peller <eliad@wizery.com> | 2015-02-08 10:36:07 (GMT) |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-02-24 09:51:06 (GMT) |
commit | 104f5a6206f4b3133c675e3d41eca2ca4c41406b (patch) | |
tree | 2a540aa4c945e9308bf37903791a8b4fd7d55e45 /net | |
parent | f2831e2007810b690f93a26128058a193eadf393 (diff) | |
download | linux-104f5a6206f4b3133c675e3d41eca2ca4c41406b.tar.xz |
mac80211: clear sdata->radar_required
If ieee80211_vif_use_channel() fails, we have to clear
sdata->radar_required (which we might have just set).
Failing to do it results in stale radar_required field
which prevents starting new scan requests.
Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Eliad Peller <eliad@wizery.com>
[use false instead of 0]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/chan.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index ff0d2db..5bcd4e5 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -1508,6 +1508,8 @@ static void __ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata) if (ieee80211_chanctx_refcount(local, ctx) == 0) ieee80211_free_chanctx(local, ctx); + sdata->radar_required = false; + /* Unreserving may ready an in-place reservation. */ if (use_reserved_switch) ieee80211_vif_use_reserved_switch(local); @@ -1566,6 +1568,9 @@ int ieee80211_vif_use_channel(struct ieee80211_sub_if_data *sdata, ieee80211_recalc_smps_chanctx(local, ctx); ieee80211_recalc_radar_chanctx(local, ctx); out: + if (ret) + sdata->radar_required = false; + mutex_unlock(&local->chanctx_mtx); return ret; } |