public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Lachlan Hodges <lachlan.hodges@morsemicro.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC wireless-next 8/8] wifi: mac80211: set AP NPCA parameters in bss_conf
Date: Wed, 04 Mar 2026 08:45:33 +0100	[thread overview]
Message-ID: <ec522deac16cd21400818749ec9e97ca7e00d908.camel@sipsolutions.net> (raw)
In-Reply-To: <h6zaryfx46dg45gmysd4joxecawzkj256pu6uy2g2dbmzwpfxr@apaq4cud4rmg> (sfid-20260304_035704_694782_2141B706)

On Wed, 2026-03-04 at 13:56 +1100, Lachlan Hodges wrote:
> > +		npca = ieee80211_uhr_npca_info(params->uhr_oper);
> > +		if (!npca) {
> > +			chanreq.oper.npca_chan = NULL;
> > +			chanreq.oper.npca_punctured = 0;
> > +		} else {
> > +			npca_params.min_dur_thresh =
> > +				le32_get_bits(npca->params,
> > +					      IEEE80211_UHR_NPCA_PARAMS_MIN_DUR_THRESH);
> > +			npca_params.switch_delay =
> > +				le32_get_bits(npca->params,
> > +					      IEEE80211_UHR_NPCA_PARAMS_SWITCH_DELAY);
> > +			npca_params.switch_back_delay =
> > +				le32_get_bits(npca->params,
> > +					      IEEE80211_UHR_NPCA_PARAMS_SWITCH_BACK_DELAY);
> > +			npca_params.init_qsrc =
> > +				le32_get_bits(npca->params,
> > +					      IEEE80211_UHR_NPCA_PARAMS_INIT_QSRC);
> > +			npca_params.moplen =
> > +				le32_get_bits(npca->params,
> > +					      IEEE80211_UHR_NPCA_PARAMS_MOPLEN);
> > +			npca_params.enabled = true;
> > +		}
> 
> Minor nit, and I can't really comment on the actual UHR code - but would
> it be nicer to have
> 
> if (npca) {
> 	npca_params.min_dur_thresh = ...
> 	...
> } else {
> 	chanreq.oper.npca_chan = NULL;
> 	chanreq.oper.npca_punctured = 0;
> }
> 
> instead? I have no strong feelings of course, I was just perusing and
> felt it was a bit strange to read.

Fair point. I had a few things slightly differently during development
(and the non-NPCA had some goto/return) and just never went back to re-
structure it entirely when I removed that wart.

johannes

      reply	other threads:[~2026-03-04  7:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-03 14:26 [RFC wireless-next 0/8] initial UHR NPCA support Johannes Berg
2026-03-03 14:26 ` [RFC wireless-next 1/8] wifi: cfg80211: allow representing NPCA in chandef Johannes Berg
2026-03-03 14:26 ` [RFC wireless-next 2/8] wifi: cfg80211: add helper for parsing NPCA to chandef Johannes Berg
2026-03-03 14:26 ` [RFC wireless-next 3/8] wifi: mac80211: use NPCA in chandef for validation Johannes Berg
2026-03-03 14:26 ` [RFC wireless-next 4/8] wifi: mac80211: remove NPCA during chandef downgrade Johannes Berg
2026-03-03 14:27 ` [RFC wireless-next 5/8] wifi: mac80211: add NPCA to chandef tracing Johannes Berg
2026-03-03 14:27 ` [RFC wireless-next 6/8] wifi: mac80211: allow only AP chanctx sharing with NPCA Johannes Berg
2026-03-03 14:27 ` [RFC wireless-next 7/8] wifi: mac80211: mlme: use NPCA chandef if capable Johannes Berg
2026-03-03 14:27 ` [RFC wireless-next 8/8] wifi: mac80211: set AP NPCA parameters in bss_conf Johannes Berg
2026-03-04  2:56   ` Lachlan Hodges
2026-03-04  7:45     ` Johannes Berg [this message]

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=ec522deac16cd21400818749ec9e97ca7e00d908.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=lachlan.hodges@morsemicro.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