drivers/net/wireless/ath/ath12k/mac.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
Fix below two Smatch warnings:
1#
drivers/net/wireless/ath/ath12k/mac.c:10069
ath12k_mac_fill_reg_tpc_info() error: uninitialized symbol 'eirp_power'.
2#
drivers/net/wireless/ath/ath12k/mac.c:9812
ath12k_mac_parse_tx_pwr_env() error: buffer overflow 'local_non_psd->power' 5 <= 15
drivers/net/wireless/ath/ath12k/mac.c:9812
ath12k_mac_parse_tx_pwr_env() error: buffer overflow 'reg_non_psd->power' 5 <= 15
Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
---
Baochen Qiang (2):
wifi: ath12k: initialize eirp_power before use
wifi: ath12k: fix overflow warning on num_pwr_levels
drivers/net/wireless/ath/ath12k/mac.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
---
base-commit: 4cedae6335644a5858e1bc2c367aedc10482b654
change-id: 20250716-ath12k-fix-smatch-warning-on-6g-vlp-a97cb86f3a16
Best regards,
--
Baochen Qiang <baochen.qiang@oss.qualcomm.com>
On Mon, 04 Aug 2025 11:03:09 +0800, Baochen Qiang wrote:
> Fix below two Smatch warnings:
>
> 1#
> drivers/net/wireless/ath/ath12k/mac.c:10069
> ath12k_mac_fill_reg_tpc_info() error: uninitialized symbol 'eirp_power'.
>
> 2#
> drivers/net/wireless/ath/ath12k/mac.c:9812
> ath12k_mac_parse_tx_pwr_env() error: buffer overflow 'local_non_psd->power' 5 <= 15
> drivers/net/wireless/ath/ath12k/mac.c:9812
> ath12k_mac_parse_tx_pwr_env() error: buffer overflow 'reg_non_psd->power' 5 <= 15
>
> [...]
Applied, thanks!
[1/2] wifi: ath12k: initialize eirp_power before use
commit: bba2f9faf41ee9607c78fcd669527b7654543cfe
[2/2] wifi: ath12k: fix overflow warning on num_pwr_levels
commit: ea2b0af4c9e3f7187b5be4b7fc1511ea239046c0
Best regards,
--
Jeff Johnson <jeff.johnson@oss.qualcomm.com>
On 8/4/2025 8:33 AM, Baochen Qiang wrote: > Fix below two Smatch warnings: > > 1# > drivers/net/wireless/ath/ath12k/mac.c:10069 > ath12k_mac_fill_reg_tpc_info() error: uninitialized symbol 'eirp_power'. > > 2# > drivers/net/wireless/ath/ath12k/mac.c:9812 > ath12k_mac_parse_tx_pwr_env() error: buffer overflow 'local_non_psd->power' 5 <= 15 > drivers/net/wireless/ath/ath12k/mac.c:9812 > ath12k_mac_parse_tx_pwr_env() error: buffer overflow 'reg_non_psd->power' 5 <= 15 > > Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> > --- > Baochen Qiang (2): > wifi: ath12k: initialize eirp_power before use > wifi: ath12k: fix overflow warning on num_pwr_levels > > drivers/net/wireless/ath/ath12k/mac.c | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
On 8/3/2025 8:03 PM, Baochen Qiang wrote: > Fix below two Smatch warnings: > > 1# > drivers/net/wireless/ath/ath12k/mac.c:10069 > ath12k_mac_fill_reg_tpc_info() error: uninitialized symbol 'eirp_power'. > > 2# > drivers/net/wireless/ath/ath12k/mac.c:9812 > ath12k_mac_parse_tx_pwr_env() error: buffer overflow 'local_non_psd->power' 5 <= 15 > drivers/net/wireless/ath/ath12k/mac.c:9812 > ath12k_mac_parse_tx_pwr_env() error: buffer overflow 'reg_non_psd->power' 5 <= 15 > > Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> > --- > Baochen Qiang (2): > wifi: ath12k: initialize eirp_power before use > wifi: ath12k: fix overflow warning on num_pwr_levels > > drivers/net/wireless/ath/ath12k/mac.c | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) Since this is fixing smatch issues I plan on taking this through ath-current instead of ath-next. /jeff
On 8/6/2025 10:10 PM, Jeff Johnson wrote: > On 8/3/2025 8:03 PM, Baochen Qiang wrote: >> Fix below two Smatch warnings: >> >> 1# >> drivers/net/wireless/ath/ath12k/mac.c:10069 >> ath12k_mac_fill_reg_tpc_info() error: uninitialized symbol 'eirp_power'. >> >> 2# >> drivers/net/wireless/ath/ath12k/mac.c:9812 >> ath12k_mac_parse_tx_pwr_env() error: buffer overflow 'local_non_psd->power' 5 <= 15 >> drivers/net/wireless/ath/ath12k/mac.c:9812 >> ath12k_mac_parse_tx_pwr_env() error: buffer overflow 'reg_non_psd->power' 5 <= 15 >> >> Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> >> --- >> Baochen Qiang (2): >> wifi: ath12k: initialize eirp_power before use >> wifi: ath12k: fix overflow warning on num_pwr_levels >> >> drivers/net/wireless/ath/ath12k/mac.c | 16 ++++++++++------ >> 1 file changed, 10 insertions(+), 6 deletions(-) > > Since this is fixing smatch issues I plan on taking this through ath-current > instead of ath-next. Sure, fine with me. > > /jeff
© 2016 - 2026 Red Hat, Inc.