iwlwifi: mvm: Configure fragmented scan for scheduled scan
authorAvraham Stern <avraham.stern@intel.com>
Tue, 10 Nov 2015 12:56:24 +0000 (14:56 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 26 Nov 2015 14:38:49 +0000 (16:38 +0200)
Configure the FW to use fragmented scan when the traffic load is high
or low latency traffic is on. This is useful for scans that are
managed by the FW (e.g. scheduled scan).

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/scan.c

index 4bde2d027dcd34ce710722af8416e9c3a1159461..419afa47c7b4a475f18d520bb365740b04710a73 100644 (file)
@@ -643,6 +643,7 @@ struct iwl_mvm {
        unsigned int scan_status;
        void *scan_cmd;
        struct iwl_mcast_filter_cmd *mcast_filter_cmd;
+       bool scan_fragmented;
 
        /* max number of simultaneous scans the FW supports */
        unsigned int max_scans;
index d6e0c1b5c20cf31e3b8860f9afb8361a0d44c443..6b9b1904551c90f245c214cde3857515efab2adc 100644 (file)
@@ -920,6 +920,8 @@ int iwl_mvm_config_scan(struct iwl_mvm *mvm)
        if (!scan_config)
                return -ENOMEM;
 
+       mvm->scan_fragmented = iwl_mvm_low_latency(mvm);
+
        scan_config->flags = cpu_to_le32(SCAN_CONFIG_FLAG_ACTIVATE |
                                         SCAN_CONFIG_FLAG_ALLOW_CHUB_REQS |
                                         SCAN_CONFIG_FLAG_SET_TX_CHAINS |
@@ -928,7 +930,10 @@ int iwl_mvm_config_scan(struct iwl_mvm *mvm)
                                         SCAN_CONFIG_FLAG_SET_LEGACY_RATES |
                                         SCAN_CONFIG_FLAG_SET_MAC_ADDR |
                                         SCAN_CONFIG_FLAG_SET_CHANNEL_FLAGS|
-                                        SCAN_CONFIG_N_CHANNELS(num_channels));
+                                        SCAN_CONFIG_N_CHANNELS(num_channels) |
+                                        (mvm->scan_fragmented ?
+                                         SCAN_CONFIG_FLAG_SET_FRAGMENTED :
+                                         SCAN_CONFIG_FLAG_CLEAR_FRAGMENTED));
        scan_config->tx_chains = cpu_to_le32(iwl_mvm_get_valid_tx_ant(mvm));
        scan_config->rx_chains = cpu_to_le32(iwl_mvm_scan_rx_ant(mvm));
        scan_config->legacy_rates = iwl_mvm_scan_config_rates(mvm);