Search Linux Wireless

Re: [PATCH] mac80211: Ensure vif queues are operational after start

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/15/22 1:06 PM, Alexander Wetzel wrote:

I've got some doubts that my fix is correct...
While it fixes the problem in my tests it looks like we'll need another queue restart to get the queues working again.

After all IEEE80211_TXQ_STOP_NETIF_TX will not be cleared when it has been set by __ieee80211_stop_queue().

I'll update the patch and skip setting vif.txqs_stopped when SDATA_STATE_RUNNING is not set. Not having IEEE80211_TXQ_STOP_NETIF_TX set looks harmless, having it set when it should less problematic...

Scratch that: The patch should be ok as it is: IEEE80211_TXQ_STOP_NETIF_TX is not set on stop, the patch should be ok as it is.

Sorry for the noise.

Alexander


To add to the noise...

From reading the original patch description, it was to stop an NPE when AP was stopped.  I have been testing
this patch below and it fixes the problems I saw with multiple vdevs.  I was worried that
the code in the 'list_for_each_entry_rcu(sta, &local->sta_list, list) {' might still need to run
to keep everything in sync (and my patch allows that to happen), but I do not know if that is true or not.

diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index c768e583aad4..2b5dafe9f4cc 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -370,12 +370,6 @@ static void __ieee80211_wake_txqs(struct ieee80211_sub_if_data *sdata, int ac)
        local_bh_disable();
        spin_lock(&fq->lock);

-       if (!test_bit(SDATA_STATE_RUNNING, &sdata->state))
-               goto out;
-
-       if (sdata->vif.type == NL80211_IFTYPE_AP)
-               ps = &sdata->bss->ps;
-
        sdata->vif.txqs_stopped[ac] = false;

        list_for_each_entry_rcu(sta, &local->sta_list, list) {
@@ -408,6 +402,10 @@ static void __ieee80211_wake_txqs(struct ieee80211_sub_if_data *sdata, int ac)

        txqi = to_txq_info(vif->txq);

+       if (test_bit(SDATA_STATE_RUNNING, &sdata->state))
+               if (sdata->vif.type == NL80211_IFTYPE_AP)
+                       ps = &sdata->bss->ps;
+
        if (!test_and_clear_bit(IEEE80211_TXQ_STOP_NETIF_TX, &txqi->flags) ||
            (ps && atomic_read(&ps->num_sta_ps)) || ac != vif->txq->ac)
                goto out;


Thanks,
Ben

--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc  http://www.candelatech.com




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux