summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShaul Triebitz <shaul.triebitz@intel.com>2018-08-31 11:31:14 +0300
committerJohannes Berg <johannes.berg@intel.com>2018-09-05 10:03:13 +0200
commit244eb9ae797385c2ed244f6bdf0534fcaa6f0d33 (patch)
tree302f5089232b1aa402bfc79ef085332c03796b83
parent03512ceb60ae4be71ed3129dabb8625224c8ec40 (diff)
downloadop-kernel-dev-244eb9ae797385c2ed244f6bdf0534fcaa6f0d33.zip
op-kernel-dev-244eb9ae797385c2ed244f6bdf0534fcaa6f0d33.tar.gz
cfg80211: add he_capabilities (ext) IE to AP settings
Same as for HT and VHT. This helps the lower level to know whether the AP supports HE. Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--include/net/cfg80211.h2
-rw-r--r--net/wireless/nl80211.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 33c2a1d2..9f3ed79 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -849,6 +849,7 @@ struct cfg80211_bitrate_mask {
* @beacon_rate: bitrate to be used for beacons
* @ht_cap: HT capabilities (or %NULL if HT isn't enabled)
* @vht_cap: VHT capabilities (or %NULL if VHT isn't enabled)
+ * @he_cap: HE capabilities (or %NULL if HE isn't enabled)
* @ht_required: stations must support HT
* @vht_required: stations must support VHT
*/
@@ -874,6 +875,7 @@ struct cfg80211_ap_settings {
const struct ieee80211_ht_cap *ht_cap;
const struct ieee80211_vht_cap *vht_cap;
+ const struct ieee80211_he_cap_elem *he_cap;
bool ht_required, vht_required;
};
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index fbd0747..d5f9b52 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4095,6 +4095,9 @@ static void nl80211_calculate_ap_params(struct cfg80211_ap_settings *params)
cap = cfg80211_find_ie(WLAN_EID_VHT_CAPABILITY, ies, ies_len);
if (cap && cap[1] >= sizeof(*params->vht_cap))
params->vht_cap = (void *)(cap + 2);
+ cap = cfg80211_find_ext_ie(WLAN_EID_EXT_HE_CAPABILITY, ies, ies_len);
+ if (cap && cap[1] >= sizeof(*params->he_cap) + 1)
+ params->he_cap = (void *)(cap + 3);
}
static bool nl80211_get_ap_channel(struct cfg80211_registered_device *rdev,
OpenPOWER on IntegriCloud