qcacmn: Fix wrong MLO 2 GHz link CCFS1 in response to get_channel
2 GHz link CCFS may not filled correctly in vht/he op, wrong CCFS0 is got from util_scan_sec_chan_freq_from_htinfo and passed to kernel, regulatory check failed, disconnect will happen. To fix it, add new API util_scan_ccfs0_from_htinfo, and get CCFS0 by it. Change-Id: I0e8879f13cff37b85cffb6446cc15c60c05465d2 CRs-Fixed: 3739815
This commit is contained in:

committed by
Ravindra Konda

parent
a9c79a17ae
commit
bf97803ce8
@@ -728,13 +728,13 @@ util_scan_get_phymode_6g(struct wlan_objmgr_pdev *pdev,
|
||||
#endif
|
||||
|
||||
static inline
|
||||
uint32_t util_scan_sec_chan_freq_from_htinfo(struct wlan_ie_htinfo_cmn *htinfo,
|
||||
uint32_t util_scan_ccfs0_from_htinfo(struct wlan_ie_htinfo_cmn *htinfo,
|
||||
uint32_t primary_chan_freq)
|
||||
{
|
||||
if (htinfo->hi_extchoff == WLAN_HTINFO_EXTOFFSET_ABOVE)
|
||||
return primary_chan_freq + WLAN_CHAN_SPACING_20MHZ;
|
||||
return primary_chan_freq + WLAN_CHAN_SPACING_20MHZ / 2;
|
||||
else if (htinfo->hi_extchoff == WLAN_HTINFO_EXTOFFSET_BELOW)
|
||||
return primary_chan_freq - WLAN_CHAN_SPACING_20MHZ;
|
||||
return primary_chan_freq - WLAN_CHAN_SPACING_20MHZ / 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -771,7 +771,7 @@ util_scan_get_phymode_5g(struct wlan_objmgr_pdev *pdev,
|
||||
phymode = WLAN_PHYMODE_11NA_HT20;
|
||||
|
||||
scan_params->channel.cfreq0 =
|
||||
util_scan_sec_chan_freq_from_htinfo(htinfo,
|
||||
util_scan_ccfs0_from_htinfo(htinfo,
|
||||
scan_params->channel.chan_freq);
|
||||
|
||||
if (util_scan_entry_vhtcap(scan_params) && vhtop) {
|
||||
@@ -923,7 +923,7 @@ util_scan_get_phymode_2g(struct scan_cache_entry *scan_params)
|
||||
return phymode;
|
||||
|
||||
scan_params->channel.cfreq0 =
|
||||
util_scan_sec_chan_freq_from_htinfo(htinfo,
|
||||
util_scan_ccfs0_from_htinfo(htinfo,
|
||||
scan_params->channel.chan_freq);
|
||||
|
||||
if (util_scan_entry_vhtcap(scan_params) && vhtop) {
|
||||
|
Reference in New Issue
Block a user