qcacld-3.0: Start SAP on valid non-DFS 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 any allowed 5 GHz DFS/non-DFS channel. Sap should come to non-DFS channel first. If not available then it should come on DFS channel To address this issue, add a fix to check for first valid 5 GHz non-DFS channel and first valid 5 GHz DFS channel. Move to valid 5 GHz non-DFS channel if present. Change-Id: I0cf3841e35e22efc0f518ce15b4cab40996cc645 CRs-Fixed: 3247522
此提交包含在:
@@ -3504,7 +3504,8 @@ uint32_t policy_mgr_get_alternate_channel_for_sap(
|
||||
uint8_t pcl_weight[NUM_CHANNELS];
|
||||
uint32_t ch_freq = 0;
|
||||
uint32_t pcl_len = 0;
|
||||
uint32_t first_valid_5g_freq = 0;
|
||||
uint32_t first_valid_dfs_5g_freq = 0;
|
||||
uint32_t first_valid_non_dfs_5g_freq = 0;
|
||||
uint32_t first_valid_6g_freq = 0;
|
||||
struct policy_mgr_conc_connection_info info;
|
||||
uint8_t num_cxn_del = 0;
|
||||
@@ -3536,16 +3537,15 @@ uint32_t policy_mgr_get_alternate_channel_for_sap(
|
||||
/*
|
||||
* The API is expected to select the channel on the
|
||||
* other band which is not same as sap's home and
|
||||
* concurrent interference channel(if present), so skip
|
||||
* the sap home channel in PCL.
|
||||
* concurrent interference channel, so skip the sap
|
||||
* home channel in PCL.
|
||||
*/
|
||||
if (pcl_channels[i] == sap_ch_freq)
|
||||
continue;
|
||||
if (!is_6ghz_cap &&
|
||||
WLAN_REG_IS_6GHZ_CHAN_FREQ(pcl_channels[i]))
|
||||
continue;
|
||||
if (policy_mgr_get_connection_count(psoc) &&
|
||||
policy_mgr_are_2_freq_on_same_mac(psoc,
|
||||
if (policy_mgr_are_2_freq_on_same_mac(psoc,
|
||||
sap_ch_freq,
|
||||
pcl_channels[i]))
|
||||
continue;
|
||||
@@ -3556,11 +3556,17 @@ uint32_t policy_mgr_get_alternate_channel_for_sap(
|
||||
} else if (!ch_freq) {
|
||||
ch_freq = pcl_channels[i];
|
||||
}
|
||||
if (!first_valid_5g_freq &&
|
||||
if (!first_valid_non_dfs_5g_freq &&
|
||||
wlan_reg_is_5ghz_ch_freq(pcl_channels[i])) {
|
||||
first_valid_5g_freq = pcl_channels[i];
|
||||
if (pref_band == REG_BAND_5G)
|
||||
break;
|
||||
if (!wlan_reg_is_dfs_in_secondary_list_for_freq(
|
||||
pm_ctx->pdev,
|
||||
pcl_channels[i])) {
|
||||
first_valid_non_dfs_5g_freq = pcl_channels[i];
|
||||
if (pref_band == REG_BAND_5G)
|
||||
break;
|
||||
} else if (!first_valid_dfs_5g_freq) {
|
||||
first_valid_dfs_5g_freq = pcl_channels[i];
|
||||
}
|
||||
}
|
||||
if (!first_valid_6g_freq &&
|
||||
wlan_reg_is_6ghz_chan_freq(pcl_channels[i])) {
|
||||
@@ -3576,15 +3582,18 @@ uint32_t policy_mgr_get_alternate_channel_for_sap(
|
||||
policy_mgr_restore_deleted_conn_info(psoc, &info, num_cxn_del);
|
||||
|
||||
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
||||
|
||||
if (pref_band == REG_BAND_6G) {
|
||||
if (first_valid_6g_freq)
|
||||
ch_freq = first_valid_6g_freq;
|
||||
else if (first_valid_5g_freq)
|
||||
ch_freq = first_valid_5g_freq;
|
||||
else if (first_valid_non_dfs_5g_freq)
|
||||
ch_freq = first_valid_non_dfs_5g_freq;
|
||||
else if (first_valid_dfs_5g_freq)
|
||||
ch_freq = first_valid_dfs_5g_freq;
|
||||
} else if (pref_band == REG_BAND_5G) {
|
||||
if (first_valid_5g_freq)
|
||||
ch_freq = first_valid_5g_freq;
|
||||
if (first_valid_non_dfs_5g_freq)
|
||||
ch_freq = first_valid_non_dfs_5g_freq;
|
||||
else if (first_valid_dfs_5g_freq)
|
||||
ch_freq = first_valid_dfs_5g_freq;
|
||||
}
|
||||
|
||||
return ch_freq;
|
||||
|
新增問題並參考
封鎖使用者