Commit 721632c3 authored by Meenakshi Venkataraman's avatar Meenakshi Venkataraman Committed by Greg Kroah-Hartman

mac80211: fix error in station state transitions during reconfig

commit bd34ab62 upstream.

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.
Signed-off-by: default avatarMeenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f4c3d440
...@@ -1224,7 +1224,7 @@ int ieee80211_reconfig(struct ieee80211_local *local) ...@@ -1224,7 +1224,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
enum ieee80211_sta_state state; enum ieee80211_sta_state state;
for (state = IEEE80211_STA_NOTEXIST; 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, WARN_ON(drv_sta_state(local, sta->sdata, sta,
state, state + 1)); state, state + 1));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment