diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 780ba7365810cee69b89667ecc34593280477469..e7ed56dcf684c7213eb557222b47dc93c0bbc0dd 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h @@ -802,6 +802,12 @@ struct rt2x00_dev { */ u16 tx_power; + /* + * Current retry values. + */ + u8 short_retry; + u8 long_retry; + /* * Rssi <-> Dbm offset */ diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c index 7c62ce125b942025748929750085b2c7fffb448a..b3bc8b49be8310d87b2a0dbae5971128944db655 100644 --- a/drivers/net/wireless/rt2x00/rt2x00config.c +++ b/drivers/net/wireless/rt2x00/rt2x00config.c @@ -194,6 +194,8 @@ void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, rt2x00dev->curr_band = conf->channel->band; rt2x00dev->tx_power = conf->power_level; + rt2x00dev->short_retry = conf->short_frame_max_tx_count; + rt2x00dev->long_retry = conf->long_frame_max_tx_count; rt2x00dev->rx_status.band = conf->channel->band; rt2x00dev->rx_status.freq = conf->channel->center_freq; diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index b8de9d2750e443e476dc2e2dd16e037857629539..7f908a17e3681a4e65963f5b7d2a637e57fb103a 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c @@ -231,14 +231,7 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry, * Determine retry information. */ txdesc->retry_limit = tx_info->control.rates[0].count - 1; - /* - * XXX: If at this point we knew whether the HW is going to use - * the RETRY_MODE bit or the retry_limit (currently all - * use the RETRY_MODE bit) we could do something like b43 - * does, set the RETRY_MODE bit when the RC algorithm is - * requesting more than the long retry limit. - */ - if (tx_info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) + if (txdesc->retry_limit >= rt2x00dev->long_retry) __set_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags); /*