From: John Crispin <john@phrozen.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, John Crispin <john@phrozen.org>
Subject: [PATCH] nl80211: add iftype mask when sending iftype_data
Date: Fri, 12 Apr 2019 14:54:05 +0200 [thread overview]
Message-ID: <20190412125405.17963-1-john@phrozen.org> (raw)
Add the iftype mask to the blob passed to userland. This allows hostapd to
find the entry applicable for constructing the HE beacons of an AP.
Signed-off-by: John Crispin <john@phrozen.org>
---
include/uapi/linux/nl80211.h | 3 +++
net/wireless/nl80211.c | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 84fa62bc2c7d..da6fb7624a11 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -3330,6 +3330,8 @@ enum nl80211_mpath_info {
* capabilities IE
* @NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE: HE PPE thresholds information as
* defined in HE capabilities IE
+ * @NL80211_BAND_IFTYPE_ATTR_TYPE_MASK: The IFTYPEs that this element is
+ * applicable for
* @NL80211_BAND_IFTYPE_ATTR_MAX: highest band HE capability attribute currently
* defined
* @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use
@@ -3342,6 +3344,7 @@ enum nl80211_band_iftype_attr {
NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY,
NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET,
NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,
+ NL80211_BAND_IFTYPE_ATTR_TYPE_MASK,
/* keep last */
__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 25a9e3b5c154..87d1127e8cc1 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1421,7 +1421,9 @@ nl80211_send_iftype_data(struct sk_buff *msg,
sizeof(he_cap->he_mcs_nss_supp),
&he_cap->he_mcs_nss_supp) ||
nla_put(msg, NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,
- sizeof(he_cap->ppe_thres), he_cap->ppe_thres))
+ sizeof(he_cap->ppe_thres), he_cap->ppe_thres) ||
+ nla_put_u16(msg, NL80211_BAND_IFTYPE_ATTR_TYPE_MASK,
+ iftdata->types_mask))
return -ENOBUFS;
}
--
2.11.0
reply other threads:[~2019-04-12 12:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190412125405.17963-1-john@phrozen.org \
--to=john@phrozen.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox