diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-01-12 03:31:10 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-30 15:41:25 -0500 |
commit | 83d5cc012441531ab0bf6f99881958e964e9cf11 (patch) | |
tree | b36a127cd4d735f5b4a0b7fbfbdd3714bceca44f /net/mac80211/ibss.c | |
parent | c037b8367c7e2b775a99d74037f5df014d2fbf06 (diff) |
mac80211: station state transition error handling
In the future, when we start notifying drivers,
state transitions could potentially fail. To make
it easier to distinguish between programming bugs
and driver failures:
* rename sta_info_move_state() to
sta_info_pre_move_state() which can only be
called before the station is inserted (and
check this with a new station flag).
* rename sta_info_move_state_checked() to just
plain sta_info_move_state(), as it will be
the regular function that can fail for more
than just one reason (bad transition or an
error from the driver)
This makes the programming model easier -- one of
the functions can only be called before insertion
and can't fail, the other can fail.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r-- | net/mac80211/ibss.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index d38baa41cf6c..a98d370b56f6 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -265,9 +265,9 @@ static struct sta_info *ieee80211_ibss_finish_sta(struct sta_info *sta, | |||
265 | addr, sdata->name); | 265 | addr, sdata->name); |
266 | #endif | 266 | #endif |
267 | 267 | ||
268 | sta_info_move_state(sta, IEEE80211_STA_AUTH); | 268 | sta_info_pre_move_state(sta, IEEE80211_STA_AUTH); |
269 | sta_info_move_state(sta, IEEE80211_STA_ASSOC); | 269 | sta_info_pre_move_state(sta, IEEE80211_STA_ASSOC); |
270 | sta_info_move_state(sta, IEEE80211_STA_AUTHORIZED); | 270 | sta_info_pre_move_state(sta, IEEE80211_STA_AUTHORIZED); |
271 | 271 | ||
272 | rate_control_rate_init(sta); | 272 | rate_control_rate_init(sta); |
273 | 273 | ||