mac80211: reset station MLME flags upon new association

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sat Sep 29 10:59:39 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=19c3b8303d4686aa373c669ee833609b3fb403cc
Commit:     19c3b8303d4686aa373c669ee833609b3fb403cc
Parent:     e83e6541cee0a12bc445b0f4fad5214df5803087
Author:     Johannes Berg <johannes.berg at intel.com>
AuthorDate: Wed Aug 1 20:13:36 2012 +0200
Committer:  Johannes Berg <johannes.berg at intel.com>
CommitDate: Wed Aug 1 20:13:36 2012 +0200

    mac80211: reset station MLME flags upon new association
    
    When associating anew, the old station MLME flags should
    be cleared. The only exception is the 40 MHz disable
    flag as it might have been set while the channel was set
    in a previous authentication attempt so it needs to be
    kept intact.
    
    Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 net/mac80211/mlme.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index c416a08..9d60b49 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3357,10 +3357,13 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
 	}
 
 	/* prepare assoc data */
-
-	ifmgd->flags &= ~IEEE80211_STA_DISABLE_11N;
-	ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED;
-	ifmgd->flags &= ~IEEE80211_STA_DISABLE_VHT;
+	
+	/*
+	 * keep only the 40 MHz disable bit set as it might have
+	 * been set during authentication already, all other bits
+	 * should be reset for a new connection
+	 */
+	ifmgd->flags &= IEEE80211_STA_DISABLE_40MHZ;
 
 	ifmgd->beacon_crc_valid = false;
 



More information about the linux-mtd-cvs mailing list