| Message ID | 20260907100633.4163-1-me@niceo.org |
|---|---|
| State | New |
| Headers | show |
| Series | nl80211: Do not attempt multicast NAN USD registration without support | expand |
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index d2d0a5cf0..0cc9ff95c 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -2897,7 +2897,8 @@ static int nl80211_mgmt_subscribe_non_ap(struct i802_bss *bss) #endif /* CONFIG_P2P */ #ifdef CONFIG_NAN_USD /* NAN SDF Public Action */ - if (nl80211_register_action_frame2(bss, NAN_SDF_ACTION, 6, true) < 0) { + if (!drv->multicast_registrations || + nl80211_register_action_frame2(bss, NAN_SDF_ACTION, 6, true) < 0) { /* fallback to non-multicast */ if (nl80211_register_action_frame2(bss, NAN_SDF_ACTION, 6, false) < 0)
nl80211_mgmt_subscribe_non_ap() unconditionally attempts to register for group-addressed NAN SDF Public Action frames, and falls back to a non-multicast registration if that fails. On drivers that do not advertise NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS the first attempt is guaranteed to fail with -EOPNOTSUPP, and the kernel returns the extended ACK message "multicast RX registrations are not supported". error_handler() prints any extack message at MSG_ERROR, so this expected and fully handled failure surfaces as an error to the user on every startup, once for the station interface and once for the P2P device interface: wlp0s20f3: nl80211: kernel reports: multicast RX registrations are not supported p2p-dev-wlp0s20: nl80211: kernel reports: multicast RX registrations are not supported Check drv->multicast_registrations before making the attempt and go straight to the non-multicast registration when the driver lacks the capability. This matches what nl80211_dpp_listen() already does and leaves behavior unchanged on drivers that do support it. Signed-off-by: Nicolò Sala <me@niceo.org> --- src/drivers/driver_nl80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Noticed on Arch Linux after the wpa_supplicant 2.11 -> 2.12 upgrade, which started logging two error-level messages on every boot, once for the station interface and once for the P2P device interface: wlp0s20f3: nl80211: kernel reports: multicast RX registrations are not supported p2p-dev-wlp0s20: nl80211: kernel reports: multicast RX registrations are not supported The message text originates in the kernel, in nl80211_register_mgmt() (net/wireless/nl80211.c), and reaches the log through NLMSGERR_ATTR_MSG in error_handler(), which prints any extack message at MSG_ERROR. Since MSG_ERROR is the highest wpa_debug level, this cannot be filtered out from configuration without silencing genuine errors as well. Tested on a Microsoft Surface Pro 8 with an Intel Wi-Fi 6 AX201 (iwlwifi), Linux 7.2.3, wpa_supplicant 2.12. Both messages are gone with this change, and association, reconnection and P2P device setup behave as before. I kept the change local to the NAN USD call site so that it mirrors the existing drv->multicast_registrations check in nl80211_dpp_listen(). If you would prefer to address the whole class of these messages instead -- for example by not printing the extack at MSG_ERROR when the caller already handles the failure -- I am glad to send a v2.