wifi: cfg80211: drop RTNL from disconnect_work

The RTNL here is only needed for walking the wiphy list,
which can be done under cfg80211_mutex instead, we just
need to not take it in regulatory_hint_disconnect(), of
which this is the only caller.

Link: https://patch.msgid.link/20261011113308.3c7e002d1893.I31f6d1b43bb252b23b42c9b0375f557d90110dc6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2026-10-11 11:31:25 +02:00
parent 98a19abc79
commit 17090b50d8
3 changed files with 4 additions and 4 deletions

View File

@ -3671,7 +3671,7 @@ static bool is_wiphy_all_set_reg_flag(enum ieee80211_regulatory_flags flag)
void regulatory_hint_disconnect(void)
{
guard(mutex)(&cfg80211_mutex);
lockdep_assert_held(&cfg80211_mutex);
/* Restore of regulatory settings is not required when wiphy(s)
* ignore IE from connected access point but clearance of beacon hints

View File

@ -115,7 +115,7 @@ void regulatory_hint_country_ie(struct wiphy *wiphy,
* be respected but if a user had set the regulatory domain that will take
* precedence.
*
* Must be called from process context.
* Must be called with cfg80211_mutex held.
*/
void regulatory_hint_disconnect(void);

View File

@ -704,10 +704,10 @@ static bool cfg80211_is_all_idle(void)
static void disconnect_work(struct work_struct *work)
{
rtnl_lock();
guard(mutex)(&cfg80211_mutex);
if (cfg80211_is_all_idle())
regulatory_hint_disconnect();
rtnl_unlock();
}
DECLARE_WORK(cfg80211_disconnect_work, disconnect_work);