aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/wireless/reg.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index c9f5ad5d5d94..7b8309840d4e 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1549,9 +1549,15 @@ static bool reg_wdev_chan_valid(struct wiphy *wiphy, struct wireless_dev *wdev)
1549 ret = cfg80211_reg_can_beacon(wiphy, 1549 ret = cfg80211_reg_can_beacon(wiphy,
1550 &wdev->chandef, wdev->iftype); 1550 &wdev->chandef, wdev->iftype);
1551 break; 1551 break;
1552 case NL80211_IFTYPE_ADHOC:
1553 if (!wdev->ssid_len)
1554 goto out;
1555
1556 ret = cfg80211_reg_can_beacon(wiphy,
1557 &wdev->chandef, wdev->iftype);
1558 break;
1552 case NL80211_IFTYPE_STATION: 1559 case NL80211_IFTYPE_STATION:
1553 case NL80211_IFTYPE_P2P_CLIENT: 1560 case NL80211_IFTYPE_P2P_CLIENT:
1554 case NL80211_IFTYPE_ADHOC:
1555 if (!wdev->current_bss || 1561 if (!wdev->current_bss ||
1556 !wdev->current_bss->pub.channel) 1562 !wdev->current_bss->pub.channel)
1557 goto out; 1563 goto out;