summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2007-12-20 14:10:01 +0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:07:54 -0800
commita0646470e8a965df59054a5c82e53e5572bf04a0 (patch)
treefe4b434a1b8f2accdcfd3e1055b903ffb20e5d8b /drivers/net/wireless/iwlwifi/iwl3945-base.c
parent12342c475f5de17071eaf24ea2938ba8dfe285f2 (diff)
iwlwifi: skip mac80211 conf during a hardware scan and replay it afterwards
This patch skips mac80211 configuration setting during a hardware scan and replays it afterwards for the iwlwifi drivers. Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 40b69182e4d..8d603257b92 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -6888,8 +6888,8 @@ static void iwl3945_bg_scan_completed(struct work_struct *work)
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return;
- if (priv->cache_conf)
- iwl3945_mac_config(priv->hw, priv->cache_conf);
+ if (test_bit(STATUS_CONF_PENDING, &priv->status))
+ iwl3945_mac_config(priv->hw, ieee80211_get_hw_conf(priv->hw));
ieee80211_scan_completed(priv->hw);
@@ -7033,27 +7033,12 @@ static int iwl3945_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co
goto out;
}
- /* TODO: Figure out how to get ieee80211_local->sta_scanning w/ only
- * what is exposed through include/ declarations */
if (unlikely(!iwl3945_param_disable_hw_scan &&
test_bit(STATUS_SCANNING, &priv->status))) {
-
- if (priv->cache_conf)
- IWL_DEBUG_MAC80211("leave - still scanning\n");
- else {
- /* Cache the configuration now so that we can
- * replay it after the hardware scan is finished. */
- priv->cache_conf = kmalloc(sizeof(*conf), GFP_KERNEL);
- if (priv->cache_conf) {
- memcpy(priv->cache_conf, conf, sizeof(*conf));
- IWL_DEBUG_MAC80211("leave - scanning\n");
- } else {
- IWL_DEBUG_MAC80211("leave - no memory\n");
- ret = -ENOMEM;
- }
- }
+ IWL_DEBUG_MAC80211("leave - scanning\n");
+ set_bit(STATUS_CONF_PENDING, &priv->status);
mutex_unlock(&priv->mutex);
- return ret;
+ return 0;
}
spin_lock_irqsave(&priv->lock, flags);
@@ -7110,10 +7095,7 @@ static int iwl3945_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co
IWL_DEBUG_MAC80211("leave\n");
out:
- if (priv->cache_conf) {
- kfree(priv->cache_conf);
- priv->cache_conf = NULL;
- }
+ clear_bit(STATUS_CONF_PENDING, &priv->status);
mutex_unlock(&priv->mutex);
return ret;
}