Linux wireless drivers development
 help / color / mirror / Atom feed
From: Louis Kotze <loukot@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	loukot@gmail.com
Subject: Re: [PATCH v2 1/2] wifi: cfg80211: say why the auth/assoc BSS lookup failed
Date: Wed, 22 Jul 2026 09:07:20 +0200	[thread overview]
Message-ID: <20260722070720.3610942-1-loukot@gmail.com> (raw)
In-Reply-To: <bbb15b0ae332d7344f5b69da5e993acc6813aca7.camel@sipsolutions.net>

On Wed, 2026-07-22 at 00:10 +0200, Johannes Berg wrote:
> > +	if (!attrs[NL80211_ATTR_MAC] || !attrs[NL80211_ATTR_WIPHY_FREQ]) {
> > +		NL_SET_ERR_MSG(info->extack, "BSSID or frequency missing");
>
> could use the GENL versions and save some characters :)

Done in v3.

> > -			NL_SET_ERR_MSG_ATTR(info->extack, link,
> > -					    "Error fetching BSS for link");
> > +			NL_SET_BAD_ATTR(info->extack, link);
>
> why remove the message, it's possible to have both?

There still is a message here: __cfg80211_get_bss() has already set
the specific one by the time this runs, and NL_SET_ERR_MSG_ATTR()
would overwrite it with the generic text again. Added a comment in
v3 to make that visible.

> > -		req.bss = nl80211_assoc_bss(rdev, ssid, ssid_len, info->attrs,
> > -					    -1, -1);
> > +		req.bss = nl80211_assoc_bss(rdev, info, ssid, ssid_len,
> > +					    info->attrs, -1, -1);
>
> entirely unrelated (whitespace) change?

The call gains the new "info" argument; v3 keeps the original
wrapping so only that shows in the diff.

> That code should probably have a comment that the is_bss() must come
> first...

Added.

> Also however, it could result in having *both* 'unusable' and
> 'expired' set, and then
> [...]
> you prefer the 'unusable' message... not sure that makes sense?

Right. v3 sets a combined message when matching entries were rejected
for different reasons, so neither is preferred or hidden.

> I also don't think the "scan again" instruction makes any sense here -
> this is meant to provide an error message, not instructions how to fix
> it?

Dropped, the messages are purely descriptive now.

Sending v3 shortly.

thanks,
Louis

  reply	other threads:[~2026-07-22  7:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-11  4:34 [PATCH] wifi: nl80211: say why the association BSS lookup failed Louis Kotze
2026-07-21 15:31 ` Johannes Berg
2026-07-21 18:11   ` [PATCH v2 0/2] wifi: cfg80211: say why the auth/assoc " Louis Kotze
2026-07-21 18:11     ` [PATCH v2 1/2] " Louis Kotze
2026-07-21 22:10       ` Johannes Berg
2026-07-22  7:07         ` Louis Kotze [this message]
2026-07-22  7:07         ` [PATCH v3 0/2] " Louis Kotze
2026-07-22  7:07           ` [PATCH v3 1/2] " Louis Kotze
2026-07-22  7:07           ` [PATCH v3 2/2] wifi: cfg80211: tests: check BSS lookup failure reasons Louis Kotze
2026-07-21 18:11     ` [PATCH v2 " Louis Kotze

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=20260722070720.3610942-1-loukot@gmail.com \
    --to=loukot@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --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