2023-09-14 16:30:23

by Dmitry Antipov

[permalink] [raw]
Subject: [PATCH] wifi: ath10k: drop HTT_DATA_TX_STATUS_DOWNLOAD_FAIL

According to Jeff, 'HTT_DATA_TX_STATUS_DOWNLOAD_FAIL' from
'enum htt_data_tx_status' is never actually used by the
firmware code and so may be dropped, with the related
adjustment to 'ath10k_htt_rx_tx_compl_ind()'.

Suggested-by: Jeff Johnson <[email protected]>
Signed-off-by: Dmitry Antipov <[email protected]>

Found by Linux Verification Center (linuxtesting.org) with SVACE.
---
drivers/net/wireless/ath/ath10k/htt.h | 3 +--
drivers/net/wireless/ath/ath10k/htt_rx.c | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h
index 7b24297146e7..c80470e8886a 100644
--- a/drivers/net/wireless/ath/ath10k/htt.h
+++ b/drivers/net/wireless/ath/ath10k/htt.h
@@ -880,8 +880,7 @@ enum htt_data_tx_status {
HTT_DATA_TX_STATUS_OK = 0,
HTT_DATA_TX_STATUS_DISCARD = 1,
HTT_DATA_TX_STATUS_NO_ACK = 2,
- HTT_DATA_TX_STATUS_POSTPONE = 3, /* HL only */
- HTT_DATA_TX_STATUS_DOWNLOAD_FAIL = 128
+ HTT_DATA_TX_STATUS_POSTPONE = 3 /* HL only */
};

enum htt_data_tx_flags {
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index 438b0caaceb7..b261d6371c0f 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -2964,7 +2964,6 @@ static void ath10k_htt_rx_tx_compl_ind(struct ath10k *ar,
break;
case HTT_DATA_TX_STATUS_DISCARD:
case HTT_DATA_TX_STATUS_POSTPONE:
- case HTT_DATA_TX_STATUS_DOWNLOAD_FAIL:
tx_done.status = HTT_TX_COMPL_STATE_DISCARD;
break;
default:
--
2.41.0


2023-09-14 19:16:14

by Jeff Johnson

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath10k: drop HTT_DATA_TX_STATUS_DOWNLOAD_FAIL

On 9/14/2023 9:07 AM, Dmitry Antipov wrote:
> According to Jeff, 'HTT_DATA_TX_STATUS_DOWNLOAD_FAIL' from
> 'enum htt_data_tx_status' is never actually used by the
> firmware code and so may be dropped, with the related
> adjustment to 'ath10k_htt_rx_tx_compl_ind()'.
>
> Suggested-by: Jeff Johnson <[email protected]>
> Signed-off-by: Dmitry Antipov <[email protected]>

Acked-by: Jeff Johnson <[email protected]>

>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> ---
> drivers/net/wireless/ath/ath10k/htt.h | 3 +--
> drivers/net/wireless/ath/ath10k/htt_rx.c | 1 -
> 2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h
> index 7b24297146e7..c80470e8886a 100644
> --- a/drivers/net/wireless/ath/ath10k/htt.h
> +++ b/drivers/net/wireless/ath/ath10k/htt.h
> @@ -880,8 +880,7 @@ enum htt_data_tx_status {
> HTT_DATA_TX_STATUS_OK = 0,
> HTT_DATA_TX_STATUS_DISCARD = 1,
> HTT_DATA_TX_STATUS_NO_ACK = 2,
> - HTT_DATA_TX_STATUS_POSTPONE = 3, /* HL only */
> - HTT_DATA_TX_STATUS_DOWNLOAD_FAIL = 128
> + HTT_DATA_TX_STATUS_POSTPONE = 3 /* HL only */
> };
>
> enum htt_data_tx_flags {
> diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
> index 438b0caaceb7..b261d6371c0f 100644
> --- a/drivers/net/wireless/ath/ath10k/htt_rx.c
> +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
> @@ -2964,7 +2964,6 @@ static void ath10k_htt_rx_tx_compl_ind(struct ath10k *ar,
> break;
> case HTT_DATA_TX_STATUS_DISCARD:
> case HTT_DATA_TX_STATUS_POSTPONE:
> - case HTT_DATA_TX_STATUS_DOWNLOAD_FAIL:
> tx_done.status = HTT_TX_COMPL_STATE_DISCARD;
> break;
> default:

2023-09-21 21:11:23

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath10k: drop HTT_DATA_TX_STATUS_DOWNLOAD_FAIL

Dmitry Antipov <[email protected]> wrote:

> According to Jeff, 'HTT_DATA_TX_STATUS_DOWNLOAD_FAIL' from
> 'enum htt_data_tx_status' is never actually used by the
> firmware code and so may be dropped, with the related
> adjustment to 'ath10k_htt_rx_tx_compl_ind()'.
>
> Suggested-by: Jeff Johnson <[email protected]>
> Signed-off-by: Dmitry Antipov <[email protected]>
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> Acked-by: Jeff Johnson <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>

Patch applied to ath-next branch of ath.git, thanks.

30e7099a6dc9 wifi: ath10k: drop HTT_DATA_TX_STATUS_DOWNLOAD_FAIL

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches