diff options
author | Mohamed Abbas <mabbas@linux.intel.com> | 2007-11-28 22:10:13 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:05:36 -0500 |
commit | 7878a5a4fcc5002e805c054730c4c5639c9d071d (patch) | |
tree | 4c9dafcb1b996548a2220df8458008bc7601bb69 /drivers/net/wireless/iwlwifi/iwl4965-base.c | |
parent | 2bdc7031f9ea1826e16bffc3540d05de891c98bc (diff) |
iwlwifi: enhance WPA authenication stability
This patch enhanced WPA authenication stability by avoiding scan
immediately followed by association. We don't do any scanning right
after association in next several seconds. This will allow WPA
authentication to take place without any interruption.
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/iwl4965-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index e15986c33d0b..670f611adf9f 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -2905,7 +2905,8 @@ static int iwl4965_tx_skb(struct iwl4965_priv *priv, | |||
2905 | IWL_DEBUG_TX("Sending REASSOC frame\n"); | 2905 | IWL_DEBUG_TX("Sending REASSOC frame\n"); |
2906 | #endif | 2906 | #endif |
2907 | 2907 | ||
2908 | if (!iwl4965_is_associated(priv) && | 2908 | /* drop all data frame if we are not associated */ |
2909 | if (!iwl4965_is_associated(priv) && !priv->assoc_id && | ||
2909 | ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA)) { | 2910 | ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA)) { |
2910 | IWL_DEBUG_DROP("Dropping - !iwl4965_is_associated\n"); | 2911 | IWL_DEBUG_DROP("Dropping - !iwl4965_is_associated\n"); |
2911 | goto drop_unlock; | 2912 | goto drop_unlock; |
@@ -4055,6 +4056,7 @@ static void iwl4965_rx_scan_results_notif(struct iwl4965_priv *priv, | |||
4055 | (priv->last_scan_jiffies, jiffies))); | 4056 | (priv->last_scan_jiffies, jiffies))); |
4056 | 4057 | ||
4057 | priv->last_scan_jiffies = jiffies; | 4058 | priv->last_scan_jiffies = jiffies; |
4059 | priv->next_scan_jiffies = 0; | ||
4058 | } | 4060 | } |
4059 | 4061 | ||
4060 | /* Service SCAN_COMPLETE_NOTIFICATION (0x84) */ | 4062 | /* Service SCAN_COMPLETE_NOTIFICATION (0x84) */ |
@@ -4097,6 +4099,7 @@ static void iwl4965_rx_scan_complete_notif(struct iwl4965_priv *priv, | |||
4097 | } | 4099 | } |
4098 | 4100 | ||
4099 | priv->last_scan_jiffies = jiffies; | 4101 | priv->last_scan_jiffies = jiffies; |
4102 | priv->next_scan_jiffies = 0; | ||
4100 | IWL_DEBUG_INFO("Setting scan to off\n"); | 4103 | IWL_DEBUG_INFO("Setting scan to off\n"); |
4101 | 4104 | ||
4102 | clear_bit(STATUS_SCANNING, &priv->status); | 4105 | clear_bit(STATUS_SCANNING, &priv->status); |
@@ -7228,6 +7231,8 @@ static void iwl4965_bg_rx_replenish(struct work_struct *data) | |||
7228 | mutex_unlock(&priv->mutex); | 7231 | mutex_unlock(&priv->mutex); |
7229 | } | 7232 | } |
7230 | 7233 | ||
7234 | #define IWL_DELAY_NEXT_SCAN (HZ*2) | ||
7235 | |||
7231 | static void iwl4965_bg_post_associate(struct work_struct *data) | 7236 | static void iwl4965_bg_post_associate(struct work_struct *data) |
7232 | { | 7237 | { |
7233 | struct iwl4965_priv *priv = container_of(data, struct iwl4965_priv, | 7238 | struct iwl4965_priv *priv = container_of(data, struct iwl4965_priv, |
@@ -7343,6 +7348,8 @@ static void iwl4965_bg_post_associate(struct work_struct *data) | |||
7343 | #ifdef CONFIG_IWL4965_QOS | 7348 | #ifdef CONFIG_IWL4965_QOS |
7344 | iwl4965_activate_qos(priv, 0); | 7349 | iwl4965_activate_qos(priv, 0); |
7345 | #endif /* CONFIG_IWL4965_QOS */ | 7350 | #endif /* CONFIG_IWL4965_QOS */ |
7351 | /* we have just associated, don't start scan too early */ | ||
7352 | priv->next_scan_jiffies = jiffies + IWL_DELAY_NEXT_SCAN; | ||
7346 | mutex_unlock(&priv->mutex); | 7353 | mutex_unlock(&priv->mutex); |
7347 | } | 7354 | } |
7348 | 7355 | ||
@@ -7811,7 +7818,6 @@ static void iwl4965_mac_erp_ie_changed(struct ieee80211_hw *hw, | |||
7811 | iwl4965_send_rxon_assoc(priv); | 7818 | iwl4965_send_rxon_assoc(priv); |
7812 | } | 7819 | } |
7813 | 7820 | ||
7814 | #define IWL_DELAY_NEXT_SCAN (HZ*2) | ||
7815 | static int iwl4965_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | 7821 | static int iwl4965_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) |
7816 | { | 7822 | { |
7817 | int rc = 0; | 7823 | int rc = 0; |
@@ -7835,16 +7841,20 @@ static int iwl4965_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | |||
7835 | goto out_unlock; | 7841 | goto out_unlock; |
7836 | } | 7842 | } |
7837 | 7843 | ||
7844 | /* we don't schedule scan within next_scan_jiffies period */ | ||
7845 | if (priv->next_scan_jiffies && | ||
7846 | time_after(priv->next_scan_jiffies, jiffies)) { | ||
7847 | rc = -EAGAIN; | ||
7848 | goto out_unlock; | ||
7849 | } | ||
7838 | /* if we just finished scan ask for delay */ | 7850 | /* if we just finished scan ask for delay */ |
7839 | if (priv->last_scan_jiffies && | 7851 | if (priv->last_scan_jiffies && time_after(priv->last_scan_jiffies + |
7840 | time_after(priv->last_scan_jiffies + IWL_DELAY_NEXT_SCAN, | 7852 | IWL_DELAY_NEXT_SCAN, jiffies)) { |
7841 | jiffies)) { | ||
7842 | rc = -EAGAIN; | 7853 | rc = -EAGAIN; |
7843 | goto out_unlock; | 7854 | goto out_unlock; |
7844 | } | 7855 | } |
7845 | if (len) { | 7856 | if (len) { |
7846 | IWL_DEBUG_SCAN("direct scan for " | 7857 | IWL_DEBUG_SCAN("direct scan for %s [%d]\n ", |
7847 | "%s [%d]\n ", | ||
7848 | iwl4965_escape_essid(ssid, len), (int)len); | 7858 | iwl4965_escape_essid(ssid, len), (int)len); |
7849 | 7859 | ||
7850 | priv->one_direct_scan = 1; | 7860 | priv->one_direct_scan = 1; |