iwlwifi: mvm: Use all Rx chains for roaming scan
authorIlan Peer <ilan.peer@intel.com>
Sun, 24 Oct 2021 13:55:01 +0000 (16:55 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 28 Oct 2021 09:04:09 +0000 (12:04 +0300)
To improve chances of hearing beacons and probe responses during
a scan which (based on the scan request parameters) looks like a
roaming scan, enable reception on all chains.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211024165252.f115ad455aca.I5de854fe8ce58c85c21a7adf43526acb29156a08@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/scan.c

index ce8bdbc..a138b5c 100644 (file)
@@ -1995,8 +1995,16 @@ static u16 iwl_mvm_scan_umac_flags_v2(struct iwl_mvm *mvm,
 {
        u16 flags = 0;
 
+       /*
+        * If no direct SSIDs are provided perform a passive scan. Otherwise,
+        * if there is a single SSID which is not the broadcast SSID, assume
+        * that the scan is intended for roaming purposes and thus enable Rx on
+        * all chains to improve chances of hearing the beacons/probe responses.
+        */
        if (params->n_ssids == 0)
                flags |= IWL_UMAC_SCAN_GEN_FLAGS_V2_FORCE_PASSIVE;
+       else if (params->n_ssids == 1 && params->ssids[0].ssid_len)
+               flags |= IWL_UMAC_SCAN_GEN_FLAGS_V2_USE_ALL_RX_CHAINS;
 
        if (iwl_mvm_is_scan_fragmented(params->type))
                flags |= IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC1;