diff mbox

[06/10] rt2x00: fixup fill_tx_status for nomatch case

Message ID 1487076368-7020-7-git-send-email-sgruszka@redhat.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show

Commit Message

Stanislaw Gruszka Feb. 14, 2017, 12:46 p.m. UTC
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/ralink/rt2x00/rt2x00dev.c   | 6 +++++-
 drivers/net/wireless/ralink/rt2x00/rt2x00queue.h | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

Comments

Felix Fietkau Feb. 14, 2017, 1:51 p.m. UTC | #1
On 2017-02-14 13:46, Stanislaw Gruszka wrote:
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
>  drivers/net/wireless/ralink/rt2x00/rt2x00dev.c   | 6 +++++-
>  drivers/net/wireless/ralink/rt2x00/rt2x00queue.h | 1 +
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
> index 90fc259..258d94d 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
> @@ -357,6 +357,9 @@ static void rt2x00lib_fill_tx_status(struct rt2x00_dev *rt2x00dev,
>  	if (i < (IEEE80211_TX_MAX_RATES - 1))
>  		tx_info->status.rates[i].idx = -1; /* terminate */
>  
> +	if (!test_bit(TXDONE_ACK_REQ, &txdesc->flags))
> +		tx_info->flags |= IEEE80211_TX_CTL_NO_ACK;
> +
Since nothing sets TXDONE_ACK_REQ, this will probably create a regression.

- Felix
Kalle Valo Feb. 14, 2017, 4:32 p.m. UTC | #2
Stanislaw Gruszka <sgruszka@redhat.com> writes:

> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>

No empty commit logs, please.
diff mbox

Patch

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
index 90fc259..258d94d 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
@@ -357,6 +357,9 @@  static void rt2x00lib_fill_tx_status(struct rt2x00_dev *rt2x00dev,
 	if (i < (IEEE80211_TX_MAX_RATES - 1))
 		tx_info->status.rates[i].idx = -1; /* terminate */
 
+	if (!test_bit(TXDONE_ACK_REQ, &txdesc->flags))
+		tx_info->flags |= IEEE80211_TX_CTL_NO_ACK;
+
 	if (!(tx_info->flags & IEEE80211_TX_CTL_NO_ACK)) {
 		if (success)
 			tx_info->flags |= IEEE80211_TX_STAT_ACK;
@@ -375,7 +378,8 @@  static void rt2x00lib_fill_tx_status(struct rt2x00_dev *rt2x00dev,
 	 */
 	if (test_bit(TXDONE_AMPDU, &txdesc->flags) ||
 	    tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
-		tx_info->flags |= IEEE80211_TX_STAT_AMPDU;
+		tx_info->flags |= IEEE80211_TX_STAT_AMPDU |
+				  IEEE80211_TX_CTL_AMPDU;
 		tx_info->status.ampdu_len = 1;
 		tx_info->status.ampdu_ack_len = success ? 1 : 0;
 
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.h b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.h
index 9b297fc..921f768 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.h
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.h
@@ -215,6 +215,7 @@  enum txdone_entry_desc_flags {
 	TXDONE_FAILURE,
 	TXDONE_EXCESSIVE_RETRY,
 	TXDONE_AMPDU,
+	TXDONE_ACK_REQ,
 };
 
 /**