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>
This commit is contained in:
committed by
Wey-Yi Guy
parent
903786a562
commit
246ed35522
@@ -290,7 +290,8 @@ u16 iwl_get_passive_dwell_time(struct iwl_priv *priv,
|
||||
IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_24 :
|
||||
IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_52;
|
||||
|
||||
if (iwl_is_associated(priv)) {
|
||||
if (iwl_is_any_associated(priv)) {
|
||||
/* TODO: should use minimum of all contexts */
|
||||
/* If we're associated, we clamp the maximum passive
|
||||
* dwell time to be 98% of the beacon interval (minus
|
||||
* 2 * channel tune time) */
|
||||
@@ -527,6 +528,7 @@ static void iwl_bg_scan_completed(struct work_struct *work)
|
||||
container_of(work, struct iwl_priv, scan_completed);
|
||||
bool internal = false;
|
||||
bool scan_completed = false;
|
||||
struct iwl_rxon_context *ctx;
|
||||
|
||||
IWL_DEBUG_SCAN(priv, "SCAN complete scan\n");
|
||||
|
||||
@@ -557,9 +559,8 @@ static void iwl_bg_scan_completed(struct work_struct *work)
|
||||
* Since setting the RXON may have been deferred while
|
||||
* performing the scan, fire one off if needed
|
||||
*/
|
||||
if (memcmp(&priv->active_rxon,
|
||||
&priv->staging_rxon, sizeof(priv->staging_rxon)))
|
||||
iwlcore_commit_rxon(priv);
|
||||
for_each_context(priv, ctx)
|
||||
iwlcore_commit_rxon(priv, ctx);
|
||||
|
||||
out:
|
||||
mutex_unlock(&priv->mutex);
|
||||
|
Reference in New Issue
Block a user