Commit dc8b274f authored by Toke Høiland-Jørgensen's avatar Toke Høiland-Jørgensen Committed by Johannes Berg

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: 52539ca8 ("cfg80211: Expose TXQ stats and parameters to userspace")
Reported-by: default avatarNiklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: default avatarToke Høiland-Jørgensen <toke@toke.dk>
Tested-by: default avatarNiklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
parent 3f61b7a3
...@@ -1098,6 +1098,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) ...@@ -1098,6 +1098,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
ieee80211_led_init(local); ieee80211_led_init(local);
result = ieee80211_txq_setup_flows(local);
if (result)
goto fail_flows;
rtnl_lock(); rtnl_lock();
result = ieee80211_init_rate_ctrl_alg(local, result = ieee80211_init_rate_ctrl_alg(local,
...@@ -1120,10 +1124,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) ...@@ -1120,10 +1124,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
rtnl_unlock(); rtnl_unlock();
result = ieee80211_txq_setup_flows(local);
if (result)
goto fail_flows;
#ifdef CONFIG_INET #ifdef CONFIG_INET
local->ifa_notifier.notifier_call = ieee80211_ifa_changed; local->ifa_notifier.notifier_call = ieee80211_ifa_changed;
result = register_inetaddr_notifier(&local->ifa_notifier); result = register_inetaddr_notifier(&local->ifa_notifier);
...@@ -1149,8 +1149,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) ...@@ -1149,8 +1149,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
#if defined(CONFIG_INET) || defined(CONFIG_IPV6) #if defined(CONFIG_INET) || defined(CONFIG_IPV6)
fail_ifa: fail_ifa:
#endif #endif
ieee80211_txq_teardown_flows(local);
fail_flows:
rtnl_lock(); rtnl_lock();
rate_control_deinitialize(local); rate_control_deinitialize(local);
ieee80211_remove_interfaces(local); ieee80211_remove_interfaces(local);
...@@ -1158,6 +1156,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) ...@@ -1158,6 +1156,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
rtnl_unlock(); rtnl_unlock();
ieee80211_led_exit(local); ieee80211_led_exit(local);
ieee80211_wep_free(local); ieee80211_wep_free(local);
ieee80211_txq_teardown_flows(local);
fail_flows:
destroy_workqueue(local->workqueue); destroy_workqueue(local->workqueue);
fail_workqueue: fail_workqueue:
wiphy_unregister(local->hw.wiphy); wiphy_unregister(local->hw.wiphy);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment