mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacld-3.0: Avoid selection of irrelevant channel in 80/160MHz config
When channel list contains all channels from channel 1 to channel 165 and ch width is 80MHz, the channel to be selected as part of ACS algorithm should be a 5GHz channel as 2.4GHz channels does not support 80MHz but 2.4GHz channel gets selected with channel width as 40MHz. Similarly when ch width is 160Mhz, the 160Mhz bonding can be made only by 36-64 and 100-128 channels but 2.4Ghz channel or some other 5Ghz channel gets selected as a result of ACS algorithm. Assign max weight to all the 2.4GHz channels in 80Mhz and to all 2.4 Ghz channels and 5Ghz channels not in the range 36-64 and 100-128 in 160 Mhz so that only a valid channel is selected after the ACS algorithm is completed. Change-Id: I00c40e5d000a1cf8b79397fd4e361838a60b363d CRs-Fixed: 2182011
This commit is contained in:
parent
d46194c757
commit
75e74413db
2 changed files with 22 additions and 8 deletions
|
|
@ -2577,7 +2577,9 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
hdd_debug("channel width =%d", ch_width);
|
||||
if (ch_width == 80)
|
||||
if (ch_width == 160)
|
||||
sap_config->acs_cfg.ch_width = CH_WIDTH_160MHZ;
|
||||
else if (ch_width == 80)
|
||||
sap_config->acs_cfg.ch_width = CH_WIDTH_80MHZ;
|
||||
else if (ch_width == 40)
|
||||
sap_config->acs_cfg.ch_width = CH_WIDTH_40MHZ;
|
||||
|
|
@ -2886,7 +2888,9 @@ void wlan_hdd_cfg80211_acs_ch_select_evt(struct hdd_adapter *adapter)
|
|||
return;
|
||||
}
|
||||
|
||||
if (sap_cfg->acs_cfg.ch_width == CH_WIDTH_80MHZ)
|
||||
if (sap_cfg->acs_cfg.ch_width == CH_WIDTH_160MHZ)
|
||||
ch_width = 160;
|
||||
else if (sap_cfg->acs_cfg.ch_width == CH_WIDTH_80MHZ)
|
||||
ch_width = 80;
|
||||
else if (sap_cfg->acs_cfg.ch_width == CH_WIDTH_40MHZ)
|
||||
ch_width = 40;
|
||||
|
|
|
|||
|
|
@ -1911,12 +1911,16 @@ static void sap_sort_chl_weight_ht80(tSapChSelSpectInfo *pSpectInfoParams)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Assign max weight(SAP_ACS_WEIGHT_MAX * 4) to 2.4 Ghz channels
|
||||
* and channel 165 as they cannot be part of a 80Mhz channel bonding.
|
||||
*/
|
||||
pSpectInfo = pSpectInfoParams->pSpectCh;
|
||||
for (j = 0; j < pSpectInfoParams->numSpectChans; j++) {
|
||||
if (CHANNEL_165 == pSpectInfo[j].chNum) {
|
||||
if ((pSpectInfo[j].chNum >= WLAN_REG_CH_NUM(CHAN_ENUM_1) &&
|
||||
pSpectInfo[j].chNum <= WLAN_REG_CH_NUM(CHAN_ENUM_14)) ||
|
||||
(CHANNEL_165 == pSpectInfo[j].chNum))
|
||||
pSpectInfo[j].weight = SAP_ACS_WEIGHT_MAX * 4;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sap_sort_chl_weight(pSpectInfoParams);
|
||||
|
|
@ -2051,12 +2055,18 @@ static void sap_sort_chl_weight_vht160(tSapChSelSpectInfo *pSpectInfoParams)
|
|||
pSpectInfo[j + minIdx].weight = acs_vht160_channels[i].weight;
|
||||
}
|
||||
|
||||
/*
|
||||
* Assign max weight(SAP_ACS_WEIGHT_MAX * 8) to 2.4 Ghz channels
|
||||
* and channel 132-165 as they cannot be part of a 160Mhz channel
|
||||
* bonding.
|
||||
*/
|
||||
pSpectInfo = pSpectInfoParams->pSpectCh;
|
||||
for (j = 0; j < pSpectInfoParams->numSpectChans; j++) {
|
||||
if (CHANNEL_165 == pSpectInfo[j].chNum) {
|
||||
if ((pSpectInfo[j].chNum >= WLAN_REG_CH_NUM(CHAN_ENUM_1) &&
|
||||
pSpectInfo[j].chNum <= WLAN_REG_CH_NUM(CHAN_ENUM_14)) ||
|
||||
(pSpectInfo[j].chNum >= WLAN_REG_CH_NUM(CHAN_ENUM_132) &&
|
||||
pSpectInfo[j].chNum <= WLAN_REG_CH_NUM(CHAN_ENUM_165)))
|
||||
pSpectInfo[j].weight = SAP_ACS_WEIGHT_MAX * 8;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sap_sort_chl_weight(pSpectInfoParams);
|
||||
|
|
|
|||
Loading…
Reference in a new issue