]> Pileus Git - ~andy/linux/blobdiff - drivers/net/wireless/iwlwifi/iwl-4965.c
iwlwifi: enhance WPA authenication stability
[~andy/linux] / drivers / net / wireless / iwlwifi / iwl-4965.c
index 40c795eaabacbea01442b70e68a5590f3598beb3..c8e7adfe414a0ae211c64ddf472e95517f3d35b9 100644 (file)
@@ -3802,6 +3802,8 @@ static void iwl4965_update_ps_mode(struct iwl4965_priv *priv, u16 ps_bit, u8 *ad
        }
 }
 
+#define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6)
+
 /* Called for REPLY_4965_RX (legacy ABG frames), or
  * REPLY_RX_MPDU_CMD (HT high-throughput N frames). */
 static void iwl4965_rx_reply_rx(struct iwl4965_priv *priv,
@@ -3973,6 +3975,12 @@ static void iwl4965_rx_reply_rx(struct iwl4965_priv *priv,
                                struct ieee80211_mgmt *mgnt =
                                        (struct ieee80211_mgmt *)header;
 
+                               /* We have just associated, give some
+                                * time for the 4-way handshake if
+                                * any. Don't start scan too early. */
+                               priv->next_scan_jiffies = jiffies +
+                                       IWL_DELAY_NEXT_SCAN_AFTER_ASSOC;
+
                                priv->assoc_id = (~((1 << 15) | (1 << 14))
                                        & le16_to_cpu(mgnt->u.assoc_resp.aid));
                                priv->assoc_capability =