diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-23 04:46:32 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-08-27 11:26:47 -0400 |
commit | 246ed355221076884d225f9d8a4c30a048be8162 (patch) | |
tree | 64bba3b115c6f0d7ba245c44b81c38e46adec6c8 /drivers/net/wireless/iwlwifi/iwl-scan.c | |
parent | 903786a5626e7214d97b232bece88ee75e37d021 (diff) |
iwlwifi: initial contextification
In order to support multiple interfaces, we must move
a lot of data into per-context structures so we can
use the contexts the device offers. To start with,
this makes a lot of code context-aware, more changes
will move more things into the context structure.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-scan.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 2939699a120..fe4cb57c3a1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -290,7 +290,8 @@ u16 iwl_get_passive_dwell_time(struct iwl_priv *priv, | |||
290 | IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_24 : | 290 | IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_24 : |
291 | IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_52; | 291 | IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_52; |
292 | 292 | ||
293 | if (iwl_is_associated(priv)) { | 293 | if (iwl_is_any_associated(priv)) { |
294 | /* TODO: should use minimum of all contexts */ | ||
294 | /* If we're associated, we clamp the maximum passive | 295 | /* If we're associated, we clamp the maximum passive |
295 | * dwell time to be 98% of the beacon interval (minus | 296 | * dwell time to be 98% of the beacon interval (minus |
296 | * 2 * channel tune time) */ | 297 | * 2 * channel tune time) */ |
@@ -527,6 +528,7 @@ static void iwl_bg_scan_completed(struct work_struct *work) | |||
527 | container_of(work, struct iwl_priv, scan_completed); | 528 | container_of(work, struct iwl_priv, scan_completed); |
528 | bool internal = false; | 529 | bool internal = false; |
529 | bool scan_completed = false; | 530 | bool scan_completed = false; |
531 | struct iwl_rxon_context *ctx; | ||
530 | 532 | ||
531 | IWL_DEBUG_SCAN(priv, "SCAN complete scan\n"); | 533 | IWL_DEBUG_SCAN(priv, "SCAN complete scan\n"); |
532 | 534 | ||
@@ -557,9 +559,8 @@ static void iwl_bg_scan_completed(struct work_struct *work) | |||
557 | * Since setting the RXON may have been deferred while | 559 | * Since setting the RXON may have been deferred while |
558 | * performing the scan, fire one off if needed | 560 | * performing the scan, fire one off if needed |
559 | */ | 561 | */ |
560 | if (memcmp(&priv->active_rxon, | 562 | for_each_context(priv, ctx) |
561 | &priv->staging_rxon, sizeof(priv->staging_rxon))) | 563 | iwlcore_commit_rxon(priv, ctx); |
562 | iwlcore_commit_rxon(priv); | ||
563 | 564 | ||
564 | out: | 565 | out: |
565 | mutex_unlock(&priv->mutex); | 566 | mutex_unlock(&priv->mutex); |