File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -2359,6 +2359,7 @@ static bool reg_wdev_chan_valid(struct wiphy *wiphy, struct wireless_dev *wdev)
2359
2359
struct cfg80211_chan_def chandef = {};
2360
2360
struct cfg80211_registered_device * rdev = wiphy_to_rdev (wiphy );
2361
2361
enum nl80211_iftype iftype ;
2362
+ bool ret ;
2362
2363
2363
2364
wdev_lock (wdev );
2364
2365
iftype = wdev -> iftype ;
@@ -2408,7 +2409,11 @@ static bool reg_wdev_chan_valid(struct wiphy *wiphy, struct wireless_dev *wdev)
2408
2409
case NL80211_IFTYPE_AP :
2409
2410
case NL80211_IFTYPE_P2P_GO :
2410
2411
case NL80211_IFTYPE_ADHOC :
2411
- return cfg80211_reg_can_beacon_relax (wiphy , & chandef , iftype );
2412
+ wiphy_lock (wiphy );
2413
+ ret = cfg80211_reg_can_beacon_relax (wiphy , & chandef , iftype );
2414
+ wiphy_unlock (wiphy );
2415
+
2416
+ return ret ;
2412
2417
case NL80211_IFTYPE_STATION :
2413
2418
case NL80211_IFTYPE_P2P_CLIENT :
2414
2419
return cfg80211_chandef_usable (wiphy , & chandef ,
You can’t perform that action at this time.
0 commit comments