Linux wireless drivers development
 help / color / mirror / Atom feed
From: Pablo MARTIN-GOMEZ <pmartin-gomez@freebox.fr>
To: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH wireless-next v5 1/3] wifi: ieee80211: add some initial UHR definitions
Date: Thu, 29 Jan 2026 12:42:58 +0100	[thread overview]
Message-ID: <0037ce8a-64ca-4986-a937-e35ef92289ab@freebox.fr> (raw)
In-Reply-To: <20260129092039.53d7f326bc8f.I5b11fb0345a933bf497fd802aecc72932d58dd68@changeid>

On 29/01/2026 09:20, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> This is based on Draft P802.11bn_D1.2, but that's still very
> incomplete, so don't handle a number of things and make some
> local decisions such as using 40 bits for MAC capabilities
> and 8 bits for PHY capabilities.
>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
> v5:
>    - use correct EHT MCS len (24 bits, not 24 bytes)
>    - handle DBE AP/non-AP in ieee80211_uhr_capa_size_ok()
> v4:
>    - update to D1.2, including DBE in UHR capabilities
>    - fold in suggestions from Pablo
> ---
>   include/linux/ieee80211-uhr.h | 219 ++++++++++++++++++++++++++++++++++
>   include/linux/ieee80211.h     |  33 ++++-
>   2 files changed, 250 insertions(+), 2 deletions(-)
>   create mode 100644 include/linux/ieee80211-uhr.h
[...]
> +
> +static inline bool ieee80211_uhr_capa_size_ok(const u8 *data, u8 len, bool ap)
> +{
> +	const struct ieee80211_uhr_capa *cap = (const void *)data;
> +	size_t needed = sizeof(*cap) + sizeof(struct ieee80211_uhr_capa_phy);
> +
> +	if (len < needed)
> +		return false;
> +
> +	/*
> +	 * A non-AP STA does not include the DBE Capability Parameters field
> +	 * in the UHR MAC Capabilities Information field.
> +	 */
> +	if (ap && cap->mac.mac_cap[1] & IEEE80211_UHR_MAC_CAP1_DBE_SUPP) {
> +		u8 dbe;
> +
> +		needed += 1;
> +		if (len < needed)
> +			return false;
> +
> +		dbe = cap->variable[0];
> +
> +		if (dbe & IEEE80211_UHR_MAC_CAP_DBE_EHT_MCS_MAP_160_PRES)
> +			needed += 3;
> +
> +		if (dbe & IEEE80211_UHR_MAC_CAP_DBE_EHT_MCS_MAP_320_PRES)
> +			needed += 3;
> +	}
> +
> +	return len >= needed;
> +}
> +
> +static inline const struct ieee80211_uhr_capa_phy *
> +ieee80211_uhr_phy_cap(const struct ieee80211_uhr_capa *cap)
> +{
> +	u8 offs = 0;
> +
> +	if (cap->mac.mac_cap[1] & IEEE80211_UHR_MAC_CAP1_DBE_SUPP) {
Shouldn't we check for 'ap' here too?
> +		u8 dbe = cap->variable[0];
> +
> +		offs += 1;
> +
> +		if (dbe & IEEE80211_UHR_MAC_CAP_DBE_EHT_MCS_MAP_160_PRES)
> +			offs += 3;
> +
> +		if (dbe & IEEE80211_UHR_MAC_CAP_DBE_EHT_MCS_MAP_320_PRES)
> +			offs += 3;
> +	}
> +
> +	return (const void *)&cap->variable[offs];
> +}
> +

[...]

Pablo


  parent reply	other threads:[~2026-01-29 11:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-29  8:20 [PATCH wireless-next v5 1/3] wifi: ieee80211: add some initial UHR definitions Johannes Berg
2026-01-29  8:20 ` [PATCH wireless-next v5 2/3] wifi: cfg80211: add initial UHR support Johannes Berg
2026-01-29  8:20 ` [PATCH wireless-next v5 3/3] wifi: mac80211: " Johannes Berg
2026-01-29 16:43   ` Karthikeyan Kathirvel
2026-01-29 16:45     ` Johannes Berg
2026-01-29 17:20       ` Karthikeyan Kathirvel
2026-01-29 11:42 ` Pablo MARTIN-GOMEZ [this message]
2026-01-29 12:27   ` [PATCH wireless-next v5 1/3] wifi: ieee80211: add some initial UHR definitions Johannes Berg
2026-01-29 12:32     ` 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=0037ce8a-64ca-4986-a937-e35ef92289ab@freebox.fr \
    --to=pmartin-gomez@freebox.fr \
    --cc=johannes.berg@intel.com \
    --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