Skip to content

Commit

Permalink
mac80211: Move up init of TXQs
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
tohojo authored and jmberg committed Jun 15, 2018
1 parent 3f61b7a commit dc8b274
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)

ieee80211_led_init(local);

result = ieee80211_txq_setup_flows(local);
if (result)
goto fail_flows;

rtnl_lock();

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

rtnl_unlock();

result = ieee80211_txq_setup_flows(local);
if (result)
goto fail_flows;

#ifdef CONFIG_INET
local->ifa_notifier.notifier_call = ieee80211_ifa_changed;
result = register_inetaddr_notifier(&local->ifa_notifier);
Expand All @@ -1149,15 +1149,15 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
#if defined(CONFIG_INET) || defined(CONFIG_IPV6)
fail_ifa:
#endif
ieee80211_txq_teardown_flows(local);
fail_flows:
rtnl_lock();
rate_control_deinitialize(local);
ieee80211_remove_interfaces(local);
fail_rate:
rtnl_unlock();
ieee80211_led_exit(local);
ieee80211_wep_free(local);
ieee80211_txq_teardown_flows(local);
fail_flows:
destroy_workqueue(local->workqueue);
fail_workqueue:
wiphy_unregister(local->hw.wiphy);
Expand Down

0 comments on commit dc8b274

Please sign in to comment.