Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH RFC] mac80211: don't ask drivers to retry transmitting NO_ACK frames
@ 2009-04-14 22:34 Gábor Stefanik
  2009-04-14 22:37 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Gábor Stefanik @ 2009-04-14 22:34 UTC (permalink / raw)
  To: John Linville, Johannes Berg, Hin-Tak Leung,
	Herton Ronaldo Krzesinski
  Cc: linux-wireless, Hin-Tak Leung

[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]

Set the total count of TX tries to 1 if IEEE80211_TX_CTL_NO_ACK is
set. This fixes a bug where mac80211 allowed the RC algo to request
drivers to forcibly retransmit NO_ACK (e.g. multicast) frames until
the excessive-retries limit is reached.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>

---
Patch also available as attachment in case Gmail linewraps it.

 tx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index b47435d..751934b 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -539,7 +539,8 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
 	if (tx->sta)
 		tx->sta->last_tx_rate = txrc.reported_rate;

-	if (unlikely(!info->control.rates[0].count))
+	if (unlikely(!info->control.rates[0].count) ||
+	    info->flags & IEEE80211_TX_CTL_NO_ACK)
 		info->control.rates[0].count = 1;

 	if (is_multicast_ether_addr(hdr->addr1)) {

[-- Attachment #2: mac80211-fix-tx-ctl-no-ack-retry-count.patch --]
[-- Type: text/x-patch, Size: 559 bytes --]

 tx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index b47435d..751934b 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -539,7 +539,8 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
 	if (tx->sta)
 		tx->sta->last_tx_rate = txrc.reported_rate;
 
-	if (unlikely(!info->control.rates[0].count))
+	if (unlikely(!info->control.rates[0].count) ||
+	    info->flags & IEEE80211_TX_CTL_NO_ACK)
 		info->control.rates[0].count = 1;
 
 	if (is_multicast_ether_addr(hdr->addr1)) {

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

end of thread, other threads:[~2009-04-15  0:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-14 22:34 [PATCH RFC] mac80211: don't ask drivers to retry transmitting NO_ACK frames Gábor Stefanik
2009-04-14 22:37 ` Johannes Berg
2009-04-14 22:47   ` Gábor Stefanik
2009-04-14 23:07     ` Gábor Stefanik
2009-04-15  0:00     ` Hin-Tak Leung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox