Re: [PATCH] wifi: nl80211: don't WARN on a missing self-managed regdom
From: Johannes Berg
Date: Wed Oct 07 2026 - 11:04:01 EST
On Tue, 2026-10-06 at 18:17 +0200, François Roux wrote:
> nl80211_get_reg_do() has a WARN_ON() for a self-managed wiphy without a
> private regdomain. Userspace can trigger it with a plain
> NL80211_CMD_GET_REG request.
>
> Drivers can register such a wiphy first and set its regdomain later.
> ath12k, for example, calls ieee80211_register_hw() and only then applies
> the regdomain with ath12k_regd_update(). iwd queries the regdomain of a
> new wiphy as soon as it shows up, so it can hit that window at boot:
>
> WARNING: net/wireless/nl80211.c:10828 at nl80211_get_reg_do+0x1d0/0x1fc [cfg80211], CPU#5: iwd/721
I'm not a fan of this, I think the drivers should have the regdom ready.
> The same trace has been reported with an Intel BE200 (iwlwifi).
I _thought_ we fixed that issue.
Anyway I think we need to fix the bugs, not paper over them. If it comes
to it we can even put a WARN_ON there to reject wiphy registration w/o a
regdomain. There should be one. As it is, iwd will get empty data or
something, that makes no sense.
johannes