Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81129fce authored by Andrea Merello's avatar Andrea Merello Committed by John W. Linville
Browse files

rtl8180: fix incorrect TX retry.



HW is programmed with wrong retry count value for TX:

Mac80211 passes to driver the number of times the TX should be attempted.
The HW, instead, wants the number of time the TX should be retried if it fails
the first time (assuming we have to TX it at least one time).

This patch correct this.

Signed-off-by: default avatarAndrea Merello <andrea.merello@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f82be7c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -542,7 +542,7 @@ static void rtl8180_tx(struct ieee80211_hw *dev,

	entry->flags2 = info->control.rates[1].idx >= 0 ?
		ieee80211_get_alt_retry_rate(dev, info, 0)->bitrate << 4 : 0;
	entry->retry_limit = info->control.rates[0].count;
	entry->retry_limit = info->control.rates[0].count - 1;

	/* We must be sure that tx_flags is written last because the HW
	 * looks at it to check if the rest of data is valid or not