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>
This commit is contained in:
committed by
Johannes Berg
parent
2b32713d72
commit
c0166da9fe
@ -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,
|
||||
|
Reference in New Issue
Block a user