From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Subject: [RFC 3/4] mac80211: unwind station state on destroy
Date: Tue, 13 Dec 2011 21:07:20 +0100 [thread overview]
Message-ID: <20111213201449.856309539@sipsolutions.net> (raw)
In-Reply-To: 20111213200717.465896579@sipsolutions.net
From: Johannes Berg <johannes.berg@intel.com>
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@intel.com>
---
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,
next prev parent reply other threads:[~2011-12-13 20:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-13 20:07 [RFC 0/4] refactor station state management Johannes Berg
2011-12-13 20:07 ` [RFC 1/4] mac80211: use station mutex in configuration Johannes Berg
2011-12-13 20:07 ` [RFC 2/4] mac80211: refactor station state transitions Johannes Berg
2011-12-14 0:29 ` Thomas Pedersen
2011-12-14 8:22 ` Johannes Berg
2011-12-13 20:07 ` Johannes Berg [this message]
2011-12-13 20:07 ` [RFC 4/4] mac80211: count authorized stations per BSS Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111213201449.856309539@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).