summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-07-12 18:32:49 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-07-15 11:43:23 +0200
commit7464f665158e09f3f29116d8d0676824c1f1eeda (patch)
tree87af8f9613720815b3eb871d45069e7965f7c76c /net/wireless
parent74e1309acedc1f091722f33e752aeb87d4ed4c33 (diff)
downloadlwn-7464f665158e09f3f29116d8d0676824c1f1eeda.tar.gz
lwn-7464f665158e09f3f29116d8d0676824c1f1eeda.zip
wifi: cfg80211: add cfg80211_get_iftype_ext_capa()
Add a helper function cfg80211_get_iftype_ext_capa() to look up interface type-specific (extended) capabilities. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/util.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index fe7956c8c6da..2c127951764a 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -2490,3 +2490,17 @@ int cfg80211_remove_virtual_intf(struct cfg80211_registered_device *rdev,
return rdev_del_virtual_intf(rdev, wdev);
}
+
+const struct wiphy_iftype_ext_capab *
+cfg80211_get_iftype_ext_capa(struct wiphy *wiphy, enum nl80211_iftype type)
+{
+ int i;
+
+ for (i = 0; i < wiphy->num_iftype_ext_capab; i++) {
+ if (wiphy->iftype_ext_capab[i].iftype == type)
+ return &wiphy->iftype_ext_capab[i];
+ }
+
+ return NULL;
+}
+EXPORT_SYMBOL(cfg80211_get_iftype_ext_capa);