summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2026-04-28 10:36:57 +0200
committerJohannes Berg <johannes.berg@intel.com>2026-05-05 14:49:01 +0200
commitf6310f043fb4f45f0027da842e46fcddf9c859fe (patch)
treeddc2bf052b2f01529d1c1da93f22c88314d5aeaf /net
parent49e62ec6eb060f86abbb1d88663a51340e512aba (diff)
wifi: mac80211: update UHR capabilities field order
Since 802.11bn D1.4 the DBE capabilities are after the PHY capabilities, not between MAC and PHY, adjust the code accordingly. Also add a struct for DBE capabilities and use it for checking the correct length instead of hard-coding the lengths. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20260428103657.b40af50f182d.I75306a092dc2c8a9eb7276160f0b7144b4846d18@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/main.c3
-rw-r--r--net/mac80211/mlme.c3
-rw-r--r--net/mac80211/uhr.c5
-rw-r--r--net/mac80211/util.c3
4 files changed, 4 insertions, 10 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 8400792d67e2..90d295cc364f 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1463,8 +1463,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
if (supp_uhr)
local->scan_ies_len +=
- 3 + sizeof(struct ieee80211_uhr_cap) +
- sizeof(struct ieee80211_uhr_cap_phy);
+ 3 + sizeof(struct ieee80211_uhr_cap);
if (!local->ops->hw_scan) {
/* For hw_scan, driver needs to set these up. */
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 870711fb8e7e..f404dd0fce43 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2225,8 +2225,7 @@ ieee80211_link_common_elems_size(struct ieee80211_sub_if_data *sdata,
sizeof(struct ieee80211_eht_mcs_nss_supp) +
IEEE80211_EHT_PPE_THRES_MAX_LEN;
- size += 2 + 1 + sizeof(struct ieee80211_uhr_cap) +
- sizeof(struct ieee80211_uhr_cap_phy);
+ size += 2 + 1 + sizeof(struct ieee80211_uhr_cap);
return size;
}
diff --git a/net/mac80211/uhr.c b/net/mac80211/uhr.c
index 2d8f5e5480ef..ca3b471b7981 100644
--- a/net/mac80211/uhr.c
+++ b/net/mac80211/uhr.c
@@ -15,7 +15,6 @@ ieee80211_uhr_cap_ie_to_sta_uhr_cap(struct ieee80211_sub_if_data *sdata,
struct link_sta_info *link_sta)
{
struct ieee80211_sta_uhr_cap *sta_uhr_cap = &link_sta->pub->uhr_cap;
- bool from_ap;
memset(sta_uhr_cap, 0, sizeof(*sta_uhr_cap));
@@ -23,8 +22,6 @@ ieee80211_uhr_cap_ie_to_sta_uhr_cap(struct ieee80211_sub_if_data *sdata,
return;
sta_uhr_cap->has_uhr = true;
-
sta_uhr_cap->mac = uhr_cap->mac;
- from_ap = sdata->vif.type == NL80211_IFTYPE_STATION;
- sta_uhr_cap->phy = *ieee80211_uhr_phy_cap(uhr_cap, from_ap);
+ sta_uhr_cap->phy = uhr_cap->phy;
}
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 61ec2116fab2..00e46b5bc020 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -4641,8 +4641,7 @@ int ieee80211_put_uhr_cap(struct sk_buff *skb,
if (!uhr_cap)
return 0;
- len = 2 + 1 + sizeof(struct ieee80211_uhr_cap) +
- sizeof(struct ieee80211_uhr_cap_phy);
+ len = 2 + 1 + sizeof(struct ieee80211_uhr_cap);
if (skb_tailroom(skb) < len)
return -ENOBUFS;