Skip to content

Commit

Permalink
iwlagn: move all post scan functions in one place
Browse files Browse the repository at this point in the history
Both tx power and power save are being done after scan complete, move into
post_scan function

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Wey-Yi Guy authored and John W. Linville committed Jun 3, 2011
1 parent 15b3f3b commit c2b821d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 7 additions & 0 deletions drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,13 @@ void iwlagn_post_scan(struct iwl_priv *priv)
{
struct iwl_rxon_context *ctx;

/*
* We do not commit power settings while scan is pending,
* do it now if the settings changed.
*/
iwl_power_set_mode(priv, &priv->power_data.sleep_cmd_next, false);
iwl_set_tx_power(priv, priv->tx_power_next, false);

/*
* Since setting the RXON may have been deferred while
* performing the scan, fire one off if needed
Expand Down
7 changes: 0 additions & 7 deletions drivers/net/wireless/iwlwifi/iwl-scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,13 +600,6 @@ static void iwl_bg_scan_completed(struct work_struct *work)
if (!iwl_is_ready_rf(priv))
goto out;

/*
* We do not commit power settings while scan is pending,
* do it now if the settings changed.
*/
iwl_power_set_mode(priv, &priv->power_data.sleep_cmd_next, false);
iwl_set_tx_power(priv, priv->tx_power_next, false);

priv->cfg->ops->utils->post_scan(priv);

out:
Expand Down

0 comments on commit c2b821d

Please sign in to comment.