diff options
author | Ilan Peer <ilan.peer@intel.com> | 2023-06-08 15:36:08 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-06-14 12:20:08 +0200 |
commit | f1871abd27641c020298b5c7654e1d8341f22e5f (patch) | |
tree | fbc909d58b513b90c2a1d31f37e83b8b78ec2c23 /net/mac80211/link.c | |
parent | wifi: mac80211: allow disabling SMPS debugfs controls (diff) | |
download | linux-f1871abd27641c020298b5c7654e1d8341f22e5f.tar.xz linux-f1871abd27641c020298b5c7654e1d8341f22e5f.zip |
wifi: mac80211: Add getter functions for vif MLD state
As a preparation to support disabled/dormant links, add the
following function:
- ieee80211_vif_usable_links(): returns the bitmap of the links
that can be activated. Use this function in all the places that
the bitmap of the usable links is needed.
- ieee80211_vif_is_mld(): returns true iff the vif is an MLD.
Use this function in all the places where an indication that the
connection is a MLD is needed.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230608163202.86e3351da1fc.If6fe3a339fda2019f13f57ff768ecffb711b710a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/link.c')
-rw-r--r-- | net/mac80211/link.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/link.c b/net/mac80211/link.c index e82db88a47f8..5ec60f0d821c 100644 --- a/net/mac80211/link.c +++ b/net/mac80211/link.c @@ -329,7 +329,7 @@ static int _ieee80211_set_active_links(struct ieee80211_sub_if_data *sdata, return -EINVAL; /* cannot activate links that don't exist */ - if (active_links & ~sdata->vif.valid_links) + if (active_links & ~ieee80211_vif_usable_links(&sdata->vif)) return -EINVAL; /* nothing to do */ @@ -485,7 +485,7 @@ void ieee80211_set_active_links_async(struct ieee80211_vif *vif, return; /* cannot activate links that don't exist */ - if (active_links & ~sdata->vif.valid_links) + if (active_links & ~ieee80211_vif_usable_links(&sdata->vif)) return; /* nothing to do */ |