From: Miri Korenblit <miriam.rachel.korenblit@intel.com>
To: linux-wireless@vger.kernel.org
Cc: Benjamin Berg <benjamin.berg@intel.com>, Ilan Peer <ilan.peer@intel.com>
Subject: [PATCH v4 wireless-next] wifi: mac80211: ignore reserved bits in reconfiguration status
Date: Wed, 25 Mar 2026 21:57:39 +0200 [thread overview]
Message-ID: <20260325215404.ab5ccf4bc62e.I9aef8f4fb6f1b06671bb6cf0e2bd4ec6e4c8bda4@changeid> (raw)
From: Benjamin Berg <benjamin.berg@intel.com>
The Link ID Info field in the Reconfiguration Status Duple subfield of
the Reconfiguration Response frame only uses the lower four bits for the
link ID. The upper bits are reserved and should therefore be ignored.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
---
include/linux/ieee80211.h | 7 +++++++
net/mac80211/mlme.c | 14 ++++++++------
2 files changed, 15 insertions(+), 6 deletions(-)
--
v2: added structs and macros, as required.
v3: fixed Fixes tag
v4: added the requested structures again...
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 52db36120314..b5d649db123f 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1194,6 +1194,13 @@ struct ieee80211_mgmt {
#define IEEE80211_MIN_ACTION_SIZE(type) offsetofend(struct ieee80211_mgmt, u.action.type)
+/* Link Reconfiguration Status Duple field */
+struct ieee80211_ml_reconf_status {
+ u8 info;
+ __le16 status;
+} __packed;
+
+#define IEEE80211_ML_RECONF_LINK_ID_MASK 0xf
/* Management MIC information element (IEEE 802.11w) for CMAC */
struct ieee80211_mmie {
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 173a60360a45..7fc5616cb244 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -10459,8 +10459,8 @@ void ieee80211_process_ml_reconf_resp(struct ieee80211_sub_if_data *sdata,
pos = mgmt->u.action.ml_reconf_resp.variable;
len -= offsetofend(typeof(*mgmt), u.action.ml_reconf_resp);
- /* each status duple is 3 octets */
- if (len < mgmt->u.action.ml_reconf_resp.count * 3) {
+ if (len < mgmt->u.action.ml_reconf_resp.count *
+ sizeof(struct ieee80211_ml_reconf_status)) {
sdata_info(sdata,
"mlo: reconf: unexpected len=%zu, count=%u\n",
len, mgmt->u.action.ml_reconf_resp.count);
@@ -10469,9 +10469,11 @@ void ieee80211_process_ml_reconf_resp(struct ieee80211_sub_if_data *sdata,
link_mask = sta_changed_links;
for (i = 0; i < mgmt->u.action.ml_reconf_resp.count; i++) {
- u16 status = get_unaligned_le16(pos + 1);
+ struct ieee80211_ml_reconf_status *reconf_status = (void *)pos;
+ u16 status = le16_to_cpu(reconf_status->status);
- link_id = *pos;
+ link_id = u8_get_bits(reconf_status->info,
+ IEEE80211_ML_RECONF_LINK_ID_MASK);
if (!(link_mask & BIT(link_id))) {
sdata_info(sdata,
@@ -10506,8 +10508,8 @@ void ieee80211_process_ml_reconf_resp(struct ieee80211_sub_if_data *sdata,
sdata->u.mgd.reconf.added_links &= ~BIT(link_id);
}
- pos += 3;
- len -= 3;
+ pos += sizeof(*reconf_status);
+ len -= sizeof(*reconf_status);
}
if (link_mask) {
--
2.34.1
reply other threads:[~2026-03-25 19:57 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=20260325215404.ab5ccf4bc62e.I9aef8f4fb6f1b06671bb6cf0e2bd4ec6e4c8bda4@changeid \
--to=miriam.rachel.korenblit@intel.com \
--cc=benjamin.berg@intel.com \
--cc=ilan.peer@intel.com \
--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