Skip to content

Commit dc8b274

Browse files
tohojojmberg
authored andcommitted
mac80211: Move up init of TXQs
On init, ieee80211_if_add() dumps the interface. Since that now includes a dump of the TXQ state, we need to initialise that before the dump happens. So move up the TXQ initialisation to to before the call to ieee80211_if_add(). Fixes: 52539ca ("cfg80211: Expose TXQ stats and parameters to userspace") Reported-by: Niklas Cassel <[email protected]> Signed-off-by: Toke Høiland-Jørgensen <[email protected]> Tested-by: Niklas Cassel <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent 3f61b7a commit dc8b274

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

net/mac80211/main.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
10981098

10991099
ieee80211_led_init(local);
11001100

1101+
result = ieee80211_txq_setup_flows(local);
1102+
if (result)
1103+
goto fail_flows;
1104+
11011105
rtnl_lock();
11021106

11031107
result = ieee80211_init_rate_ctrl_alg(local,
@@ -1120,10 +1124,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
11201124

11211125
rtnl_unlock();
11221126

1123-
result = ieee80211_txq_setup_flows(local);
1124-
if (result)
1125-
goto fail_flows;
1126-
11271127
#ifdef CONFIG_INET
11281128
local->ifa_notifier.notifier_call = ieee80211_ifa_changed;
11291129
result = register_inetaddr_notifier(&local->ifa_notifier);
@@ -1149,15 +1149,15 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
11491149
#if defined(CONFIG_INET) || defined(CONFIG_IPV6)
11501150
fail_ifa:
11511151
#endif
1152-
ieee80211_txq_teardown_flows(local);
1153-
fail_flows:
11541152
rtnl_lock();
11551153
rate_control_deinitialize(local);
11561154
ieee80211_remove_interfaces(local);
11571155
fail_rate:
11581156
rtnl_unlock();
11591157
ieee80211_led_exit(local);
11601158
ieee80211_wep_free(local);
1159+
ieee80211_txq_teardown_flows(local);
1160+
fail_flows:
11611161
destroy_workqueue(local->workqueue);
11621162
fail_workqueue:
11631163
wiphy_unregister(local->hw.wiphy);

0 commit comments

Comments
 (0)