Re: [PATCH 3/3] wifi: cfg80211: check if AP has been started before adding new station

From: Johannes Berg

Date: Fri Sep 04 2026 - 05:57:23 EST


On Thu, 2026-08-13 at 11:04 +0200, Slawomir Stepien wrote:
>
> case NL80211_IFTYPE_P2P_GO:
> + /* Add a new station only after the AP and link has been started */
> + link_id = wdev->valid_links ? params.link_sta_params.link_id : 0;

max() maybe?

> + if (!wdev->links[link_id].ap.beacon_interval)
> + return -ENETDOWN;

I think the same issue might exist also for mesh, maybe address that as
well?

And I think you could have a fourth patch to clean up the mac80211 code
to no longer handle the "STA creation on AP_VLAN" case?

johannes