aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authormabbas <mabbas@linux.intel.com>2007-10-25 05:15:43 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-10-25 22:15:43 -0400
commit052c4b9f0a83a83f3fee735b57c5b1e4edc1da8c (patch)
treec5a05691c440649b700b5026e616a9ed4775534b /drivers
parent702004b7455e0c4dcf875dd2f638d611892ea84f (diff)
[PATCH] iwl4965: fix driver hang related to hardware scan
This patch fix the following: 1. make sure we are not scanning before we call REPLY_RXON 2. set RXON_FILTER_ASSOC_MSK only after we receive association response 3. call scan abort on scan watchdog instead of restart 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')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c24
2 files changed, 21 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 407336719a69..891f90d2f019 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -3870,7 +3870,7 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv,
3870 */ 3870 */
3871 case IEEE80211_STYPE_ASSOC_RESP: 3871 case IEEE80211_STYPE_ASSOC_RESP:
3872 case IEEE80211_STYPE_REASSOC_RESP: 3872 case IEEE80211_STYPE_REASSOC_RESP:
3873 if (network_packet && iwl_is_associated(priv)) { 3873 if (network_packet) {
3874#ifdef CONFIG_IWLWIFI_HT 3874#ifdef CONFIG_IWLWIFI_HT
3875 u8 *pos = NULL; 3875 u8 *pos = NULL;
3876 struct ieee802_11_elems elems; 3876 struct ieee802_11_elems elems;
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 5e1279263b22..27b8569b659e 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -6845,8 +6845,9 @@ static void iwl_bg_scan_check(struct work_struct *data)
6845 IWL_DEBUG(IWL_DL_INFO | IWL_DL_SCAN, 6845 IWL_DEBUG(IWL_DL_INFO | IWL_DL_SCAN,
6846 "Scan completion watchdog resetting adapter (%dms)\n", 6846 "Scan completion watchdog resetting adapter (%dms)\n",
6847 jiffies_to_msecs(IWL_SCAN_CHECK_WATCHDOG)); 6847 jiffies_to_msecs(IWL_SCAN_CHECK_WATCHDOG));
6848
6848 if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) 6849 if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
6849 queue_work(priv->workqueue, &priv->restart); 6850 iwl_send_scan_abort(priv);
6850 } 6851 }
6851 mutex_unlock(&priv->mutex); 6852 mutex_unlock(&priv->mutex);
6852} 6853}
@@ -6942,7 +6943,7 @@ static void iwl_bg_request_scan(struct work_struct *data)
6942 spin_unlock_irqrestore(&priv->lock, flags); 6943 spin_unlock_irqrestore(&priv->lock, flags);
6943 6944
6944 scan->suspend_time = 0; 6945 scan->suspend_time = 0;
6945 scan->max_out_time = cpu_to_le32(600 * 1024); 6946 scan->max_out_time = cpu_to_le32(200 * 1024);
6946 if (!interval) 6947 if (!interval)
6947 interval = suspend_time; 6948 interval = suspend_time;
6948 6949
@@ -7118,6 +7119,8 @@ static void iwl_bg_post_associate(struct work_struct *data)
7118 7119
7119 mutex_lock(&priv->mutex); 7120 mutex_lock(&priv->mutex);
7120 7121
7122 iwl_scan_cancel_timeout(priv, 200);
7123
7121 conf = ieee80211_get_hw_conf(priv->hw); 7124 conf = ieee80211_get_hw_conf(priv->hw);
7122 7125
7123 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; 7126 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
@@ -7573,8 +7576,6 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,
7573 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) 7576 if (priv->iw_mode == IEEE80211_IF_TYPE_AP)
7574 iwl_config_ap(priv); 7577 iwl_config_ap(priv);
7575 else { 7578 else {
7576 priv->staging_rxon.filter_flags |=
7577 RXON_FILTER_ASSOC_MSK;
7578 rc = iwl_commit_rxon(priv); 7579 rc = iwl_commit_rxon(priv);
7579 if ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && rc) 7580 if ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && rc)
7580 iwl_rxon_add_station( 7581 iwl_rxon_add_station(
@@ -7582,6 +7583,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,
7582 } 7583 }
7583 7584
7584 } else { 7585 } else {
7586 iwl_scan_cancel_timeout(priv, 100);
7585 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; 7587 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
7586 iwl_commit_rxon(priv); 7588 iwl_commit_rxon(priv);
7587 } 7589 }
@@ -7642,6 +7644,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)
7642 7644
7643 IWL_DEBUG_MAC80211("enter\n"); 7645 IWL_DEBUG_MAC80211("enter\n");
7644 7646
7647 mutex_lock(&priv->mutex);
7645 spin_lock_irqsave(&priv->lock, flags); 7648 spin_lock_irqsave(&priv->lock, flags);
7646 7649
7647 if (!iwl_is_ready_rf(priv)) { 7650 if (!iwl_is_ready_rf(priv)) {
@@ -7680,6 +7683,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)
7680 7683
7681out_unlock: 7684out_unlock:
7682 spin_unlock_irqrestore(&priv->lock, flags); 7685 spin_unlock_irqrestore(&priv->lock, flags);
7686 mutex_unlock(&priv->mutex);
7683 7687
7684 return rc; 7688 return rc;
7685} 7689}
@@ -7713,6 +7717,8 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
7713 7717
7714 mutex_lock(&priv->mutex); 7718 mutex_lock(&priv->mutex);
7715 7719
7720 iwl_scan_cancel_timeout(priv, 100);
7721
7716 switch (cmd) { 7722 switch (cmd) {
7717 case SET_KEY: 7723 case SET_KEY:
7718 rc = iwl_update_sta_key_info(priv, key, sta_id); 7724 rc = iwl_update_sta_key_info(priv, key, sta_id);
@@ -7903,8 +7909,18 @@ static void iwl_mac_reset_tsf(struct ieee80211_hw *hw)
7903 7909
7904 spin_unlock_irqrestore(&priv->lock, flags); 7910 spin_unlock_irqrestore(&priv->lock, flags);
7905 7911
7912 /* we are restarting association process
7913 * clear RXON_FILTER_ASSOC_MSK bit
7914 */
7915 if (priv->iw_mode != IEEE80211_IF_TYPE_AP) {
7916 iwl_scan_cancel_timeout(priv, 100);
7917 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
7918 iwl_commit_rxon(priv);
7919 }
7920
7906 /* Per mac80211.h: This is only used in IBSS mode... */ 7921 /* Per mac80211.h: This is only used in IBSS mode... */
7907 if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) { 7922 if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) {
7923
7908 IWL_DEBUG_MAC80211("leave - not in IBSS\n"); 7924 IWL_DEBUG_MAC80211("leave - not in IBSS\n");
7909 mutex_unlock(&priv->mutex); 7925 mutex_unlock(&priv->mutex);
7910 return; 7926 return;