Re: [PATCH v2] mac80211: reject station addition if AP or MLO link is inactive

From: Johannes Berg

Date: Mon Jul 27 2026 - 04:27:11 EST


Hi,

On Mon, 2026-07-27 at 09:45 +0200, Slawomir Stepien wrote:
> Currently, userspace can issue a netlink command to add a station to
> an AP or P2P GO interface before the AP has fully started, or before
> a specific MLO link has begun beaconing. This will e.g. lead to a
> WARN_ON trigger:
>
> WARNING: net/mac80211/rate.c:51 at rate_control_rate_init+0x5a6/0x630
> ...
> Call Trace:
> <TASK>
> rate_control_rate_init_all_links+0xf4/0x190 net/mac80211/rate.c:84
> sta_apply_auth_flags+0x1bc/0x430 net/mac80211/cfg.c:2152
> sta_apply_parameters+0x126d/0x1b10 net/mac80211/cfg.c:2618
> ieee80211_add_station+0x3de/0x700 net/mac80211/cfg.c:2684
> rdev_add_station+0xfc/0x290 net/wireless/rdev-ops.h:201
> nl80211_new_station+0x1b4e/0x1fd0 net/wireless/nl80211.c:9505
>
> Fix this by introducing a two-tiered active state check in
> ieee80211_add_station():

Shouldn't we have enough information in cfg80211 to validate it there,
benefiting other drivers?

johannes