aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00dev.c
diff options
context:
space:
mode:
authorMattias Nissler <mattias.nissler@gmx.de>2007-10-27 07:43:49 -0400
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:03:04 -0500
commit2700f8b0489e00cb6eead31e58f5461812dd31a6 (patch)
tree5e76ce54410eea89aa593bf39f18a40475ff1af1 /drivers/net/wireless/rt2x00/rt2x00dev.c
parent3d82346c5d0ff0a413c387c6edaadc0ca29a0971 (diff)
rt2x00: Correctly set ACK bit in tx descriptors
Add a flag to struct txdata_entry_desc that specifies whether an ack for the frame is to be expected. Use this flag to set the ACK bit in the tx descriptor. Previously, the ACK bit could be set incorrectly on CTS-to-self frames, so they caused retries and were reported to be failed in the txdone handlers. Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 304830b8d16d..3ab1fb993d6f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -629,12 +629,21 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
629 tx_rate = control->tx_rate; 629 tx_rate = control->tx_rate;
630 630
631 /* 631 /*
632 * Check whether this frame is to be acked
633 */
634 if (!(control->flags & IEEE80211_TXCTL_NO_ACK))
635 __set_bit(ENTRY_TXD_ACK, &desc.flags);
636
637 /*
632 * Check if this is a RTS/CTS frame 638 * Check if this is a RTS/CTS frame
633 */ 639 */
634 if (is_rts_frame(frame_control) || is_cts_frame(frame_control)) { 640 if (is_rts_frame(frame_control) || is_cts_frame(frame_control)) {
635 __set_bit(ENTRY_TXD_BURST, &desc.flags); 641 __set_bit(ENTRY_TXD_BURST, &desc.flags);
636 if (is_rts_frame(frame_control)) 642 if (is_rts_frame(frame_control)) {
637 __set_bit(ENTRY_TXD_RTS_FRAME, &desc.flags); 643 __set_bit(ENTRY_TXD_RTS_FRAME, &desc.flags);
644 __set_bit(ENTRY_TXD_ACK, &desc.flags);
645 } else
646 __clear_bit(ENTRY_TXD_ACK, &desc.flags);
638 if (control->rts_cts_rate) 647 if (control->rts_cts_rate)
639 tx_rate = control->rts_cts_rate; 648 tx_rate = control->rts_cts_rate;
640 } 649 }