]> git.baikalelectronics.ru Git - kernel.git/commitdiff
wifi: mac80211: prevent 4-addr use on MLDs
authorJohannes Berg <johannes.berg@intel.com>
Fri, 2 Sep 2022 14:12:58 +0000 (16:12 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Sat, 3 Sep 2022 14:57:34 +0000 (16:57 +0200)
We haven't tried this yet, and it's not very likely to
work well right now, so for now disable 4-addr use on
interfaces that are MLDs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20220902161143.f2e4cc2efaa1.I5924e8fb44a2d098b676f5711b36bbc1b1bd68e2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c
net/mac80211/mlme.c

index b5522edbe05db120e5d180a096219f3ff7439e54..687b4c878d4ad385b72f19474c1571bac7b3116f 100644 (file)
@@ -226,6 +226,10 @@ static int ieee80211_change_iface(struct wiphy *wiphy,
                if (params->use_4addr == ifmgd->use_4addr)
                        return 0;
 
+               /* FIXME: no support for 4-addr MLO yet */
+               if (sdata->vif.valid_links)
+                       return -EOPNOTSUPP;
+
                sdata->u.mgd.use_4addr = params->use_4addr;
                if (!ifmgd->associated)
                        return 0;
@@ -4697,6 +4701,9 @@ static int ieee80211_add_intf_link(struct wiphy *wiphy,
 {
        struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
 
+       if (wdev->use_4addr)
+               return -EOPNOTSUPP;
+
        return ieee80211_vif_set_links(sdata, wdev->valid_links);
 }
 
index 00d0c433fa2ba2e2d4ab69878c7d3d39c4bf4e65..05a889c6b3755f6be359c77e68e6d3c4b365c1d2 100644 (file)
@@ -6894,6 +6894,10 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
                }
        }
 
+       /* FIXME: no support for 4-addr MLO yet */
+       if (sdata->u.mgd.use_4addr && req->link_id >= 0)
+               return -EOPNOTSUPP;
+
        assoc_data = kzalloc(size, GFP_KERNEL);
        if (!assoc_data)
                return -ENOMEM;