* [PATCH] mac80211: Move up init of TXQs
@ 2018-05-25 12:29 Toke Høiland-Jørgensen
2018-05-25 13:18 ` Niklas Cassel
0 siblings, 1 reply; 3+ messages in thread
From: Toke Høiland-Jørgensen @ 2018-05-25 12:29 UTC (permalink / raw)
To: linux-wireless; +Cc: Niklas Cassel
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: 52539ca89f36 ("cfg80211: Expose TXQ stats and parameters to userspace")
Reported-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
---
net/mac80211/main.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 4d2e797e3f16..722f3d9fb416 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -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,
@@ -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);
@@ -1149,8 +1149,6 @@ 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);
@@ -1158,6 +1156,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mac80211: Move up init of TXQs
2018-05-25 12:29 [PATCH] mac80211: Move up init of TXQs Toke Høiland-Jørgensen
@ 2018-05-25 13:18 ` Niklas Cassel
2018-05-25 13:27 ` Toke Høiland-Jørgensen
0 siblings, 1 reply; 3+ messages in thread
From: Niklas Cassel @ 2018-05-25 13:18 UTC (permalink / raw)
To: Toke Høiland-Jørgensen; +Cc: linux-wireless
Tested-by: Niklas Cassel <niklas.cassel@linaro.org>
On Fri, May 25, 2018 at 02:29:21PM +0200, Toke Høiland-Jørgensen wrote:
> 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: 52539ca89f36 ("cfg80211: Expose TXQ stats and parameters to userspace")
> Reported-by: Niklas Cassel <niklas.cassel@linaro.org>
> Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
> ---
> net/mac80211/main.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/net/mac80211/main.c b/net/mac80211/main.c
> index 4d2e797e3f16..722f3d9fb416 100644
> --- a/net/mac80211/main.c
> +++ b/net/mac80211/main.c
> @@ -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,
> @@ -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);
> @@ -1149,8 +1149,6 @@ 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);
> @@ -1158,6 +1156,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
> 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);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mac80211: Move up init of TXQs
2018-05-25 13:18 ` Niklas Cassel
@ 2018-05-25 13:27 ` Toke Høiland-Jørgensen
0 siblings, 0 replies; 3+ messages in thread
From: Toke Høiland-Jørgensen @ 2018-05-25 13:27 UTC (permalink / raw)
To: Niklas Cassel; +Cc: linux-wireless
Niklas Cassel <niklas.cassel@linaro.org> writes:
> Tested-by: Niklas Cassel <niklas.cassel@linaro.org>
Great, thanks!
-Toke
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-25 13:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-25 12:29 [PATCH] mac80211: Move up init of TXQs Toke Høiland-Jørgensen
2018-05-25 13:18 ` Niklas Cassel
2018-05-25 13:27 ` Toke Høiland-Jørgensen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.