From: Johannes Berg <johannes.berg@xxxxxxxxx> Before destroying a station entry, unwind its state so drivers and other code can rely on state transitions happening. Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> --- net/mac80211/sta_info.c | 3 +++ net/mac80211/sta_info.h | 1 + 2 files changed, 4 insertions(+) --- a/net/mac80211/sta_info.h 2011-12-13 19:58:01.000000000 +0100 +++ b/net/mac80211/sta_info.h 2011-12-13 20:15:32.000000000 +0100 @@ -74,6 +74,7 @@ enum ieee80211_sta_info_flags { }; enum ieee80211_sta_state { + /* NOTE: These need to be ordered correctly! */ IEEE80211_STA_NONE, IEEE80211_STA_AUTH, IEEE80211_STA_ASSOC, --- a/net/mac80211/sta_info.c 2011-12-13 19:59:57.000000000 +0100 +++ b/net/mac80211/sta_info.c 2011-12-13 20:17:25.000000000 +0100 @@ -905,6 +905,9 @@ static int __must_check __sta_info_destr if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) RCU_INIT_POINTER(sdata->u.vlan.sta, NULL); + while (sta->sta_state > IEEE80211_STA_NONE) + sta_info_move_state(sta, sta->sta_state - 1); + if (sta->uploaded) { if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) sdata = container_of(sdata->bss, -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html