Files
linux-stable-mirror/net/mac80211/uhr.c
T
Johannes Berg f6310f043f 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>
2026-05-05 14:49:01 +02:00

28 lines
669 B
C

// SPDX-License-Identifier: GPL-2.0-only
/*
* UHR handling
*
* Copyright(c) 2025-2026 Intel Corporation
*/
#include "ieee80211_i.h"
void
ieee80211_uhr_cap_ie_to_sta_uhr_cap(struct ieee80211_sub_if_data *sdata,
struct ieee80211_supported_band *sband,
const struct ieee80211_uhr_cap *uhr_cap,
u8 uhr_cap_len,
struct link_sta_info *link_sta)
{
struct ieee80211_sta_uhr_cap *sta_uhr_cap = &link_sta->pub->uhr_cap;
memset(sta_uhr_cap, 0, sizeof(*sta_uhr_cap));
if (!ieee80211_get_uhr_iftype_cap_vif(sband, &sdata->vif))
return;
sta_uhr_cap->has_uhr = true;
sta_uhr_cap->mac = uhr_cap->mac;
sta_uhr_cap->phy = uhr_cap->phy;
}