summaryrefslogtreecommitdiff
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2024-02-28 11:48:11 +0300
committerJohannes Berg <johannes.berg@intel.com>2024-03-04 16:32:53 +0300
commit68f6c6afbcebdc3acdc6084abfe453f4cba6b9dc (patch)
tree2a76a037466572e6d5ceb83e2f3ab3f8ee48d9ad /net/mac80211/cfg.c
parent0217972f9684b924b2cbd9219e5ed8c53564782b (diff)
downloadlinux-68f6c6afbcebdc3acdc6084abfe453f4cba6b9dc.tar.xz
wifi: mac80211: add ieee80211_vif_link_active() helper
We sometimes need to check if a link is active, and this is complicated by the fact that active_links has no bits set when the vif isn't (acting as) an MLD. Add a small new helper ieee80211_vif_link_active() to make that a bit easier, and use it in a few places. Reviewed-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240228094901.688760aff5f7.I06892a503f5ecb9563fbd678d35d08daf7a044b0@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index b9c1ec2f9cfc..358593eeb500 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3189,8 +3189,7 @@ int __ieee80211_request_smps_mgd(struct ieee80211_sub_if_data *sdata,
if (WARN_ON_ONCE(sdata->vif.type != NL80211_IFTYPE_STATION))
return -EINVAL;
- if (ieee80211_vif_is_mld(&sdata->vif) &&
- !(sdata->vif.active_links & BIT(link->link_id)))
+ if (!ieee80211_vif_link_active(&sdata->vif, link->link_id))
return 0;
old_req = link->u.mgd.req_smps;