diff options
| -rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h | 8 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/scan.c | 53 |
2 files changed, 16 insertions, 45 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h index 9426905de6b2..d73a89ecd78a 100644 --- a/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h +++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h | |||
| @@ -183,9 +183,9 @@ enum iwl_scan_type { | |||
| 183 | * this number of packets were received (typically 1) | 183 | * this number of packets were received (typically 1) |
| 184 | * @passive2active: is auto switching from passive to active during scan allowed | 184 | * @passive2active: is auto switching from passive to active during scan allowed |
| 185 | * @rxchain_sel_flags: RXON_RX_CHAIN_* | 185 | * @rxchain_sel_flags: RXON_RX_CHAIN_* |
| 186 | * @max_out_time: in usecs, max out of serving channel time | 186 | * @max_out_time: in TUs, max out of serving channel time |
| 187 | * @suspend_time: how long to pause scan when returning to service channel: | 187 | * @suspend_time: how long to pause scan when returning to service channel: |
| 188 | * bits 0-19: beacon interal in usecs (suspend before executing) | 188 | * bits 0-19: beacon interal in TUs (suspend before executing) |
| 189 | * bits 20-23: reserved | 189 | * bits 20-23: reserved |
| 190 | * bits 24-31: number of beacons (suspend between channels) | 190 | * bits 24-31: number of beacons (suspend between channels) |
| 191 | * @rxon_flags: RXON_FLG_* | 191 | * @rxon_flags: RXON_FLG_* |
| @@ -383,8 +383,8 @@ enum scan_framework_client { | |||
| 383 | * @quiet_plcp_th: quiet channel num of packets threshold | 383 | * @quiet_plcp_th: quiet channel num of packets threshold |
| 384 | * @good_CRC_th: passive to active promotion threshold | 384 | * @good_CRC_th: passive to active promotion threshold |
| 385 | * @rx_chain: RXON rx chain. | 385 | * @rx_chain: RXON rx chain. |
| 386 | * @max_out_time: max uSec to be out of assoceated channel | 386 | * @max_out_time: max TUs to be out of assoceated channel |
| 387 | * @suspend_time: pause scan this long when returning to service channel | 387 | * @suspend_time: pause scan this TUs when returning to service channel |
| 388 | * @flags: RXON flags | 388 | * @flags: RXON flags |
| 389 | * @filter_flags: RXONfilter | 389 | * @filter_flags: RXONfilter |
| 390 | * @tx_cmd: tx command for active scan; for 2GHz and for 5GHz. | 390 | * @tx_cmd: tx command for active scan; for 2GHz and for 5GHz. |
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c index c91dc8498852..cba88a379fc8 100644 --- a/drivers/net/wireless/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/iwlwifi/mvm/scan.c | |||
| @@ -277,51 +277,22 @@ static void iwl_mvm_scan_calc_params(struct iwl_mvm *mvm, | |||
| 277 | IEEE80211_IFACE_ITER_NORMAL, | 277 | IEEE80211_IFACE_ITER_NORMAL, |
| 278 | iwl_mvm_scan_condition_iterator, | 278 | iwl_mvm_scan_condition_iterator, |
| 279 | &global_bound); | 279 | &global_bound); |
| 280 | /* | ||
| 281 | * Under low latency traffic passive scan is fragmented meaning | ||
| 282 | * that dwell on a particular channel will be fragmented. Each fragment | ||
| 283 | * dwell time is 20ms and fragments period is 105ms. Skipping to next | ||
| 284 | * channel will be delayed by the same period - 105ms. So suspend_time | ||
| 285 | * parameter describing both fragments and channels skipping periods is | ||
| 286 | * set to 105ms. This value is chosen so that overall passive scan | ||
| 287 | * duration will not be too long. Max_out_time in this case is set to | ||
| 288 | * 70ms, so for active scanning operating channel will be left for 70ms | ||
| 289 | * while for passive still for 20ms (fragment dwell). | ||
| 290 | */ | ||
| 291 | if (global_bound) { | ||
| 292 | if (!iwl_mvm_low_latency(mvm)) { | ||
| 293 | params->suspend_time = ieee80211_tu_to_usec(100); | ||
| 294 | params->max_out_time = ieee80211_tu_to_usec(600); | ||
| 295 | } else { | ||
| 296 | params->suspend_time = ieee80211_tu_to_usec(105); | ||
| 297 | /* P2P doesn't support fragmented passive scan, so | ||
| 298 | * configure max_out_time to be at least longest dwell | ||
| 299 | * time for passive scan. | ||
| 300 | */ | ||
| 301 | if (vif->type == NL80211_IFTYPE_STATION && !vif->p2p) { | ||
| 302 | params->max_out_time = ieee80211_tu_to_usec(70); | ||
| 303 | params->passive_fragmented = true; | ||
| 304 | } else { | ||
| 305 | u32 passive_dwell; | ||
| 306 | 280 | ||
| 307 | /* | 281 | if (!global_bound) |
| 308 | * Use band G so that passive channel dwell time | 282 | goto not_bound; |
| 309 | * will be assigned with maximum value. | 283 | |
| 310 | */ | 284 | params->suspend_time = 100; |
| 311 | band = IEEE80211_BAND_2GHZ; | 285 | params->max_out_time = 600; |
| 312 | passive_dwell = iwl_mvm_get_passive_dwell(band); | 286 | |
| 313 | params->max_out_time = | 287 | if (iwl_mvm_low_latency(mvm)) { |
| 314 | ieee80211_tu_to_usec(passive_dwell); | 288 | params->suspend_time = 250; |
| 315 | } | 289 | params->max_out_time = 250; |
| 316 | } | ||
| 317 | } | 290 | } |
| 318 | 291 | ||
| 292 | not_bound: | ||
| 293 | |||
| 319 | for (band = IEEE80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; band++) { | 294 | for (band = IEEE80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; band++) { |
| 320 | if (params->passive_fragmented) | 295 | params->dwell[band].passive = iwl_mvm_get_passive_dwell(band); |
| 321 | params->dwell[band].passive = 20; | ||
| 322 | else | ||
| 323 | params->dwell[band].passive = | ||
| 324 | iwl_mvm_get_passive_dwell(band); | ||
| 325 | params->dwell[band].active = iwl_mvm_get_active_dwell(band, | 296 | params->dwell[band].active = iwl_mvm_get_active_dwell(band, |
| 326 | n_ssids); | 297 | n_ssids); |
| 327 | } | 298 | } |
