aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2015-10-25 04:59:40 -0400
committerJohannes Berg <johannes.berg@intel.com>2015-11-03 04:41:02 -0500
commitc189a685b83955a39884dc2bdae531bc0adf3b98 (patch)
tree778f24fc8ba3e0fb57623d3a58a69bcbb1461a78 /net/mac80211
parent43d6df007c0cc111ab8ead8bd95aafab9bb4531d (diff)
mac80211: Remove WARN_ON_ONCE in ieee80211_recalc_smps
The recalc_smps work can run after the station disassociates. At this stage we already released the channel, but the work will be cancelled only when the interface stops. In this scenario we can hit the warning in ieee80211_recalc_smps, so just remove it. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/util.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 7f7ddc527baa..b0e3a4248bd5 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2151,7 +2151,13 @@ void ieee80211_recalc_smps(struct ieee80211_sub_if_data *sdata)
2151 chanctx_conf = rcu_dereference_protected(sdata->vif.chanctx_conf, 2151 chanctx_conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
2152 lockdep_is_held(&local->chanctx_mtx)); 2152 lockdep_is_held(&local->chanctx_mtx));
2153 2153
2154 if (WARN_ON_ONCE(!chanctx_conf)) 2154 /*
2155 * This function can be called from a work, thus it may be possible
2156 * that the chanctx_conf is removed (due to a disconnection, for
2157 * example).
2158 * So nothing should be done in such case.
2159 */
2160 if (!chanctx_conf)
2155 goto unlock; 2161 goto unlock;
2156 2162
2157 chanctx = container_of(chanctx_conf, struct ieee80211_chanctx, conf); 2163 chanctx = container_of(chanctx_conf, struct ieee80211_chanctx, conf);