1
0

qcacld-3.0: Sanity check for channel width

For channel width not have the sanity whenever the
value is zero or greater than 40MHz in 2.4GHz.

Added sanity check for channel width more than
40MHz for 2.4Ghz and channel width is zero.

Change-Id: I60883dcc5afd1e381cea1d3c9ef49a55d688298b
CRs-Fixed: 3181700
Este cometimento está contido em:
Vinod Kumar Myadam
2022-04-29 15:28:12 +05:30
cometido por Madan Koyyalamudi
ascendente 1dd34a2ef0
cometimento 134a569261

Ver ficheiro

@@ -684,8 +684,10 @@ enum wlan_phymode wma_chan_phy_mode(uint32_t freq, enum phy_ch_width chan_width,
if (!wma)
return WLAN_PHYMODE_AUTO;
if (chan_width >= CH_WIDTH_INVALID) {
wma_err_rl("Invalid channel width %d", chan_width);
if (chan_width >= CH_WIDTH_INVALID || !bw_val ||
(wlan_reg_is_24ghz_ch_freq(freq) && bw_val > 40)) {
wma_err_rl("Invalid channel width %d freq %d",
chan_width, freq);
return WLAN_PHYMODE_AUTO;
}