Skip to content

Commit 7ec5471

Browse files
jmberg-intelegrumbach
authored andcommitted
iwlwifi: mvm: remove is_data_qos variable in TX
"is_data_qos == true" is equivalent to "tid < IWL_MAX_TID_COUNT" since tid is only assigned (and range-checked) in that case. This removes a (harmless) smatch warning that occurs because it can't seem to follow the above logic from the code. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
1 parent 2d3d31b commit 7ec5471

File tree

1 file changed

+2
-3
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+2
-3
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/tx.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,
654654
u16 seq_number = 0;
655655
u8 tid = IWL_MAX_TID_COUNT;
656656
u8 txq_id = info->hw_queue;
657-
bool is_data_qos = false, is_ampdu = false;
657+
bool is_ampdu = false;
658658
int hdrlen;
659659

660660
mvmsta = iwl_mvm_sta_from_mac80211(sta);
@@ -694,7 +694,6 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,
694694
seq_number &= IEEE80211_SCTL_SEQ;
695695
hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
696696
hdr->seq_ctrl |= cpu_to_le16(seq_number);
697-
is_data_qos = true;
698697
is_ampdu = info->flags & IEEE80211_TX_CTL_AMPDU;
699698
}
700699

@@ -722,7 +721,7 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,
722721
if (iwl_trans_tx(mvm->trans, skb, dev_cmd, txq_id))
723722
goto drop_unlock_sta;
724723

725-
if (is_data_qos && !ieee80211_has_morefrags(fc))
724+
if (tid < IWL_MAX_TID_COUNT && !ieee80211_has_morefrags(fc))
726725
mvmsta->tid_data[tid].seq_number = seq_number + 0x10;
727726

728727
spin_unlock(&mvmsta->lock);

0 commit comments

Comments
 (0)