Re: [PATCH] wifi: nl80211: say why the association BSS lookup failed
From: Johannes Berg
Date: Tue Jul 21 2026 - 11:37:38 EST
On Sat, 2026-07-11 at 06:34 +0200, Louis Kotze wrote:
>
> +/* why __cfg80211_get_bss() found no usable BSS entry */
> +#define CFG80211_BSS_MISS_EXPIRED BIT(0)
> +#define CFG80211_BSS_MISS_USE_FOR BIT(1)
> +
> +u32 cfg80211_get_bss_miss_reasons(struct wiphy *wiphy,
> + struct ieee80211_channel *channel,
> + const u8 *bssid,
> + const u8 *ssid, size_t ssid_len,
> + enum ieee80211_bss_type bss_type,
> + enum ieee80211_privacy privacy,
> + u32 use_for);
This seems ... messy, and also racy? I really don't like it, so you're
going to have to work extra hard to convince me of it.
> @@ -13068,8 +13073,23 @@ static struct cfg80211_bss *nl80211_assoc_bss(struct cfg80211_registered_device
> IEEE80211_BSS_TYPE_ESS,
> IEEE80211_PRIVACY_ANY,
> use_for);
can't we just pass the info (or NULL) to __cfg80211_get_bss() directly
and have that fill the right problem message there? There aren't even
any callers to it outside of cfg80211, and cfg80211_get_bss() can just
pass NULL.
johannes