Search Linux Wireless

Re: [PATCH 3/3] mac80211: stop only the queues assigned to the vif during channel switch

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

 



On Fri, 2014-06-06 at 10:12 +0200, Michal Kazior wrote:
> On 6 June 2014 10:04, Coelho, Luciano <luciano.coelho@xxxxxxxxx> wrote:
> > On Fri, 2014-06-06 at 09:56 +0200, Michal Kazior wrote:
> >> On 6 June 2014 09:37, Coelho, Luciano <luciano.coelho@xxxxxxxxx> wrote:
> [...]
> >> > static u32 ieee80211_vif_queues_to_wake(struct ieee80211_local *local,
> >> >                                         struct ieee80211_sub_if_data *sdata,
> >> >                                         enum queue_stop_reason reason)
> >> > {
> >> >         struct ieee80211_sub_if_data *sdata_iter;
> >> >         unsigned long queues, queues_iter, q;
> >> >         int i;
> >> >
> >> >         lockdep_assert_held(&local->mtx);
> >> >
> >> >         queues = ieee80211_get_vif_queues(local, sdata);
> >> >
> >> >         rcu_read_lock();
> >> >         list_for_each_entry_rcu(sdata_iter, &local->interfaces, list) {
> >> >                 if (!ieee80211_sdata_running(sdata_iter))
> >> >                         continue;
> 
> Hmm, actually, shouldn't we `if (sdata == sdata_iter) continue`?
> Otherwise you'll never wake queues, will you?

Ahmmm... Yes of course. :)


> >> >                 queues_iter = ieee80211_get_vif_queues(local, sdata_iter);
> >> >                 for_each_set_bit(i, &queues_iter, local->hw.queues) {
> >> >                         q = sdata->vif.hw_queue[i];
> >> >
> >> >                         if (test_bit(reason, &local->queue_stop_reasons[q]))
> >> >                                 queues &= ~q;
> >> >                 }
> >> >         }
> >> >         rcu_read_unlock();
> >> >
> >> >         return queues;
> >> > }
> >> >
> >> > void ieee80211_wake_vif_queues(struct ieee80211_local *local,
> >> >                                struct ieee80211_sub_if_data *sdata,
> >> >                                enum queue_stop_reason reason)
> >> > {
> >> >         unsigned int queues = ieee80211_vif_queues_to_wake(local, sdata, reason);
> >> >
> >> >         ieee80211_wake_queues_by_reason(&local->hw, queues, reason);
> >> > }
> >>
> >> Once you set local->queue_stop_reasons[] for an overlapping queue you
> >> won't be able to wake it with ieee80211_wake_vif_queues() alone.
> >> You'll need to call ieee80211_wake_queues() to do that. Is that what
> >> you intended?
> >
> > More or less.  My idea is that only the *last* vif that tries to wake
> > the overlapping queue, will actually do so.
> 
> So ieee80211_wake_vif_queues() would be called regardless of the
> ieee80211_csa_needs_block_tx() and ieee80211_wake_queues() is called
> like it was before (i.e. when all block_tx interfaces are done).

Yes, ieee80211_wake_vif_queues() would be called regardless of the
ieee80211_csa_needs_block_tx(), but we should probably still check if
the vif in question has block_tx set?

And I don't see why we would have to call ieee80211_wake_queues() again
at the end... would that still be necessary?

--
Luca.
��.n��������+%������w��{.n�����{���zW����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f





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

  Powered by Linux