qcacld-3.0: Do not change home channel when update phymode from SON
When updating the phymode of SAP required from SON, do not change current home channel. Currently hdd_restart_sap uses the channel information from sap_config to do SAP restart. For SON, we need override the sap_config channel information with desired channel information in vdev. Change-Id: Ie01a5dc9c3cd6bbae1bbe246e6f17a329189be50 CRs-Fixed: 3371361
This commit is contained in:
@@ -2380,6 +2380,7 @@ wlansap_son_update_sap_config_phymode(struct wlan_objmgr_vdev *vdev,
|
||||
{
|
||||
struct wlan_objmgr_pdev *pdev;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
struct wlan_channel *des_chan;
|
||||
|
||||
if (!vdev || !config) {
|
||||
sap_err("Invalid input parameters");
|
||||
@@ -2396,6 +2397,11 @@ wlansap_son_update_sap_config_phymode(struct wlan_objmgr_vdev *vdev,
|
||||
sap_err("Invalid psoc parameters");
|
||||
return QDF_STATUS_E_FAULT;
|
||||
}
|
||||
des_chan = wlan_vdev_mlme_get_des_chan(vdev);
|
||||
if (!des_chan) {
|
||||
sap_err("Invalid desired channel");
|
||||
return QDF_STATUS_E_FAULT;
|
||||
}
|
||||
config->sap_orig_hw_mode = config->SapHw_mode;
|
||||
config->ch_width_orig = config->ch_params.ch_width;
|
||||
switch (phy_mode) {
|
||||
@@ -2488,6 +2494,16 @@ wlansap_son_update_sap_config_phymode(struct wlan_objmgr_vdev *vdev,
|
||||
}
|
||||
}
|
||||
|
||||
config->chan_freq = des_chan->ch_freq;
|
||||
config->sec_ch_freq = 0;
|
||||
if (WLAN_REG_IS_24GHZ_CH_FREQ(des_chan->ch_freq) &&
|
||||
config->ch_params.ch_width == CH_WIDTH_40MHZ &&
|
||||
des_chan->ch_width == CH_WIDTH_40MHZ) {
|
||||
if (des_chan->ch_cfreq1 == des_chan->ch_freq + BW_10_MHZ)
|
||||
config->sec_ch_freq = des_chan->ch_freq + BW_20_MHZ;
|
||||
if (des_chan->ch_cfreq1 == des_chan->ch_freq - BW_10_MHZ)
|
||||
config->sec_ch_freq = des_chan->ch_freq - BW_20_MHZ;
|
||||
}
|
||||
wlan_reg_set_channel_params_for_pwrmode(pdev, config->chan_freq,
|
||||
config->sec_ch_freq,
|
||||
&config->ch_params,
|
||||
|
Reference in New Issue
Block a user