diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2014-04-09 15:29:33 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-04-25 17:08:30 +0200 |
commit | c0166da9fee2aa8de9d1f9460f62d02176c22350 (patch) | |
tree | 1c69b543bd332271501967f9913e0d65d92b6583 /net/mac80211/mlme.c | |
parent | 2b32713d72c093889fe20642f6a8bc42083267d2 (diff) | |
download | lwn-c0166da9fee2aa8de9d1f9460f62d02176c22350.tar.gz lwn-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/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index dee50aefd6e8..98755ce49af3 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1089,7 +1089,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, } chanctx = container_of(rcu_access_pointer(sdata->vif.chanctx_conf), struct ieee80211_chanctx, conf); - if (chanctx->refcount > 1) { + if (ieee80211_chanctx_refcount(local, chanctx) > 1) { sdata_info(sdata, "channel switch with multiple interfaces on the same channel, disconnecting\n"); ieee80211_queue_work(&local->hw, |