From: Felix Fietkau Date: Wed, 14 Dec 2022 13:03:26 +0000 (+0100) Subject: wifi: mac80211: fix MLO + AP_VLAN check X-Git-Tag: v6.2-rc5~24^2~40^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f216033d770f7ca0eda491fe01a9f02e7af59576;p=thirdparty%2Fkernel%2Flinux.git wifi: mac80211: fix MLO + AP_VLAN check Instead of preventing adding AP_VLAN to MLO enabled APs, this check was preventing adding more than one 4-addr AP_VLAN regardless of the MLO status. Fix this by adding missing extra checks. Fixes: ae960ee90bb1 ("wifi: mac80211: prevent VLANs on MLDs") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20221214130326.37756-1-nbd@nbd.name Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index d49a5906a9435..e20c3fe9a0b19 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -364,7 +364,9 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata, /* No support for VLAN with MLO yet */ if (iftype == NL80211_IFTYPE_AP_VLAN && - nsdata->wdev.use_4addr) + sdata->wdev.use_4addr && + nsdata->vif.type == NL80211_IFTYPE_AP && + nsdata->vif.valid_links) return -EOPNOTSUPP; /*