* [PATCH] mac80211: clear sdata->radar_required
@ 2015-02-08 10:36 Eliad Peller
2015-02-24 9:51 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Eliad Peller @ 2015-02-08 10:36 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
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>
---
net/mac80211/chan.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 35b11e1..f3a8708 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 = 0;
+
/* 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 = 0;
+
mutex_unlock(&local->chanctx_mtx);
return ret;
}
--
1.8.5.2.229.g4448466.dirty
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mac80211: clear sdata->radar_required
2015-02-08 10:36 [PATCH] mac80211: clear sdata->radar_required Eliad Peller
@ 2015-02-24 9:51 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-02-24 9:51 UTC (permalink / raw)
To: Eliad Peller; +Cc: linux-wireless
On Sun, 2015-02-08 at 12:36 +0200, Eliad Peller wrote:
> 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.
Applied, but I fixed it to use = false instead of = 0.
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-24 9:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-08 10:36 [PATCH] mac80211: clear sdata->radar_required Eliad Peller
2015-02-24 9:51 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).