On Wednesday 10 December 2008 03:39:00 Larry Finger wrote: > Christian Lamparter wrote: > > The patch fixes an old FIXME in p54pci.c by moving the "queue full" > > check into the common library, where we can deal with it properly. > > > > Signed-off-by: Christian Lamparter <chunkeey@xxxxxx> > > --- > > diff -Nurp a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c > > --- a/drivers/net/wireless/p54/p54common.c 2008-12-09 20:13:56.467888032 +0100 > > +++ b/drivers/net/wireless/p54/p54common.c 2008-12-09 20:49:21.235888230 +0100 > > @@ -889,7 +889,27 @@ static int p54_assign_address(struct iee > > return -EINVAL; > > > > spin_lock_irqsave(&priv->tx_queue.lock, flags); > > + > > left = skb_queue_len(&priv->tx_queue); > > + if (unlikely(left >= 28)) { > > + /* > > + * The tx_queue is nearly full! > > + * We have throttle normal data traffic, because we must > > + * have a few spare slots for control frames left. > > + */ > > + ieee80211_stop_queues(dev); > > I do not intend this as a criticism of the patch, but how do the queues get > restarted after this? > The idea is that p54_free_skb & p54_rx_frame_sent callbacks, which are called whenever the firmware has finished processing a "device control" or wifi frames. (And at that point there're atleast 28 pending frames, so one should eventually get freed unless the firmware crashed!) These routines unlink the frame form the tx_queue and call p54_wake_free_queues if there's enough space for a new data frame. Regards, Chr -- 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