Commit 9a8aac92 authored by Kieran Frewen's avatar Kieran Frewen Committed by Johannes Berg

wifi: nl80211: support advertising S1G capabilities

Include S1G capabilities in netlink band info messages.
Signed-off-by: default avatarKieran Frewen <kieran.frewen@morsemicro.com>
Co-developed-by: default avatarGilad Itzkovitch <gilad.itzkovitch@morsemicro.com>
Signed-off-by: default avatarGilad Itzkovitch <gilad.itzkovitch@morsemicro.com>
Link: https://lore.kernel.org/r/20230223212917.4010246-1-gilad.itzkovitch@virscient.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 0333a81b
......@@ -4061,6 +4061,10 @@ enum nl80211_band_iftype_attr {
* @NL80211_BAND_ATTR_EDMG_BW_CONFIG: Channel BW Configuration subfield encodes
* the allowed channel bandwidth configurations.
* Defined by IEEE P802.11ay/D4.0 section 9.4.2.251, Table 13.
* @NL80211_BAND_ATTR_S1G_MCS_NSS_SET: S1G capabilities, supported S1G-MCS and NSS
* set subfield, as in the S1G information IE, 5 bytes
* @NL80211_BAND_ATTR_S1G_CAPA: S1G capabilities information subfield as in the
* S1G information IE, 10 bytes
* @NL80211_BAND_ATTR_MAX: highest band attribute currently defined
* @__NL80211_BAND_ATTR_AFTER_LAST: internal use
*/
......@@ -4081,6 +4085,9 @@ enum nl80211_band_attr {
NL80211_BAND_ATTR_EDMG_CHANNELS,
NL80211_BAND_ATTR_EDMG_BW_CONFIG,
NL80211_BAND_ATTR_S1G_MCS_NSS_SET,
NL80211_BAND_ATTR_S1G_CAPA,
/* keep last */
__NL80211_BAND_ATTR_AFTER_LAST,
NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1
......
......@@ -1961,6 +1961,16 @@ static int nl80211_send_band_rateinfo(struct sk_buff *msg,
nla_nest_end(msg, nl_rates);
/* S1G capabilities */
if (sband->band == NL80211_BAND_S1GHZ && sband->s1g_cap.s1g &&
(nla_put(msg, NL80211_BAND_ATTR_S1G_CAPA,
sizeof(sband->s1g_cap.cap),
sband->s1g_cap.cap) ||
nla_put(msg, NL80211_BAND_ATTR_S1G_MCS_NSS_SET,
sizeof(sband->s1g_cap.nss_mcs),
sband->s1g_cap.nss_mcs)))
return -ENOBUFS;
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment