From: Jay Sternberg <jay.e.sternberg@intel.com>
Date: Fri, 20 Nov 2009 20:05:06 +0000 (-0800)
Subject: iwlwifi: Tell the ucode immediately when association state changes
X-Git-Tag: firefly_0821_release~9833^2~3968^2~214^2~9
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=644c77f0cfa333e58fd4a09450434e89a52d8931;p=firefly-linux-kernel-4.4.55.git

iwlwifi: Tell the ucode immediately when association state changes

When we get a state change of associated or not, we need to tell the
ucode via the RX_ON command using the filter flags.  This will prevent
the ucode from sending any packets when not associated, specifically not
sending NULL QOS packets after a deauthentication which causes the AP to
repeatedly send deauth's in some situations.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---

diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 05a0c413cdf9..2e0fb2804ad0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2478,6 +2478,16 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
 		} else {
 			priv->assoc_id = 0;
 			iwl_led_disassociate(priv);
+
+			/*
+			 * inform the ucode that there is no longer an
+			 * association and that no more packets should be
+			 * send
+			 */
+			priv->staging_rxon.filter_flags &=
+				~RXON_FILTER_ASSOC_MSK;
+			priv->staging_rxon.assoc_id = 0;
+			iwlcore_commit_rxon(priv);
 		}
 	}