Skip to content

Commit

Permalink
mac80211: fix error in station state transitions during reconfig
Browse files Browse the repository at this point in the history
As part of hardware reconfig mac80211 tries
to restore the station state to its values
before the hardware reconfig, but it only
goes to the last-state - 1. Fix this
off-by-one error.

Cc: stable@kernel.org [3.4]
Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Meenakshi Venkataraman authored and John W. Linville committed Jun 4, 2012
1 parent a5fdde2 commit bd34ab6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
enum ieee80211_sta_state state;

for (state = IEEE80211_STA_NOTEXIST;
state < sta->sta_state - 1; state++)
state < sta->sta_state; state++)
WARN_ON(drv_sta_state(local, sta->sdata, sta,
state, state + 1));
}
Expand Down

0 comments on commit bd34ab6

Please sign in to comment.