From: Meenakshi Venkataraman Date: Wed, 30 May 2012 09:39:33 +0000 (+0200) Subject: UPSTREAM: mac80211: fix error in station state transitions during reconfig X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=fb03bf52068f36959818a0fa813bec4ff5c98273;p=cascardo%2Flinux.git UPSTREAM: mac80211: fix error in station state transitions during reconfig BUG=chrome-os-partner:10785 TEST=Manual (run wifi test suites) 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. Change-Id: Idd7ac847a66c9ef2eea0d6eaf7347d8a1a4fd792 Cc: stable@kernel.org [3.4] Signed-off-by: Meenakshi Venkataraman Reviewed-by: Emmanuel Grumbach Signed-off-by: Johannes Berg Signed-off-by: John W. Linville Reviewed-on: https://gerrit.chromium.org/gerrit/30880 Reviewed-by: Paul Stewart Commit-Ready: Tan Gao Tested-by: Tan Gao --- diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 3862c966decf..eb9d7c0529b6 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1224,7 +1224,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)); }