* [PATCH v3] mac80211: do not actively scan DFS channels
@ 2015-11-21 10:13 Antonio Quartulli
2015-11-26 17:05 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Antonio Quartulli @ 2015-11-21 10:13 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Antonio Quartulli, Antonio Quartulli
DFS channels should not be actively scanned as we can't be sure
if we are allowed or not.
If the current channel is in the DFS band, active scan might be
performed after CSA, but we have no guarantee about other channels,
therefore it is safer to prevent active scanning at all.
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
---
v3: remove scan_req argument in ieee80211_scan_get_channel_time() invocation
net/mac80211/scan.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 4aeca4b..7e66e20 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -599,7 +599,8 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
if ((req->channels[0]->flags &
IEEE80211_CHAN_NO_IR) ||
- !req->n_ssids) {
+ !req->n_ssids ||
+ (req->channels[0]->flags & IEEE80211_CHAN_RADAR)) {
next_delay = IEEE80211_PASSIVE_CHANNEL_TIME;
} else {
ieee80211_scan_state_send_probe(local, &next_delay);
@@ -645,7 +646,8 @@ ieee80211_scan_get_channel_time(struct ieee80211_channel *chan)
* TODO: channel switching also consumes quite some time,
* add that delay as well to get a better estimation
*/
- if (chan->flags & IEEE80211_CHAN_NO_IR)
+ if ((chan->flags & IEEE80211_CHAN_NO_IR) ||
+ (chan->flags & IEEE80211_CHAN_RADAR))
return IEEE80211_PASSIVE_CHANNEL_TIME;
return IEEE80211_PROBE_DELAY + IEEE80211_CHANNEL_TIME;
}
@@ -777,7 +779,8 @@ static void ieee80211_scan_state_set_channel(struct ieee80211_local *local,
*
* In any case, it is not necessary for a passive scan.
*/
- if (chan->flags & IEEE80211_CHAN_NO_IR || !scan_req->n_ssids) {
+ if (chan->flags & IEEE80211_CHAN_NO_IR || !scan_req->n_ssids ||
+ (chan->flags & IEEE80211_CHAN_RADAR)) {
*next_delay = IEEE80211_PASSIVE_CHANNEL_TIME;
local->next_scan_state = SCAN_DECISION;
return;
--
2.6.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] mac80211: do not actively scan DFS channels
2015-11-21 10:13 [PATCH v3] mac80211: do not actively scan DFS channels Antonio Quartulli
@ 2015-11-26 17:05 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-11-26 17:05 UTC (permalink / raw)
To: Antonio Quartulli; +Cc: linux-wireless, Antonio Quartulli
On Sat, 2015-11-21 at 18:13 +0800, Antonio Quartulli wrote:
> DFS channels should not be actively scanned as we can't be sure
> if we are allowed or not.
>
> If the current channel is in the DFS band, active scan might be
> performed after CSA, but we have no guarantee about other channels,
> therefore it is safer to prevent active scanning at all.
>
Applied to mac80211.git, also added cc stable. I modified the code a
bit to be shorter :)
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-26 17:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-21 10:13 [PATCH v3] mac80211: do not actively scan DFS channels Antonio Quartulli
2015-11-26 17:05 ` 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).