qcacld-3.0: Start SAP on valid channel after country change
Currently if SAP is up on 5 GHz DFS/non-DFS channel and country change happens to world mode where SAP is not allowed on 5 GHz channels then it moves to a 2.4 GHz channel and saves current operating frequency band information, now again if a country change happens SAP tries to move back to the first 5 GHz active/passive channel. Sap should come to active channel first. If not available then it should come on DFS channel, but it shouldn't come up on passive channel. To address this issue, add a fix to filter out passive channels. Change-Id: I32e8a81c2a5d9e785262edbeeef2c879c87f1302 CRs-Fixed: 3277965
This commit is contained in:

committed by
Madan Koyyalamudi

parent
a97a2ec796
commit
5730e95021
@@ -1030,13 +1030,17 @@ static QDF_STATUS policy_mgr_pcl_modification_for_sap(
|
|||||||
uint32_t *len)
|
uint32_t *len)
|
||||||
{
|
{
|
||||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||||
|
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||||
bool mandatory_modified_pcl = false;
|
bool mandatory_modified_pcl = false;
|
||||||
bool nol_modified_pcl = false;
|
bool nol_modified_pcl = false;
|
||||||
bool dfs_modified_pcl = false;
|
bool dfs_modified_pcl = false;
|
||||||
bool indoor_modified_pcl = false;
|
bool indoor_modified_pcl = false;
|
||||||
|
bool passive_modified_pcl = false;
|
||||||
bool modified_final_pcl = false;
|
bool modified_final_pcl = false;
|
||||||
bool srd_chan_enabled;
|
bool srd_chan_enabled;
|
||||||
|
|
||||||
|
pm_ctx = policy_mgr_get_context(psoc);
|
||||||
|
|
||||||
if (policy_mgr_is_sap_mandatory_channel_set(psoc)) {
|
if (policy_mgr_is_sap_mandatory_channel_set(psoc)) {
|
||||||
status = policy_mgr_modify_sap_pcl_based_on_mandatory_channel(
|
status = policy_mgr_modify_sap_pcl_based_on_mandatory_channel(
|
||||||
psoc, pcl_channels, pcl_weight, len);
|
psoc, pcl_channels, pcl_weight, len);
|
||||||
@@ -1084,6 +1088,15 @@ static QDF_STATUS policy_mgr_pcl_modification_for_sap(
|
|||||||
}
|
}
|
||||||
indoor_modified_pcl = true;
|
indoor_modified_pcl = true;
|
||||||
|
|
||||||
|
status = policy_mgr_filter_passive_ch(pm_ctx->pdev,
|
||||||
|
pcl_channels, len);
|
||||||
|
|
||||||
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
|
policy_mgr_err("failed to filter passive channels");
|
||||||
|
return INVALID_CHANNEL_ID;
|
||||||
|
}
|
||||||
|
passive_modified_pcl = true;
|
||||||
|
|
||||||
status = policy_mgr_modify_sap_pcl_for_6G_channels(psoc,
|
status = policy_mgr_modify_sap_pcl_for_6G_channels(psoc,
|
||||||
pcl_channels,
|
pcl_channels,
|
||||||
pcl_weight, len);
|
pcl_weight, len);
|
||||||
@@ -1093,11 +1106,12 @@ static QDF_STATUS policy_mgr_pcl_modification_for_sap(
|
|||||||
}
|
}
|
||||||
|
|
||||||
modified_final_pcl = true;
|
modified_final_pcl = true;
|
||||||
policy_mgr_debug(" %d %d %d %d %d",
|
policy_mgr_debug("%d %d %d %d %d %d",
|
||||||
mandatory_modified_pcl,
|
mandatory_modified_pcl,
|
||||||
nol_modified_pcl,
|
nol_modified_pcl,
|
||||||
dfs_modified_pcl,
|
dfs_modified_pcl,
|
||||||
indoor_modified_pcl,
|
indoor_modified_pcl,
|
||||||
|
passive_modified_pcl,
|
||||||
modified_final_pcl);
|
modified_final_pcl);
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
@@ -3570,15 +3584,16 @@ uint32_t policy_mgr_get_alternate_channel_for_sap(
|
|||||||
/*
|
/*
|
||||||
* The API is expected to select the channel on the
|
* The API is expected to select the channel on the
|
||||||
* other band which is not same as sap's home and
|
* other band which is not same as sap's home and
|
||||||
* concurrent interference channel, so skip the sap
|
* concurrent interference channel (if present),
|
||||||
* home channel in PCL.
|
* so skip the sap home channel in PCL.
|
||||||
*/
|
*/
|
||||||
if (pcl_channels[i] == sap_ch_freq)
|
if (pcl_channels[i] == sap_ch_freq)
|
||||||
continue;
|
continue;
|
||||||
if (!is_6ghz_cap &&
|
if (!is_6ghz_cap &&
|
||||||
WLAN_REG_IS_6GHZ_CHAN_FREQ(pcl_channels[i]))
|
WLAN_REG_IS_6GHZ_CHAN_FREQ(pcl_channels[i]))
|
||||||
continue;
|
continue;
|
||||||
if (policy_mgr_are_2_freq_on_same_mac(psoc,
|
if (policy_mgr_get_connection_count(psoc) &&
|
||||||
|
policy_mgr_are_2_freq_on_same_mac(psoc,
|
||||||
sap_ch_freq,
|
sap_ch_freq,
|
||||||
pcl_channels[i]))
|
pcl_channels[i]))
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user