]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: ath12k: fix uninitialize symbol error on ath12k_peer_assoc_h_he()
authorAaradhana Sahu <quic_aarasahu@quicinc.com>
Tue, 11 Jun 2024 03:10:17 +0000 (08:40 +0530)
committerKalle Valo <quic_kvalo@quicinc.com>
Wed, 19 Jun 2024 14:00:51 +0000 (17:00 +0300)
commit19b77e7c656a3e125319cc3ef347b397cf042bf6
tree6754edc8b944937329831ca6c71e4dd0be40dabf
parent59ca26c9a6e844204d25299774caa5441c0e68eb
wifi: ath12k: fix uninitialize symbol error on ath12k_peer_assoc_h_he()

Smatch throws following errors

drivers/net/wireless/ath/ath12k/mac.c:1922 ath12k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_80'.
drivers/net/wireless/ath/ath12k/mac.c:1922 ath12k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_160'.
drivers/net/wireless/ath/ath12k/mac.c:1924 ath12k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_80'.

In ath12k_peer_assoc_h_he() rx_mcs_80 and rx_mcs_160 variables
remain uninitialized in the following conditions:
1. Whenever the value of mcs_80 become equal to
   IEEE80211_HE_MCS_NOT_SUPPORTED then rx_mcs_80 remains uninitialized.
2. Whenever phy capability is not supported 160 channel width and
   value of mcs_160 become equal to IEEE80211_HE_MCS_NOT_SUPPORTED
   then rx_mcs_160 remains uninitialized.

Initialize these variables during declaration.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1

Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://patch.msgid.link/20240611031017.297927-3-quic_aarasahu@quicinc.com
drivers/net/wireless/ath/ath12k/mac.c