mirror of https://lore.kernel.org/ath12k/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Karthikeyan Kathirvel <karthikeyan.kathirvel@oss.qualcomm.com>
Cc: linux-wireless@vger.kernel.org, ath12k@lists.infradead.org
Subject: Re: [PATCH wireless-next v4 1/2] wifi: UHR: define DPS/DBE/P-EDCA elements and fix size parsing
Date: Tue, 24 Feb 2026 17:32:45 +0100	[thread overview]
Message-ID: <6cec588857a8fa5866b3aff323c367b0096e613a.camel@sipsolutions.net> (raw)
In-Reply-To: <20260217054731.3667600-2-karthikeyan.kathirvel@oss.qualcomm.com>

On Tue, 2026-02-17 at 11:17 +0530, Karthikeyan Kathirvel wrote:
> 
> + * Refer to IEEE80211_UHR_P_EDCA*
> + * @p_edca_ec: The P-EDCA ECWmin, P-EDCA and ECWmax

that seems unclear?


> + * @p_edca_params: The AIFSN field indicate the AIFSN value that are

"indicates", "value that is used"? I think it's one? Or "values that are
used"

> + *	used by a P-EDCA STA during P-EDCA contention.
> + *	The CW DS field indicate the value used

indicates

> + *	for the randomization of the transmission slot of the DS-CTS
> + *	frame. The value 3 is reserved. The value 0 indicate that

indicates

