diff options
author | John Crispin <john@phrozen.org> | 2019-05-21 18:02:58 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-06-14 15:10:47 +0300 |
commit | d7edf40c15e85b44c4bef146819b664089b827b1 (patch) | |
tree | 9c8bf2a9af5b05d1999070ef669c5a03fc39c79a /include/net/cfg80211.h | |
parent | 26f7044e95042daabcf1c71796a0e804a83c979f (diff) | |
download | linux-d7edf40c15e85b44c4bef146819b664089b827b1.tar.xz |
mac80211: add ieee80211_get_he_iftype_cap() helper
This function is similar to ieee80211_get_he_sta_cap() but allows passing
the iftype. Also make ieee80211_get_he_sta_cap() use the new helper
rather than duplicating the code.
Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r-- | include/net/cfg80211.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 4b45056dbb25..20613b35afcd 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -382,16 +382,18 @@ ieee80211_get_sband_iftype_data(const struct ieee80211_supported_band *sband, } /** - * ieee80211_get_he_sta_cap - return HE capabilities for an sband's STA - * @sband: the sband to search for the STA on + * ieee80211_get_he_iftype_cap - return HE capabilities for an sband's iftype + * @sband: the sband to search for the iftype on + * @iftype: enum nl80211_iftype * * Return: pointer to the struct ieee80211_sta_he_cap, or NULL is none found */ static inline const struct ieee80211_sta_he_cap * -ieee80211_get_he_sta_cap(const struct ieee80211_supported_band *sband) +ieee80211_get_he_iftype_cap(const struct ieee80211_supported_band *sband, + u8 iftype) { const struct ieee80211_sband_iftype_data *data = - ieee80211_get_sband_iftype_data(sband, NL80211_IFTYPE_STATION); + ieee80211_get_sband_iftype_data(sband, iftype); if (data && data->he_cap.has_he) return &data->he_cap; @@ -400,6 +402,18 @@ ieee80211_get_he_sta_cap(const struct ieee80211_supported_band *sband) } /** + * ieee80211_get_he_sta_cap - return HE capabilities for an sband's STA + * @sband: the sband to search for the STA on + * + * Return: pointer to the struct ieee80211_sta_he_cap, or NULL is none found + */ +static inline const struct ieee80211_sta_he_cap * +ieee80211_get_he_sta_cap(const struct ieee80211_supported_band *sband) +{ + return ieee80211_get_he_iftype_cap(sband, NL80211_IFTYPE_STATION); +} + +/** * wiphy_read_of_freq_limits - read frequency limits from device tree * * @wiphy: the wireless device to get extra limits for |