All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Cc: quic_vikram@quicinc.com, quic_alokad@quicinc.com,
	quic_jiad@quicinc.com, quic_periyasa@quicinc.com,
	quic_msinada@quicinc.com, quic_srirrama@quicinc.com,
	ilan.peer@intel.com
Subject: [PATCH v2 12/19] mac80211: Support parsing EHT elements
Date: Thu, 10 Feb 2022 20:20:01 +0100	[thread overview]
Message-ID: <20220210201853.daf07c952855.Ib6beb1aa85e25b71ce40d3260b2e5b117cc42308@changeid> (raw)
In-Reply-To: <20220210192008.188166-1-johannes@sipsolutions.net>

From: Ilan Peer <ilan.peer@intel.com>

Parse the new EHT elements in the element parsing utilities.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/ieee80211_i.h |  3 +++
 net/mac80211/util.c        | 11 +++++++++++
 2 files changed, 14 insertions(+)

diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index da35791b8378..538d047d7f27 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1587,6 +1587,8 @@ struct ieee802_11_elems {
 	const struct ieee80211_s1g_oper_ie *s1g_oper;
 	const struct ieee80211_s1g_bcn_compat_ie *s1g_bcn_compat;
 	const struct ieee80211_aid_response_ie *aid_resp;
+	const struct ieee80211_eht_cap_elem *eht_cap;
+	const struct ieee80211_eht_operation *eht_operation;
 
 	/* length of them, respectively */
 	u8 ext_capab_len;
@@ -1608,6 +1610,7 @@ struct ieee802_11_elems {
 	u8 bssid_index_len;
 	u8 tx_pwr_env_len[IEEE80211_TPE_MAX_IE_COUNT];
 	u8 tx_pwr_env_num;
+	u8 eht_cap_len;
 
 	/* whether a parse error occurred while retrieving these elements */
 	bool parse_error;
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 1a8e18794387..b3c3191b86ee 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1008,6 +1008,17 @@ static void ieee80211_parse_extension_element(u32 *crc,
 		if (len >= sizeof(*elems->he_6ghz_capa))
 			elems->he_6ghz_capa = data;
 		break;
+	case WLAN_EID_EXT_EHT_CAPABILITY:
+		if (ieee80211_eht_capa_size_ok(elems->he_cap,
+					       data, len)) {
+			elems->eht_cap = data;
+			elems->eht_cap_len = len;
+		}
+		break;
+	case WLAN_EID_EXT_EHT_OPERATION:
+		if (ieee80211_eht_oper_size_ok(data, len))
+			elems->eht_operation = data;
+		break;
 	}
 }
 
-- 
2.34.1


  parent reply	other threads:[~2022-02-10 19:20 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10 19:19 [PATCH v2 00/19] initial EHT support Johannes Berg
2022-02-10 19:19 ` [PATCH v2 01/19] mac80211_hwsim: check TX and STA bandwidth Johannes Berg
2022-02-10 19:19 ` [PATCH v2 02/19] mac80211_hwsim: don't shadow a global variable Johannes Berg
2022-02-10 19:19 ` [PATCH v2 03/19] mac80211_hwsim: Add custom regulatory for 6GHz Johannes Berg
2022-02-10 19:19 ` [PATCH v2 04/19] ieee80211: Add EHT (802.11be) definitions Johannes Berg
2022-02-10 20:08   ` Johannes Berg
2022-02-10 19:19 ` [PATCH v2 05/19] ieee80211: add EHT 1K aggregation definitions Johannes Berg
2022-02-10 19:19 ` [PATCH v2 06/19] cfg80211: Add data structures to capture EHT capabilities Johannes Berg
2022-02-11 17:37   ` Aloka Dixit (QUIC)
2022-02-11 19:03     ` Johannes Berg
2022-02-14 15:55       ` Aloka Dixit (QUIC)
2022-02-15  7:28         ` Kalle Valo
2022-02-10 19:19 ` [PATCH v2 07/19] cfg80211: Add support for EHT 320 MHz channel width Johannes Berg
2022-02-10 19:19 ` [PATCH v2 08/19] nl80211: add EHT MCS support Johannes Berg
2022-02-10 19:19 ` [PATCH v2 09/19] nl80211: add support for 320MHz channel limitation Johannes Berg
2022-02-10 19:19 ` [PATCH v2 10/19] cfg80211: add NO-EHT flag to regulatory Johannes Berg
2022-02-10 19:20 ` [PATCH v2 11/19] cfg80211: Support configuration of station EHT capabilities Johannes Berg
2022-02-10 19:20 ` Johannes Berg [this message]
2022-02-10 19:20 ` [PATCH v2 13/19] mac80211: Add initial support for EHT and 320 MHz channels Johannes Berg
2022-02-10 19:20 ` [PATCH v2 14/19] mac80211: Add EHT capabilities to association/probe request Johannes Berg
2022-02-10 19:20 ` [PATCH v2 15/19] mac80211: Handle station association response with EHT Johannes Berg
2022-02-10 19:20 ` [PATCH v2 16/19] mac80211: Add support for storing station EHT capabilities Johannes Berg
2022-02-10 19:20 ` [PATCH v2 17/19] mac80211: calculate max RX NSS for EHT mode Johannes Berg
2022-02-10 19:20 ` [PATCH v2 18/19] mac80211: parse AddBA request with extended AddBA element Johannes Berg
2022-02-10 19:20 ` [PATCH v2 19/19] mac80211_hwsim: Advertise support for EHT capabilities Johannes Berg

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=20220210201853.daf07c952855.Ib6beb1aa85e25b71ce40d3260b2e5b117cc42308@changeid \
    --to=johannes@sipsolutions.net \
    --cc=ilan.peer@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_alokad@quicinc.com \
    --cc=quic_jiad@quicinc.com \
    --cc=quic_msinada@quicinc.com \
    --cc=quic_periyasa@quicinc.com \
    --cc=quic_srirrama@quicinc.com \
    --cc=quic_vikram@quicinc.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.