On 12/08/09 23:40, Johannes Berg wrote: > On Tue, 2009-12-08 at 23:39 +0100, Stefan Lippers-Hollmann wrote: > >> Unfortunately this fails to compile for me: > > well remove the spurious opening brace? :) > Correct. That will teach me to make last minute edits without recompiling :-( Corrected patch attached. --- Gertjan.
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 687e17d..77b2575 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c @@ -947,9 +947,17 @@ static void rt61pci_config_ps(struct rt2x00_dev *rt2x00dev, enum dev_state state = (libconf->conf->flags & IEEE80211_CONF_PS) ? STATE_SLEEP : STATE_AWAKE; + struct data_queue *queue; u32 reg; if (state == STATE_SLEEP) { + /* + * Don't go to sleep when the TX queues aren't empty. + */ + tx_queue_for_each(rt2x00dev, queue) + if (!rt2x00queue_empty(queue)) + return; + rt2x00pci_register_read(rt2x00dev, MAC_CSR11, ®); rt2x00_set_field32(®, MAC_CSR11_DELAY_AFTER_TBCN, rt2x00dev->beacon_int - 10);