wifi: mac80211: don't hold RTNL for rate control algo

Back when we supported algorithm switching at runtime, this
was needed for the open_count check. Now we don't have that
any more, so the check and RTNL section can go away.

Link: https://patch.msgid.link/20261011113308.0c5d35e2afea.I81141b28351e7c1ca23770616364346c33d7e08e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2026-10-11 11:31:32 +02:00
parent b6c27cf5fe
commit 85a4a8e9c8
2 changed files with 1 additions and 8 deletions

View File

@ -1567,10 +1567,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
if (result)
goto fail_flows;
rtnl_lock();
result = ieee80211_init_rate_ctrl_alg(local,
hw->rate_control_algorithm);
rtnl_unlock();
if (result < 0) {
wiphy_debug(local->hw.wiphy,
"Failed to initialize rate control algorithm\n");
@ -1689,9 +1687,9 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
fail_wiphy_register:
fail_band:
rtnl_lock();
rate_control_deinitialize(local);
ieee80211_remove_interfaces(local);
rtnl_unlock();
rate_control_deinitialize(local);
fail_rate:
ieee80211_txq_teardown_flows(local);
fail_flows:

View File

@ -1001,11 +1001,6 @@ int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local,
{
struct rate_control_ref *ref;
ASSERT_RTNL();
if (local->open_count)
return -EBUSY;
if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) {
if (WARN_ON(!local->ops->set_rts_threshold))
return -EINVAL;