diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-scan.c')
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index d12fd5553846..107e173112f6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
| @@ -265,7 +265,8 @@ inline u16 iwl_get_active_dwell_time(struct iwl_priv *priv, | |||
| 265 | EXPORT_SYMBOL(iwl_get_active_dwell_time); | 265 | EXPORT_SYMBOL(iwl_get_active_dwell_time); |
| 266 | 266 | ||
| 267 | u16 iwl_get_passive_dwell_time(struct iwl_priv *priv, | 267 | u16 iwl_get_passive_dwell_time(struct iwl_priv *priv, |
| 268 | enum ieee80211_band band) | 268 | enum ieee80211_band band, |
| 269 | struct ieee80211_vif *vif) | ||
| 269 | { | 270 | { |
| 270 | u16 passive = (band == IEEE80211_BAND_2GHZ) ? | 271 | u16 passive = (band == IEEE80211_BAND_2GHZ) ? |
| 271 | IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_24 : | 272 | IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_24 : |
| @@ -275,7 +276,7 @@ u16 iwl_get_passive_dwell_time(struct iwl_priv *priv, | |||
| 275 | /* If we're associated, we clamp the maximum passive | 276 | /* If we're associated, we clamp the maximum passive |
| 276 | * dwell time to be 98% of the beacon interval (minus | 277 | * dwell time to be 98% of the beacon interval (minus |
| 277 | * 2 * channel tune time) */ | 278 | * 2 * channel tune time) */ |
| 278 | passive = priv->beacon_int; | 279 | passive = vif ? vif->bss_conf.beacon_int : 0; |
| 279 | if ((passive > IWL_PASSIVE_DWELL_BASE) || !passive) | 280 | if ((passive > IWL_PASSIVE_DWELL_BASE) || !passive) |
| 280 | passive = IWL_PASSIVE_DWELL_BASE; | 281 | passive = IWL_PASSIVE_DWELL_BASE; |
| 281 | passive = (passive * 98) / 100 - IWL_CHANNEL_TUNE_TIME * 2; | 282 | passive = (passive * 98) / 100 - IWL_CHANNEL_TUNE_TIME * 2; |
| @@ -295,7 +296,7 @@ void iwl_init_scan_params(struct iwl_priv *priv) | |||
| 295 | } | 296 | } |
| 296 | EXPORT_SYMBOL(iwl_init_scan_params); | 297 | EXPORT_SYMBOL(iwl_init_scan_params); |
| 297 | 298 | ||
| 298 | static int iwl_scan_initiate(struct iwl_priv *priv) | 299 | static int iwl_scan_initiate(struct iwl_priv *priv, struct ieee80211_vif *vif) |
| 299 | { | 300 | { |
| 300 | WARN_ON(!mutex_is_locked(&priv->mutex)); | 301 | WARN_ON(!mutex_is_locked(&priv->mutex)); |
| 301 | 302 | ||
| @@ -307,7 +308,7 @@ static int iwl_scan_initiate(struct iwl_priv *priv) | |||
| 307 | if (WARN_ON(!priv->cfg->ops->utils->request_scan)) | 308 | if (WARN_ON(!priv->cfg->ops->utils->request_scan)) |
| 308 | return -EOPNOTSUPP; | 309 | return -EOPNOTSUPP; |
| 309 | 310 | ||
| 310 | priv->cfg->ops->utils->request_scan(priv); | 311 | priv->cfg->ops->utils->request_scan(priv, vif); |
| 311 | 312 | ||
| 312 | return 0; | 313 | return 0; |
| 313 | } | 314 | } |
| @@ -348,7 +349,7 @@ int iwl_mac_hw_scan(struct ieee80211_hw *hw, | |||
| 348 | priv->scan_band = req->channels[0]->band; | 349 | priv->scan_band = req->channels[0]->band; |
| 349 | priv->scan_request = req; | 350 | priv->scan_request = req; |
| 350 | 351 | ||
| 351 | ret = iwl_scan_initiate(priv); | 352 | ret = iwl_scan_initiate(priv, vif); |
| 352 | 353 | ||
| 353 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 354 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
| 354 | 355 | ||
| @@ -368,7 +369,7 @@ void iwl_internal_short_hw_scan(struct iwl_priv *priv) | |||
| 368 | queue_work(priv->workqueue, &priv->start_internal_scan); | 369 | queue_work(priv->workqueue, &priv->start_internal_scan); |
| 369 | } | 370 | } |
| 370 | 371 | ||
| 371 | static void iwl_bg_start_internal_scan(struct work_struct *work) | 372 | void iwl_bg_start_internal_scan(struct work_struct *work) |
| 372 | { | 373 | { |
| 373 | struct iwl_priv *priv = | 374 | struct iwl_priv *priv = |
| 374 | container_of(work, struct iwl_priv, start_internal_scan); | 375 | container_of(work, struct iwl_priv, start_internal_scan); |
| @@ -399,10 +400,11 @@ static void iwl_bg_start_internal_scan(struct work_struct *work) | |||
| 399 | if (WARN_ON(!priv->cfg->ops->utils->request_scan)) | 400 | if (WARN_ON(!priv->cfg->ops->utils->request_scan)) |
| 400 | goto unlock; | 401 | goto unlock; |
| 401 | 402 | ||
| 402 | priv->cfg->ops->utils->request_scan(priv); | 403 | priv->cfg->ops->utils->request_scan(priv, NULL); |
| 403 | unlock: | 404 | unlock: |
| 404 | mutex_unlock(&priv->mutex); | 405 | mutex_unlock(&priv->mutex); |
| 405 | } | 406 | } |
| 407 | EXPORT_SYMBOL(iwl_bg_start_internal_scan); | ||
| 406 | 408 | ||
| 407 | void iwl_bg_scan_check(struct work_struct *data) | 409 | void iwl_bg_scan_check(struct work_struct *data) |
| 408 | { | 410 | { |
