]> git.baikalelectronics.ru Git - kernel.git/commitdiff
iwlwifi: mvm: allow channel reorder optimization during scan
authorAyala Beker <ayala.beker@intel.com>
Thu, 17 May 2018 07:05:17 +0000 (10:05 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Sat, 6 Oct 2018 07:25:43 +0000 (10:25 +0300)
Allow the FW to reorder HB channels and first scan HB channels with
assumed APs, in order to reduce the scan duration.

Currently enable it for all scan requests types.

Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/api/scan.h
drivers/net/wireless/intel/iwlwifi/mvm/scan.c

index 310b01e3cce105de249ff7638ac0635d5239e427..18741889ec309e4f7edc9bf3fa0d5c21f143f675 100644 (file)
@@ -596,9 +596,12 @@ enum iwl_umac_scan_general_flags {
  * enum iwl_umac_scan_general_flags2 - UMAC scan general flags #2
  * @IWL_UMAC_SCAN_GEN_FLAGS2_NOTIF_PER_CHNL: Whether to send a complete
  *     notification per channel or not.
+ * @IWL_UMAC_SCAN_GEN_FLAGS2_ALLOW_CHNL_REORDER: Whether to allow channel
+ *     reorder optimization or not.
  */
 enum iwl_umac_scan_general_flags2 {
-       IWL_UMAC_SCAN_GEN_FLAGS2_NOTIF_PER_CHNL = BIT(0),
+       IWL_UMAC_SCAN_GEN_FLAGS2_NOTIF_PER_CHNL         = BIT(0),
+       IWL_UMAC_SCAN_GEN_FLAGS2_ALLOW_CHNL_REORDER     = BIT(1),
 };
 
 /**
index e9048a98e79314f1f085393a680b4c3649b0fd51..ffcd0ca86041a64e20994dba288339ca5d9e7920 100644 (file)
@@ -1448,6 +1448,9 @@ static int iwl_mvm_scan_umac(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                if (gen_flags & IWL_UMAC_SCAN_GEN_FLAGS_LMAC2_FRAGMENTED)
                        cmd->v8.num_of_fragments[SCAN_HB_LMAC_IDX] =
                                                        IWL_SCAN_NUM_OF_FRAGS;
+
+               cmd->v8.general_flags2 =
+                       IWL_UMAC_SCAN_GEN_FLAGS2_ALLOW_CHNL_REORDER;
        }
 
        cmd->scan_start_mac_id = scan_vif->id;