summaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2014-04-09 15:29:33 +0200
committerJohannes Berg <johannes.berg@intel.com>2014-04-25 17:08:30 +0200
commitc0166da9fee2aa8de9d1f9460f62d02176c22350 (patch)
tree1c69b543bd332271501967f9913e0d65d92b6583 /net/mac80211/cfg.c
parent2b32713d72c093889fe20642f6a8bc42083267d2 (diff)
downloadblackbird-obmc-linux-c0166da9fee2aa8de9d1f9460f62d02176c22350.tar.gz
blackbird-obmc-linux-c0166da9fee2aa8de9d1f9460f62d02176c22350.zip
mac80211: compute chanctx refcount on-the-fly
It doesn't make much sense to store refcount in the chanctx structure. One still needs to hold chanctx_mtx to get the value safely. Besides, refcount isn't on performance critical paths. This will make implementing chanctx reservation refcounting a little easier. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 9620d4fba0d1..4d15a1566cd5 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3251,7 +3251,7 @@ int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
/* don't handle for multi-VIF cases */
chanctx = container_of(conf, struct ieee80211_chanctx, conf);
- if (chanctx->refcount > 1) {
+ if (ieee80211_chanctx_refcount(local, chanctx) > 1) {
mutex_unlock(&local->chanctx_mtx);
return -EBUSY;
}
OpenPOWER on IntegriCloud