Skip to contentSkip to conversation

wifi: iwlwifi: Ensure ack flag is properly cleared.

PATCH In review [email protected] 2 participants 2 messages Aug 8, 2023 – Aug 28, 2023 Intel wireless wifi link (iwlwifi)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: iwlwifi: Ensure ack flag is properly cleared.

From: Ben Greear <[email protected]>

Debugging indicates that nothing else is clearing the info->flags, so some frames were flagged as ACKed when they should not be. Explicitly clear the ack flag to ensure this does not happen.

---
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/wireless/intel/iwlwifi/mvm/tx.c +3 -0
index 0abc31a6951d..67f208cc19c8 100644
@@ -1863,6 +1863,7 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
 		iwl_trans_free_tx_cmd(mvm->trans, info->driver_data[1]);
 
 		memset(&info->status, 0, sizeof(info->status));
+		info->flags &= ~(IEEE80211_TX_STAT_ACK | IEEE80211_TX_STAT_TX_FILTERED);
 
 		/* inform mac80211 about what happened with the frame */
 		switch (status & TX_STATUS_MSK) {
@@ -2241,6 +2242,8 @@ static void iwl_mvm_tx_reclaim(struct iwl_mvm *mvm, int sta_id, int tid,
 		 */
 		if (!is_flush)
 			info->flags |= IEEE80211_TX_STAT_ACK;
+		else
+			info->flags &= ~IEEE80211_TX_STAT_ACK;
 	}
 
 	/*
Signature · 1 line
2.40.0
Acked-by on v1 1/1
#1 lore raw
Quoted 30 lines · On Tue, 2023-08-08 at 13:56 -0700, [email protected] wrote:

From: Ben Greear <[email protected]>

Debugging indicates that nothing else is clearing the info->flags, so some frames were flagged as ACKed when they should not be. Explicitly clear the ack flag to ensure this does not happen.

---
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 +++

 1 file changed, 3 insertions(+)
drivers/net/wireless/intel/iwlwifi/mvm/tx.c +0 -0
index 0abc31a6951d..67f208cc19c8 100644
@@ -1863,6 +1863,7 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
                 iwl_trans_free_tx_cmd(mvm->trans, info->driver_data[1]);


                memset(&info->status, 0, sizeof(info->status));
+               info->flags &= ~(IEEE80211_TX_STAT_ACK | IEEE80211_TX_STAT_TX_FILTERED);
                /* inform mac80211 about what happened with the frame */ switch (status & TX_STATUS_MSK) {

drivers/net/wireless/intel/iwlwifi/mvm/tx.c +2 -0
@@ -2241,6 +2242,8 @@ static void iwl_mvm_tx_reclaim(struct iwl_mvm *mvm, int sta_id, int tid,
                  */
                 if (!is_flush)
                         info->flags |= IEEE80211_TX_STAT_ACK;
+               else
+                       info->flags &= ~IEEE80211_TX_STAT_ACK;
         }
Quoted 2 lines


        /*