qcacld-3.0: Validate channel list count before updting acs channel range

Currently, do_acs may invoke wlan_hdd_set_acs_ch_range with
channel list count is 0. In case of SAP+SAP turned on non-dbs
hardware, Intersection of supported frequencies may become
zero and channel list count will become zero. while handling
0 channel list count in wlan_hdd_handle_zero_acs_list, if sta
count is 0 then channel list will not be updated to 1 which may
cause OOB issue while updating acs channel range.

Fix is to validate channel list count before populating acs
channel list.

Change-Id: Iffbe139748e76cd692e774e5f9db2c1c3d086332
CRs-Fixed: 2922790
This commit is contained in:
sheenam monga 2021-04-14 17:46:01 +05:30 • committed by Madan Koyyalamudi
commit 7842cc70fb

View file

@ -3286,6 +3286,10 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
sap_config);
ret = 0;
goto out;
} else if (!sap_config->acs_cfg.ch_list_count) {
hdd_err("channel list count 0");
ret = -EINVAL;
goto out;
}
}