diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/scan.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/scan.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c index e5294d01181e..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 | */ |
174 | static u16 iwl_mvm_get_active_dwell(enum ieee80211_band band, int n_ssids) | 174 | static 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 | ||
181 | static u16 iwl_mvm_get_passive_dwell(enum ieee80211_band band) | 184 | static 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 | } |
@@ -1448,6 +1455,8 @@ int iwl_mvm_unified_sched_scan_lmac(struct iwl_mvm *mvm, | |||
1448 | 1455 | ||
1449 | if (iwl_mvm_scan_pass_all(mvm, req)) | 1456 | if (iwl_mvm_scan_pass_all(mvm, req)) |
1450 | flags |= IWL_MVM_LMAC_SCAN_FLAG_PASS_ALL; | 1457 | flags |= IWL_MVM_LMAC_SCAN_FLAG_PASS_ALL; |
1458 | else | ||
1459 | flags |= IWL_MVM_LMAC_SCAN_FLAG_MATCH; | ||
1451 | 1460 | ||
1452 | if (req->n_ssids == 1 && req->ssids[0].ssid_len != 0) | 1461 | if (req->n_ssids == 1 && req->ssids[0].ssid_len != 0) |
1453 | flags |= IWL_MVM_LMAC_SCAN_FLAG_PRE_CONNECTION; | 1462 | flags |= IWL_MVM_LMAC_SCAN_FLAG_PRE_CONNECTION; |