]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
iwlwifi: mvm: activate fragmented EBS in case of fragmented scan
authorAyala Beker <ayala.beker@intel.com>
Tue, 1 May 2018 11:40:03 +0000 (14:40 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 31 Aug 2018 08:38:41 +0000 (11:38 +0300)
In case of fragmented scan on the HB channels, configure EBS to be
fragmented as well.

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 a17c4a79b8d468460fa3d62911e568e5e2f05668..310b01e3cce105de249ff7638ac0635d5239e427 100644 (file)
@@ -262,6 +262,7 @@ enum iwl_scan_channel_flags {
        IWL_SCAN_CHANNEL_FLAG_EBS               = BIT(0),
        IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE      = BIT(1),
        IWL_SCAN_CHANNEL_FLAG_CACHE_ADD         = BIT(2),
+       IWL_SCAN_CHANNEL_FLAG_EBS_FRAG          = BIT(3),
 };
 
 /* struct iwl_scan_channel_opt - CHANNEL_OPTIMIZATION_API_S
index 003bf08483864221f8bb7995956c43e0e34a08f2..e9048a98e79314f1f085393a680b4c3649b0fd51 100644 (file)
@@ -1455,11 +1455,21 @@ static int iwl_mvm_scan_umac(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
        if (type == IWL_MVM_SCAN_SCHED || type == IWL_MVM_SCAN_NETDETECT)
                cmd->flags = cpu_to_le32(IWL_UMAC_SCAN_FLAG_PREEMPTIVE);
 
-       if (iwl_mvm_scan_use_ebs(mvm, vif))
+       if (iwl_mvm_scan_use_ebs(mvm, vif)) {
                channel_flags = IWL_SCAN_CHANNEL_FLAG_EBS |
                                IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
                                IWL_SCAN_CHANNEL_FLAG_CACHE_ADD;
 
+               /* set fragmented ebs for fragmented scan on HB channels */
+               if (iwl_mvm_is_frag_ebs_supported(mvm)) {
+                       if (gen_flags &
+                           IWL_UMAC_SCAN_GEN_FLAGS_LMAC2_FRAGMENTED ||
+                           (!iwl_mvm_is_cdb_supported(mvm) &&
+                            gen_flags & IWL_UMAC_SCAN_GEN_FLAGS_FRAGMENTED))
+                               channel_flags |= IWL_SCAN_CHANNEL_FLAG_EBS_FRAG;
+               }
+       }
+
        chan_param->flags = channel_flags;
        chan_param->count = params->n_channels;