summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorShaul Triebitz <shaul.triebitz@intel.com>2022-08-01 14:12:29 +0300
committerJohannes Berg <johannes.berg@intel.com>2022-08-25 11:40:52 +0300
commitbc1857619cc7612117d2ee1ed05b5bfeb638614b (patch)
tree9ce217ace79fb16e267da1e0bee10914a2373d3f /net/wireless
parentdd1671ed4ae855a36c5d02d29d7b47e129d7abaf (diff)
downloadlinux-bc1857619cc7612117d2ee1ed05b5bfeb638614b.tar.xz
wifi: cfg80211: get correct AP link chandef
When checking for channel regulatory validity, use the AP link chandef (and not mesh's chandef). Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs") Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/reg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index c7383ede794f..d5c7a5aa6853 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2389,6 +2389,10 @@ static bool reg_wdev_chan_valid(struct wiphy *wiphy, struct wireless_dev *wdev)
switch (iftype) {
case NL80211_IFTYPE_AP:
case NL80211_IFTYPE_P2P_GO:
+ if (!wdev->links[link].ap.beacon_interval)
+ continue;
+ chandef = wdev->links[link].ap.chandef;
+ break;
case NL80211_IFTYPE_MESH_POINT:
if (!wdev->u.mesh.beacon_interval)
continue;