]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
mwifiex: reserve passive scan time for radar channel
authorXinming Hu <huxm@marvell.com>
Tue, 29 May 2018 01:42:09 +0000 (09:42 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 29 May 2018 07:27:01 +0000 (10:27 +0300)
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>
drivers/net/wireless/marvell/mwifiex/scan.c

index 19df92b6668d20f036d6717ba99d6bbdb2f6603d..895b806cdb03314b3996bff1c06f826fc151f855 100644 (file)
@@ -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++;
                }