> + *	randomization not enabled.
> + *	The P-EDCA PSRC threshold field indicates the maximum number
> + *	of allowed consecutive DS-CTS transmissions. The value 0 and
> + *	values greater than 4 are reserved
> + *	The P-EDCA QSRC threshold field indicates the value of the
> + *	QSRC[AC_VO] counter to be allowed to start P-EDCA contention.
> + *	The value 0 is reserved.
> + */
> +struct ieee80211_uhr_p_edca_info {
> +	u8 p_edca_ec;
> +	__le16 p_edca_params;
> +} __packed;
> +
>  static inline bool ieee80211_uhr_oper_size_ok(const u8 *data, u8 len,
>  					      bool beacon)
>  {
> @@ -47,19 +232,52 @@ static inline bool ieee80211_uhr_oper_size_ok(const u8 *data, u8 len,
>  	if (beacon)
>  		return true;
>  
> -	/* FIXME: DPS, DBE, P-EDCA (consider order, also relative to NPCA) */
> +	/* DPS Operation Parameters (fixed 4 bytes) */
> +	if (oper->params & cpu_to_le16(IEEE80211_UHR_OPER_PARAMS_DPS_ENA)) {
> +		needed += sizeof(struct ieee80211_uhr_dps_info);
> +		if (len < needed)
> +			return false;
> +	}
>  
> +	/* NPCA Operation Parameters (fixed 4 bytes + optional 2 bytes) */
>  	if (oper->params & cpu_to_le16(IEEE80211_UHR_OPER_PARAMS_NPCA_ENA)) {
>  		const struct ieee80211_uhr_npca_info *npca =
> -			(const void *)oper->variable;
> +			(const void *)(data + needed);
>  
>  		needed += sizeof(*npca);
> -
>  		if (len < needed)
>  			return false;
>  
> -		if (npca->params & cpu_to_le32(IEEE80211_UHR_NPCA_PARAMS_DIS_SUBCH_BMAP_PRES))
> +		if (npca->params &
> +		    cpu_to_le32(IEEE80211_UHR_NPCA_PARAMS_DIS_SUBCH_BMAP_PRES)) {
>  			needed += sizeof(npca->dis_subch_bmap[0]);
> +			if (len < needed)
> +				return false;
> +		}
> +	}
> +
> +	/* P-EDCA Operation Parameters (fixed 3 bytes) */
> +	if (oper->params & cpu_to_le16(IEEE80211_UHR_OPER_PARAMS_PEDCA_ENA)) {
> +		needed += sizeof(struct ieee80211_uhr_p_edca_info);
> +		if (len < needed)
> +			return false;
> +	}
> +
> +	/* DBE Operation Parameters (fixed 1 byte + optional 2 bytes) */
> +	if (oper->params & cpu_to_le16(IEEE80211_UHR_OPER_PARAMS_DBE_ENA)) {
> +		const struct ieee80211_uhr_dbe_info *dbe =
> +			(const void *)(data + needed);
> +
> +		needed += sizeof(*dbe);
> +		if (len < needed)
> +			return false;
> +
> +		if (dbe->dbe_params &
> +		    IEEE80211_UHR_DBE_OPER_DIS_SUBCHANNEL_BITMAP_PRES) {
> +			needed += sizeof(dbe->dis_subch_bmap[0]);
> +			if (len < needed)
> +				return false;
> +		}
>  	}
>  
>  	return len >= needed;
> @@ -72,12 +290,15 @@ static inline bool ieee80211_uhr_oper_size_ok(const u8 *data, u8 len,
>  static inline const struct ieee80211_uhr_npca_info *
>  ieee80211_uhr_npca_info(const struct ieee80211_uhr_operation *oper)
>  {
> +	const u8 *pos = oper->variable;
> +
>  	if (!(oper->params & cpu_to_le16(IEEE80211_UHR_OPER_PARAMS_NPCA_ENA)))
>  		return NULL;
>  
> -	/* FIXME: DPS */
> +	if (oper->params & cpu_to_le16(IEEE80211_UHR_OPER_PARAMS_DPS_ENA))
> +		pos += sizeof(struct ieee80211_uhr_dps_info);
>  
> -	return (const void *)oper->variable;
> +	return (const void *)pos;
>  }
>  
>  static inline const __le16 *
> @@ -131,6 +352,25 @@ ieee80211_uhr_npca_dis_subch_bitmap(const struct ieee80211_uhr_operation *oper)
>  #define IEEE80211_UHR_MAC_CAP_DBE_EHT_MCS_MAP_160_PRES	0x08
>  #define IEEE80211_UHR_MAC_CAP_DBE_EHT_MCS_MAP_320_PRES	0x10
>  
> +/**
> + * enum ieee80211_dbe_bandwidth - DBE Bandwidth
> + *
> + * As per spec P802.11bn_D1.3 "Table 9-bb5—Encoding of the DBE Maximum
> + * Supported Bandwidth field"
> + *
> + * @IEEE80211_DBE_BANDWIDTH_40MHZ: Indicate 40 MHz DBE bandwidth
> + * @IEEE80211_DBE_BANDWIDTH_80MHZ: Indicate 80 MHz DBE bandwidth
> + * @IEEE80211_DBE_BANDWIDTH_160MHZ: Indicate 160 MHz DBE bandwidth
> + * @IEEE80211_DBE_BANDWIDTH_320MHZ: Indicate 320 MHz DBE bandwidth
> + *
> + */
> +enum ieee80211_dbe_bandwidth {
> +	IEEE80211_DBE_BANDWIDTH_40MHZ = 1,
> +	IEEE80211_DBE_BANDWIDTH_80MHZ = 2,
> +	IEEE80211_DBE_BANDWIDTH_160MHZ = 3,
> +	IEEE80211_DBE_BANDWIDTH_320MHZ = 4,
> +};
> +
>  struct ieee80211_uhr_cap_mac {
>  	u8 mac_cap[5];
>  } __packed;


  reply	other threads:[~2026-02-24 16:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-17  5:47 [PATCH wireless-next v4 00/02] wifi: ieee80211/mac80211: Add UHR (802.11bn) Capability and Operation parsing helpers Karthikeyan Kathirvel
2026-02-17  5:47 ` [PATCH wireless-next v4 1/2] wifi: UHR: define DPS/DBE/P-EDCA elements and fix size parsing Karthikeyan Kathirvel
2026-02-24 16:32   ` Johannes Berg [this message]
2026-03-03 10:11     ` Karthikeyan Kathirvel
2026-02-24 16:42   ` Johannes Berg
2026-02-24 17:38     ` Johannes Berg
2026-03-03 10:11       ` Karthikeyan Kathirvel
2026-02-24 20:47   ` Johannes Berg
2026-02-17  5:47 ` [PATCH wireless-next v4 2/2] wifi: mac80211_hwsim: Add UHR capabilities to the driver Karthikeyan Kathirvel
2026-02-24 16:20   ` Johannes Berg
2026-03-03 11:41     ` Karthikeyan Kathirvel
2026-03-03 11:44       ` 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=6cec588857a8fa5866b3aff323c367b0096e613a.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=ath12k@lists.infradead.org \
    --cc=karthikeyan.kathirvel@oss.qualcomm.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