diff options
author | Johannes Berg | 2010-09-03 15:32:21 +0200 |
---|---|---|
committer | Wey-Yi Guy | 2010-09-11 17:51:39 +0200 |
commit | 763cc3bf5c2ae189a929fce54759c5bd94b8ba16 (patch) | |
tree | 99d8574d1b8172b4f527d6674908081b6e279355 /drivers/net/wireless/iwlwifi/iwl-core.c | |
parent | iwlwifi: allow configure protection mode (diff) | |
download | kernel-qcow2-linux-763cc3bf5c2ae189a929fce54759c5bd94b8ba16.tar.gz kernel-qcow2-linux-763cc3bf5c2ae189a929fce54759c5bd94b8ba16.tar.xz kernel-qcow2-linux-763cc3bf5c2ae189a929fce54759c5bd94b8ba16.zip |
iwlwifi: avoid sending too many commands
When the PAN context is unused, there's no
need to continually update it in the device.
So track which contexts are active (with the
special case that the WLAN context is always
active ...) and only send their commands to
the device when needed.
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-core.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index a76310311aab..f67cab5bc6f2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c @@ -196,6 +196,9 @@ static void iwl_update_qos(struct iwl_priv *priv, struct iwl_rxon_context *ctx) if (test_bit(STATUS_EXIT_PENDING, &priv->status)) return; + if (!ctx->is_active) + return; + ctx->qos_data.def_qos_parm.qos_flags = 0; if (ctx->qos_data.qos_active) @@ -2008,9 +2011,14 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) */ priv->iw_mode = vif->type; + ctx->is_active = true; + err = iwl_set_mode(priv, vif); - if (err) + if (err) { + if (!ctx->always_active) + ctx->is_active = false; goto out_err; + } if (priv->cfg->advanced_bt_coexist && vif->type == NL80211_IFTYPE_ADHOC) { @@ -2052,6 +2060,9 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw, iwl_scan_cancel_timeout(priv, 100); iwl_set_mode(priv, vif); + if (!ctx->always_active) + ctx->is_active = false; + if (priv->scan_vif == vif) { scan_completed = true; priv->scan_vif = NULL; |