summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2015-04-17 11:18:46 +0300
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-04-29 13:50:56 +0300
commit283c2491416ef0be3e89ac5a70a870d765a4ac76 (patch)
tree89f307068d174c0b74616c1ced278a6836d208cf
parent7d7de1e91594024ea1a6a48a8b89ee2e9dddf43c (diff)
downloadblackbird-obmc-linux-283c2491416ef0be3e89ac5a70a870d765a4ac76.tar.gz
blackbird-obmc-linux-283c2491416ef0be3e89ac5a70a870d765a4ac76.zip
iwlwifi: mvm: trim sched scan delay down to 16-bit for LMAC as well
In theory, LMAC scans can handle a 32-bit delay, but since waiting for over 18 hours to start the scan is a bit silly and to keep it aligned with UMAC scans (which only support 16-bit delays), trim it down to 16-bits. This makes the LMAC vs. UMAC and the UMAC reg scan vs. UMAC sched scan code more similar. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/scan.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c
index f4d38f51e7ed..1abbc6630eb8 100644
--- a/drivers/net/wireless/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/mvm/scan.c
@@ -80,7 +80,7 @@ struct iwl_mvm_scan_params {
u32 suspend_time;
bool passive_fragmented;
u32 n_channels;
- u32 delay;
+ u16 delay;
int n_ssids;
struct cfg80211_ssid *ssids;
struct ieee80211_channel **channels;
@@ -1279,14 +1279,7 @@ static int iwl_mvm_sched_scan_umac(struct iwl_mvm *mvm,
/* With UMAC we use only one schedule, so take the final one only */
sec_part->schedule[0].iter_count = params->schedule[1].iterations;
- if (params->delay > U16_MAX) {
- IWL_DEBUG_SCAN(mvm,
- "delay value is > 16-bits, set to max possible\n");
- sec_part->delay = cpu_to_le16(U16_MAX);
- } else {
- sec_part->delay = cpu_to_le16(params->delay);
- }
-
+ sec_part->delay = cpu_to_le16(params->delay);
sec_part->preq = params->preq;
return 0;
@@ -1458,7 +1451,6 @@ int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm,
params.n_ssids = req->n_ssids;
params.flags = req->flags;
params.n_channels = req->n_channels;
- params.delay = req->delay;
params.ssids = req->ssids;
params.channels = req->channels;
params.mac_addr = req->mac_addr;
@@ -1481,6 +1473,19 @@ int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm,
params.interval = req->interval / MSEC_PER_SEC;
}
+ /* In theory, LMAC scans can handle a 32-bit delay, but since
+ * waiting for over 18 hours to start the scan is a bit silly
+ * and to keep it aligned with UMAC scans (which only support
+ * 16-bit delays), trim it down to 16-bits.
+ */
+ if (req->delay > U16_MAX) {
+ IWL_DEBUG_SCAN(mvm,
+ "delay value is > 16-bits, set to max possible\n");
+ params.delay = U16_MAX;
+ } else {
+ params.delay = req->delay;
+ }
+
iwl_mvm_scan_calc_dwell(mvm, vif, &params);
ret = iwl_mvm_config_sched_scan_profiles(mvm, req);
OpenPOWER on IntegriCloud