mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 10:24:01 -04:00
wifi: mac80211: hold wiphy_lock around concurrency checks
We want to replace the locking in mac80211 by just the wiphy mutex, so hold the lock here around concurrency checks for the future where the chanctx_mtx used inside goes away. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -430,12 +430,13 @@ static int ieee80211_open(struct net_device *dev)
|
||||
if (!is_valid_ether_addr(dev->dev_addr))
|
||||
return -EADDRNOTAVAIL;
|
||||
|
||||
wiphy_lock(sdata->local->hw.wiphy);
|
||||
err = ieee80211_check_concurrent_iface(sdata, sdata->vif.type);
|
||||
if (err)
|
||||
return err;
|
||||
goto out;
|
||||
|
||||
wiphy_lock(sdata->local->hw.wiphy);
|
||||
err = ieee80211_do_open(&sdata->wdev, true);
|
||||
out:
|
||||
wiphy_unlock(sdata->local->hw.wiphy);
|
||||
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user