Skip to content

Commit

Permalink
mac80211: reset station MLME flags upon new association
Browse files Browse the repository at this point in the history
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@intel.com>
  • Loading branch information
Johannes Berg committed Aug 1, 2012
1 parent e83e654 commit 19c3b83
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 19c3b83

Please sign in to comment.