diff options
author | Mohamed Abbas <mabbas@linux.intel.com> | 2007-10-25 05:15:46 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-10-25 22:24:48 -0400 |
commit | 15e869d86ee349f5510cf93f6b61e3a5e415c35f (patch) | |
tree | a3a3639d824fef92c9f8710bd5e9a5cf1719a440 /drivers/net/wireless/iwlwifi/iwl3945-base.c | |
parent | 948c171cfe9c63102cfb530af8a4b64e9643dde9 (diff) |
[PATCH] iwl3945: cancel scan on rxon command
This patch fixes the following for 3945:
1. Make sure we cancel scan if RXON command is called.
2. Call scan abort on scan watchdog.
Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
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.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 83019d1d7ccc..f1e19393a5f3 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -6478,8 +6478,9 @@ static void iwl_bg_scan_check(struct work_struct *data) | |||
6478 | IWL_DEBUG(IWL_DL_INFO | IWL_DL_SCAN, | 6478 | IWL_DEBUG(IWL_DL_INFO | IWL_DL_SCAN, |
6479 | "Scan completion watchdog resetting adapter (%dms)\n", | 6479 | "Scan completion watchdog resetting adapter (%dms)\n", |
6480 | jiffies_to_msecs(IWL_SCAN_CHECK_WATCHDOG)); | 6480 | jiffies_to_msecs(IWL_SCAN_CHECK_WATCHDOG)); |
6481 | |||
6481 | if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) | 6482 | if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) |
6482 | queue_work(priv->workqueue, &priv->restart); | 6483 | iwl_send_scan_abort(priv); |
6483 | } | 6484 | } |
6484 | mutex_unlock(&priv->mutex); | 6485 | mutex_unlock(&priv->mutex); |
6485 | } | 6486 | } |
@@ -6575,7 +6576,7 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
6575 | spin_unlock_irqrestore(&priv->lock, flags); | 6576 | spin_unlock_irqrestore(&priv->lock, flags); |
6576 | 6577 | ||
6577 | scan->suspend_time = 0; | 6578 | scan->suspend_time = 0; |
6578 | scan->max_out_time = cpu_to_le32(600 * 1024); | 6579 | scan->max_out_time = cpu_to_le32(200 * 1024); |
6579 | if (!interval) | 6580 | if (!interval) |
6580 | interval = suspend_time; | 6581 | interval = suspend_time; |
6581 | /* | 6582 | /* |
@@ -6744,6 +6745,8 @@ static void iwl_bg_post_associate(struct work_struct *data) | |||
6744 | 6745 | ||
6745 | mutex_lock(&priv->mutex); | 6746 | mutex_lock(&priv->mutex); |
6746 | 6747 | ||
6748 | iwl_scan_cancel_timeout(priv, 200); | ||
6749 | |||
6747 | conf = ieee80211_get_hw_conf(priv->hw); | 6750 | conf = ieee80211_get_hw_conf(priv->hw); |
6748 | 6751 | ||
6749 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 6752 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
@@ -7169,8 +7172,6 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id, | |||
7169 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) | 7172 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) |
7170 | iwl_config_ap(priv); | 7173 | iwl_config_ap(priv); |
7171 | else { | 7174 | else { |
7172 | priv->staging_rxon.filter_flags |= | ||
7173 | RXON_FILTER_ASSOC_MSK; | ||
7174 | rc = iwl_commit_rxon(priv); | 7175 | rc = iwl_commit_rxon(priv); |
7175 | if ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && rc) | 7176 | if ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && rc) |
7176 | iwl_add_station(priv, | 7177 | iwl_add_station(priv, |
@@ -7178,6 +7179,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id, | |||
7178 | } | 7179 | } |
7179 | 7180 | ||
7180 | } else { | 7181 | } else { |
7182 | iwl_scan_cancel_timeout(priv, 100); | ||
7181 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 7183 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
7182 | iwl_commit_rxon(priv); | 7184 | iwl_commit_rxon(priv); |
7183 | } | 7185 | } |
@@ -7238,6 +7240,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | |||
7238 | 7240 | ||
7239 | IWL_DEBUG_MAC80211("enter\n"); | 7241 | IWL_DEBUG_MAC80211("enter\n"); |
7240 | 7242 | ||
7243 | mutex_lock(&priv->mutex); | ||
7241 | spin_lock_irqsave(&priv->lock, flags); | 7244 | spin_lock_irqsave(&priv->lock, flags); |
7242 | 7245 | ||
7243 | if (!iwl_is_ready_rf(priv)) { | 7246 | if (!iwl_is_ready_rf(priv)) { |
@@ -7276,6 +7279,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | |||
7276 | 7279 | ||
7277 | out_unlock: | 7280 | out_unlock: |
7278 | spin_unlock_irqrestore(&priv->lock, flags); | 7281 | spin_unlock_irqrestore(&priv->lock, flags); |
7282 | mutex_unlock(&priv->mutex); | ||
7279 | 7283 | ||
7280 | return rc; | 7284 | return rc; |
7281 | } | 7285 | } |
@@ -7310,6 +7314,8 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
7310 | 7314 | ||
7311 | mutex_lock(&priv->mutex); | 7315 | mutex_lock(&priv->mutex); |
7312 | 7316 | ||
7317 | iwl_scan_cancel_timeout(priv, 100); | ||
7318 | |||
7313 | switch (cmd) { | 7319 | switch (cmd) { |
7314 | case SET_KEY: | 7320 | case SET_KEY: |
7315 | rc = iwl_update_sta_key_info(priv, key, sta_id); | 7321 | rc = iwl_update_sta_key_info(priv, key, sta_id); |
@@ -7479,8 +7485,18 @@ static void iwl_mac_reset_tsf(struct ieee80211_hw *hw) | |||
7479 | 7485 | ||
7480 | spin_unlock_irqrestore(&priv->lock, flags); | 7486 | spin_unlock_irqrestore(&priv->lock, flags); |
7481 | 7487 | ||
7488 | /* we are restarting association process | ||
7489 | * clear RXON_FILTER_ASSOC_MSK bit | ||
7490 | */ | ||
7491 | if (priv->iw_mode != IEEE80211_IF_TYPE_AP) { | ||
7492 | iwl_scan_cancel_timeout(priv, 100); | ||
7493 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | ||
7494 | iwl_commit_rxon(priv); | ||
7495 | } | ||
7496 | |||
7482 | /* Per mac80211.h: This is only used in IBSS mode... */ | 7497 | /* Per mac80211.h: This is only used in IBSS mode... */ |
7483 | if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) { | 7498 | if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) { |
7499 | |||
7484 | IWL_DEBUG_MAC80211("leave - not in IBSS\n"); | 7500 | IWL_DEBUG_MAC80211("leave - not in IBSS\n"); |
7485 | mutex_unlock(&priv->mutex); | 7501 | mutex_unlock(&priv->mutex); |
7486 | return; | 7502 | return; |