summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorXinming Hu <huxm@marvell.com>2018-05-29 04:42:09 +0300
committerKalle Valo <kvalo@codeaurora.org>2018-05-29 10:27:01 +0300
commitdb69f4e05bd5c83ea66b156fddd7cfc562092bbc (patch)
treeb749db3ad1bf6d7f282f9da47dd8454c45ac0403 /drivers/net/wireless
parent788f4e4cf063173c25e3f3ad81e7cee923686ab1 (diff)
downloadlinux-db69f4e05bd5c83ea66b156fddd7cfc562092bbc.tar.xz
mwifiex: reserve passive scan time for radar channel
Active scan is not allowed on radar channel, instead using passvie scan with more time. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/scan.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c
index 19df92b6668d..895b806cdb03 100644
--- a/drivers/net/wireless/marvell/mwifiex/scan.c
+++ b/drivers/net/wireless/marvell/mwifiex/scan.c
@@ -482,7 +482,8 @@ mwifiex_scan_create_channel_list(struct mwifiex_private *priv,
scan_chan_list[chan_idx].max_scan_time =
cpu_to_le16((u16) user_scan_in->
chan_list[0].scan_time);
- else if (ch->flags & IEEE80211_CHAN_NO_IR)
+ else if ((ch->flags & IEEE80211_CHAN_NO_IR) ||
+ (ch->flags & IEEE80211_CHAN_RADAR))
scan_chan_list[chan_idx].max_scan_time =
cpu_to_le16(adapter->passive_scan_time);
else
@@ -502,10 +503,12 @@ mwifiex_scan_create_channel_list(struct mwifiex_private *priv,
scan_chan_list[chan_idx].chan_scan_mode_bitmap
|= MWIFIEX_DISABLE_CHAN_FILT;
- if (filtered_scan) {
+ if (filtered_scan &&
+ !((ch->flags & IEEE80211_CHAN_NO_IR) ||
+ (ch->flags & IEEE80211_CHAN_RADAR)))
scan_chan_list[chan_idx].max_scan_time =
cpu_to_le16(adapter->specific_scan_time);
- }
+
chan_idx++;
}