aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaim Dreyfuss <haim.dreyfuss@intel.com>2014-12-01 16:30:07 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-12-28 13:06:14 -0500
commita1ed4025765cceec180f57eab032c770140d6b8f (patch)
tree70ae60c878a8d8302115538da4599812e2e6903b
parentd9f1fc209fdb18d0edd6cc633a8725adbfb0ca01 (diff)
iwlwifi: mvm: Configure EBS scan ratio
This configuration defines the ratio between number of scan iterations where EBS is involved to those where it is not. This configuration was left unconfigured due to inaccurate documentation. Fix documentation as well. Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h7
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/scan.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h
index 1f2acf47bfb2..2d1a81c493f1 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h
+++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h
@@ -653,8 +653,11 @@ enum iwl_scan_channel_flags {
653}; 653};
654 654
655/* iwl_scan_channel_opt - CHANNEL_OPTIMIZATION_API_S 655/* iwl_scan_channel_opt - CHANNEL_OPTIMIZATION_API_S
656 * @flags: enum iwl_scan_channel_flgs 656 * @flags: enum iwl_scan_channel_flags
657 * @non_ebs_ratio: how many regular scan iteration before EBS 657 * @non_ebs_ratio: defines the ratio of number of scan iterations where EBS is
658 * involved.
659 * 1 - EBS is disabled.
660 * 2 - every second scan will be full scan(and so on).
658 */ 661 */
659struct iwl_scan_channel_opt { 662struct iwl_scan_channel_opt {
660 __le16 flags; 663 __le16 flags;
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c
index 243367650b13..ed229a8daf4a 100644
--- a/drivers/net/wireless/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/mvm/scan.c
@@ -72,6 +72,8 @@
72 72
73#define IWL_PLCP_QUIET_THRESH 1 73#define IWL_PLCP_QUIET_THRESH 1
74#define IWL_ACTIVE_QUIET_TIME 10 74#define IWL_ACTIVE_QUIET_TIME 10
75#define IWL_DENSE_EBS_SCAN_RATIO 5
76#define IWL_SPARSE_EBS_SCAN_RATIO 1
75 77
76struct iwl_mvm_scan_params { 78struct iwl_mvm_scan_params {
77 u32 max_out_time; 79 u32 max_out_time;
@@ -1296,10 +1298,14 @@ iwl_mvm_build_generic_unified_scan_cmd(struct iwl_mvm *mvm,
1296 cpu_to_le16(IWL_SCAN_CHANNEL_FLAG_EBS | 1298 cpu_to_le16(IWL_SCAN_CHANNEL_FLAG_EBS |
1297 IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE | 1299 IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
1298 IWL_SCAN_CHANNEL_FLAG_CACHE_ADD); 1300 IWL_SCAN_CHANNEL_FLAG_CACHE_ADD);
1301 cmd->channel_opt[0].non_ebs_ratio =
1302 cpu_to_le16(IWL_DENSE_EBS_SCAN_RATIO);
1299 cmd->channel_opt[1].flags = 1303 cmd->channel_opt[1].flags =
1300 cpu_to_le16(IWL_SCAN_CHANNEL_FLAG_EBS | 1304 cpu_to_le16(IWL_SCAN_CHANNEL_FLAG_EBS |
1301 IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE | 1305 IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
1302 IWL_SCAN_CHANNEL_FLAG_CACHE_ADD); 1306 IWL_SCAN_CHANNEL_FLAG_CACHE_ADD);
1307 cmd->channel_opt[1].non_ebs_ratio =
1308 cpu_to_le16(IWL_SPARSE_EBS_SCAN_RATIO);
1303 } 1309 }
1304 1310
1305 if (iwl_mvm_rrm_scan_needed(mvm)) 1311 if (iwl_mvm_rrm_scan_needed(mvm))