aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/scan.c
diff options
context:
space:
mode:
authorDavid Spinadel <david.spinadel@intel.com>2014-12-29 08:43:48 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-01-05 04:02:37 -0500
commit720daf20cce18cfbdfd7904977f25e089aad63fe (patch)
tree732026262dd5915d66792964228da43878331947 /drivers/net/wireless/iwlwifi/mvm/scan.c
parent7e2a38831db4cf082aa8b4997f3cbfe8cb03b669 (diff)
iwlwifi: mvm: scan dwell time corrections
Use only basic dwell time (10 ms for active scan and 110 for passive), regardless of the number of the probes and the band, if it is supported by the FW. The FW will add 3 ms for each probe sent and 10 ms for low band channels. Add a TLV flag to indicate such support in FW. This fix is needed to fix few bugs regarding scans that take too much time. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/scan.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/scan.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c
index 7a001fb0d344..ec9a8e7bae1d 100644
--- a/drivers/net/wireless/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/mvm/scan.c
@@ -171,15 +171,21 @@ static void iwl_mvm_scan_fill_ssids(struct iwl_ssid_ie *cmd_ssid,
171 * already included in the probe template, so we need to set only 171 * already included in the probe template, so we need to set only
172 * req->n_ssids - 1 bits in addition to the first bit. 172 * req->n_ssids - 1 bits in addition to the first bit.
173 */ 173 */
174static u16 iwl_mvm_get_active_dwell(enum ieee80211_band band, int n_ssids) 174static u16 iwl_mvm_get_active_dwell(struct iwl_mvm *mvm,
175 enum ieee80211_band band, int n_ssids)
175{ 176{
177 if (mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_BASIC_DWELL)
178 return 10;
176 if (band == IEEE80211_BAND_2GHZ) 179 if (band == IEEE80211_BAND_2GHZ)
177 return 20 + 3 * (n_ssids + 1); 180 return 20 + 3 * (n_ssids + 1);
178 return 10 + 2 * (n_ssids + 1); 181 return 10 + 2 * (n_ssids + 1);
179} 182}
180 183
181static u16 iwl_mvm_get_passive_dwell(enum ieee80211_band band) 184static u16 iwl_mvm_get_passive_dwell(struct iwl_mvm *mvm,
185 enum ieee80211_band band)
182{ 186{
187 if (mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_BASIC_DWELL)
188 return 110;
183 return band == IEEE80211_BAND_2GHZ ? 100 + 20 : 100 + 10; 189 return band == IEEE80211_BAND_2GHZ ? 100 + 20 : 100 + 10;
184} 190}
185 191
@@ -331,7 +337,8 @@ static void iwl_mvm_scan_calc_params(struct iwl_mvm *mvm,
331 */ 337 */
332 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) { 338 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) {
333 u32 passive_dwell = 339 u32 passive_dwell =
334 iwl_mvm_get_passive_dwell(IEEE80211_BAND_2GHZ); 340 iwl_mvm_get_passive_dwell(mvm,
341 IEEE80211_BAND_2GHZ);
335 params->max_out_time = passive_dwell; 342 params->max_out_time = passive_dwell;
336 } else { 343 } else {
337 params->passive_fragmented = true; 344 params->passive_fragmented = true;
@@ -348,8 +355,8 @@ not_bound:
348 params->dwell[band].passive = frag_passive_dwell; 355 params->dwell[band].passive = frag_passive_dwell;
349 else 356 else
350 params->dwell[band].passive = 357 params->dwell[band].passive =
351 iwl_mvm_get_passive_dwell(band); 358 iwl_mvm_get_passive_dwell(mvm, band);
352 params->dwell[band].active = iwl_mvm_get_active_dwell(band, 359 params->dwell[band].active = iwl_mvm_get_active_dwell(mvm, band,
353 n_ssids); 360 n_ssids);
354 } 361 }
355} 362}