On Mon, 2014-06-09 at 07:34 +0200, Michal Kazior wrote: > On 6 June 2014 20:46, Luca Coelho <luca@xxxxxxxxx> wrote: > > From: Luciano Coelho <luciano.coelho@xxxxxxxxx> > > > > Sometimes different vifs may be stopping the queues for the same > > reason (e.g. when several interfaces are performing a channel switch). > > Instead of using a bitmask for the reasons, use an integer that holds > > a refcount instead. > > > > Signed-off-by: Luciano Coelho <luciano.coelho@xxxxxxxxx> > > --- > > > > This looks much simpler now. The only thing is that we need to make > > sure the bitmask never gets out of sync with the refcounts, which > > shouldn't be too difficult, as long as we keep the refcounts usage > > restricted to the queues start/stopping functions. > > I think you need to make sure all stop/wake calls are balanced > everywhere (including device drivers). Otherwise you risk breaking > things silently in some cases. > > It might also be worth to update exported stop/wake symbol documentation too. Good point, I'll look into that. My original idea was to mark the queues as stopped in the sdata so we would at least clean things up when the vif is stopped, but that would be a bit slow if we had to traverse them all the time. Checking this might be tricky, actually, since I think there are some assumptions that stopping a queue that is already stopped is a NOP, but now we add to the refcount... -- Luca. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html