From 1b6713fe8fad3871d2a090cfccba9b319a19dc77 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 9 Oct 2026 20:10:13 +0200 Subject: [PATCH] wifi: nl80211: transmit control port frames without wiphy mutex Only mac80211 currently implements tx_control_port, and it no longer needs the wiphy mutex, so don't take it here. Link: https://patch.msgid.link/20261009201417.d89a3bc2b1ec.I30d12968a0d4ab7a4ac8d0995a9ab7583b0ce2ef@changeid Signed-off-by: Johannes Berg --- include/net/cfg80211.h | 1 + net/wireless/nl80211.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 32b458c9a7ee..3fa310b30139 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -5271,6 +5271,7 @@ struct mgmt_frame_regs { * @tx_control_port: TX a control port frame (EAPoL). The noencrypt parameter * tells the driver that the frame should not be encrypted. A @cookie * value of 0 means the caller does not want TX status reporting. + * Called without the wiphy mutex. * * @get_ftm_responder_stats: Retrieve FTM responder statistics, if available. * Statistics should be cumulative, currently no way to reset is provided. diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index b4ff8c811dc1..4044ea7d344a 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -21070,7 +21070,8 @@ static const struct genl_small_ops nl80211_small_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .doit = nl80211_tx_control_port, .flags = GENL_UNS_ADMIN_PERM, - .internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP), + .internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP | + NL80211_FLAG_NO_WIPHY_MTX), }, { .cmd = NL80211_CMD_GET_FTM_RESPONDER_STATS,