summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorGábor Stefanik <netrolller.3d@gmail.com>2009-04-23 17:36:14 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2009-05-06 19:14:51 (GMT)
commit9955151df7c6452cae2ed9649f53d265c91cf155 (patch)
tree8f1edf3ba7281ec75742e47552ee3a154eebc025 /net
parent97d3f458a1e3350dfcbdc3b6aefa75d20d59ee17 (diff)
downloadlinux-9955151df7c6452cae2ed9649f53d265c91cf155.tar.xz
mac80211: Warn if the rate controller requests retries for a NO_ACK frame
To deter future rate scaling algorithm writers from requesting NO_ACK packets to be retried, throw a WARN_ON_ONCE if the algorithm hands us a try count over 1 for NO_ACK packet. Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/tx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 1564a30..36e8e2d 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -558,6 +558,10 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
if (unlikely(!info->control.rates[0].count))
info->control.rates[0].count = 1;
+ if (WARN_ON_ONCE((info->control.rates[0].count > 1) &&
+ (info->flags & IEEE80211_TX_CTL_NO_ACK)))
+ info->control.rates[0].count = 1;
+
if (is_multicast_ether_addr(hdr->addr1)) {
/*
* XXX: verify the rate is in the basic rateset