mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
wifi: brcmsmac: add gain range check to wlc_phy_iqcal_gainparams_nphy()
[ Upstream commit 3f4a0948c3524ae50f166dbc6572a3296b014e62 ] In 'wlc_phy_iqcal_gainparams_nphy()', add gain range check to WARN() instead of possible out-of-bounds 'tbl_iqcal_gainparams_nphy' access. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241210070441.836362-1-dmantipov@yandex.ru Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9211e32207
commit
093286c334
@@ -23427,6 +23427,9 @@ wlc_phy_iqcal_gainparams_nphy(struct brcms_phy *pi, u16 core_no,
|
||||
break;
|
||||
}
|
||||
|
||||
if (WARN_ON(k == NPHY_IQCAL_NUMGAINS))
|
||||
return;
|
||||
|
||||
params->txgm = tbl_iqcal_gainparams_nphy[band_idx][k][1];
|
||||
params->pga = tbl_iqcal_gainparams_nphy[band_idx][k][2];
|
||||
params->pad = tbl_iqcal_gainparams_nphy[band_idx][k][3];
|
||||
|
||||
Reference in New Issue
Block a user