All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] carl9170: Fix memory accounting when sta is in power-save mode.
@ 2012-02-23 15:53 Nicolas Cavallari
  2012-02-23 16:52 ` Christian Lamparter
  0 siblings, 1 reply; 16+ messages in thread
From: Nicolas Cavallari @ 2012-02-23 15:53 UTC (permalink / raw)
  To: John W. Linville; +Cc: chunkeey, linux-wireless

On Access Point mode, when transmitting a packet, if the destination
station is in powersave mode, we abort transmitting the packet to the
device queue, but we do not reclaim the allocated memory.  Given enough
packets, we can go in a state where there is no packet on the device
queue, but we think the device has no memory left, so no packet gets
transmitted, connections breaks and the AP stops working.

This undo the allocation done in the TX path when the station is in
power-save mode.

Signed-off-by: Nicolas Cavallari <cavallar@lri.fr>
---
While this seems to fix my problem, there could still be problems remaining
in this code path.  Particularly, carl9170_tx_status will do lots of things
like incrementing counters and waking up mac80211 queues...

diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c
index 771e1a9..8d52ddd 100644
--- a/drivers/net/wireless/ath/carl9170/tx.c
+++ b/drivers/net/wireless/ath/carl9170/tx.c
@@ -1253,6 +1253,7 @@ static bool carl9170_tx_ps_drop(struct ar9170 *ar, struct sk_buff *skb)
 			atomic_dec(&ar->tx_ampdu_upload);
 
 		tx_info->flags |= IEEE80211_TX_STAT_TX_FILTERED;
+		carl9170_release_dev_space(ar, skb);
 		carl9170_tx_status(ar, skb, false);
 		return true;
 	}
-- 
1.7.9


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-02-27 12:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-23 15:53 [RFC] carl9170: Fix memory accounting when sta is in power-save mode Nicolas Cavallari
2012-02-23 16:52 ` Christian Lamparter
2012-02-23 17:27   ` Nicolas Cavallari
2012-02-23 18:08     ` Christian Lamparter
2012-02-23 18:51       ` Nicolas Cavallari
2012-02-24 13:34         ` Nicolas Cavallari
2012-02-24 13:39           ` Johannes Berg
2012-02-24 14:01             ` Nicolas Cavallari
2012-02-24 14:09               ` Johannes Berg
2012-02-25  9:32                 ` Jouni Malinen
2012-02-25 20:12                   ` Johannes Berg
2012-02-25 20:20                     ` Christian Lamparter
2012-02-24 14:07           ` Christian Lamparter
2012-02-24 20:43     ` Christian Lamparter
2012-02-25 20:36     ` [PATCH -stable] carl9170: fix frame delivery if sta is in powersave mode Christian Lamparter
2012-02-27 12:00       ` Nicolas Cavallari

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.