qcacld-3.0: Use policy manager frequency APIs
For 6GHz support and to remove channel number ambiguity use policy manager APIs updated for frequency in other modules. This change covers following APIs: policy_mgr_get_chan_by_session_id policy_mgr_get_mcc_operating_channel policy_mgr_check_and_set_hw_mode_for_channel_switch policy_mgr_is_chan_ok_for_dnbs policy_mgr_is_safe_channel policy_mgr_valid_sap_conc_channel_check policy_mgr_disallow_mcc policy_mgr_add_sap_mandatory_chan policy_mgr_remove_sap_mandatory_chan policy_mgr_is_hwmode_set_for_given_chnl policy_mgr_is_valid_for_channel_switch policy_mgr_update_user_config_sap_chan policy_mgr_is_sap_restart_required_after_sta_disconnect policy_mgr_is_sta_sap_scc policy_mgr_nan_sap_scc_on_unsafe_ch_chk Change-Id: I682f8380d9dc41fc015d73f06b6e055d1d04ef97 CRs-fixed: 2545110
This commit is contained in:

committed by
nshrivas

vanhempi
282c4b6f66
commit
a0bbb518fc
@@ -253,8 +253,9 @@ wlansap_filter_unsafe_ch(struct wlan_objmgr_psoc *psoc,
|
||||
* the acs channel list before chosing one of them as a default channel
|
||||
*/
|
||||
for (i = 0; i < sap_ctx->acs_cfg->ch_list_count; i++) {
|
||||
if (!policy_mgr_is_safe_channel(psoc,
|
||||
sap_ctx->acs_cfg->ch_list[i])) {
|
||||
if (!policy_mgr_is_safe_channel(
|
||||
psoc, wlan_chan_to_freq(
|
||||
sap_ctx->acs_cfg->ch_list[i]))) {
|
||||
sap_debug("unsafe ch %d removed from acs list",
|
||||
sap_ctx->acs_cfg->ch_list[i]);
|
||||
continue;
|
||||
|
@@ -427,8 +427,9 @@ uint8_t sap_select_preferred_channel_from_channel_list(uint8_t best_chnl,
|
||||
/* Select the best channel from allowed list */
|
||||
for (i = 0; i < sap_ctx->acs_cfg->ch_list_count; i++) {
|
||||
if ((sap_ctx->acs_cfg->ch_list[i] == best_chnl) &&
|
||||
!(wlan_reg_is_dfs_ch(mac_ctx->pdev, best_chnl) &&
|
||||
policy_mgr_disallow_mcc(mac_ctx->psoc, best_chnl))) {
|
||||
!(wlan_reg_is_dfs_ch(mac_ctx->pdev, best_chnl) &&
|
||||
policy_mgr_disallow_mcc(
|
||||
mac_ctx->psoc, wlan_chan_to_freq(best_chnl)))) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP,
|
||||
QDF_TRACE_LEVEL_INFO,
|
||||
"Best channel so far is: %d",
|
||||
@@ -530,7 +531,8 @@ static bool sap_chan_sel_init(mac_handle_t mac_handle,
|
||||
}
|
||||
}
|
||||
|
||||
if (!policy_mgr_is_safe_channel(mac->psoc, channel))
|
||||
if (!policy_mgr_is_safe_channel(mac->psoc,
|
||||
wlan_chan_to_freq(channel)))
|
||||
chSafe = false;
|
||||
|
||||
/* OFDM rates are not supported on channel 14 */
|
||||
@@ -2555,9 +2557,10 @@ uint8_t sap_select_channel(mac_handle_t mac_handle,
|
||||
}
|
||||
|
||||
if (wlan_reg_is_dfs_ch(mac_ctx->pdev,
|
||||
spect_info->pSpectCh[count].chNum) &&
|
||||
policy_mgr_disallow_mcc(mac_ctx->psoc,
|
||||
spect_info->pSpectCh[count].chNum)) {
|
||||
spect_info->pSpectCh[count].chNum) &&
|
||||
policy_mgr_disallow_mcc(
|
||||
mac_ctx->psoc, wlan_chan_to_freq(
|
||||
spect_info->pSpectCh[count].chNum))) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP,
|
||||
QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"No DFS MCC");
|
||||
|
@@ -764,16 +764,19 @@ sap_validate_chan(struct sap_context *sap_context,
|
||||
con_ch);
|
||||
if (sap_context->cc_switch_mode !=
|
||||
QDF_MCC_TO_SCC_SWITCH_FORCE_PREFERRED_WITHOUT_DISCONNECTION) {
|
||||
uint32_t con_ch_freq;
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(
|
||||
policy_mgr_valid_sap_conc_channel_check(
|
||||
mac_ctx->psoc, &con_ch,
|
||||
sap_ch,
|
||||
mac_ctx->psoc, &con_ch_freq,
|
||||
sap_context->chan_freq,
|
||||
sap_context->sessionId))) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP,
|
||||
QDF_TRACE_LEVEL_WARN,
|
||||
FL("SAP can't start (no MCC)"));
|
||||
return QDF_STATUS_E_ABORTED;
|
||||
}
|
||||
con_ch = wlan_freq_to_chan(con_ch_freq);
|
||||
}
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
|
||||
FL("After check concurrency: con_ch:%d"),
|
||||
@@ -783,11 +786,11 @@ sap_validate_chan(struct sap_context *sap_context,
|
||||
mac_ctx->psoc);
|
||||
if (con_ch &&
|
||||
(policy_mgr_sta_sap_scc_on_lte_coex_chan(
|
||||
mac_ctx->psoc) ||
|
||||
policy_mgr_is_safe_channel(mac_ctx->psoc,
|
||||
con_ch)) &&
|
||||
(!wlan_reg_is_dfs_ch(mac_ctx->pdev, con_ch) ||
|
||||
sta_sap_scc_on_dfs_chan)) {
|
||||
mac_ctx->psoc) ||
|
||||
policy_mgr_is_safe_channel(
|
||||
mac_ctx->psoc, wlan_chan_to_freq(con_ch))) &&
|
||||
(!wlan_reg_is_dfs_ch(mac_ctx->pdev, con_ch) ||
|
||||
sta_sap_scc_on_dfs_chan)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP,
|
||||
QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Override ch freq %d to %d due to CC Intf",
|
||||
@@ -3349,7 +3352,7 @@ static QDF_STATUS sap_get_freq_list(struct sap_context *sap_ctx,
|
||||
if (wlan_reg_is_dfs_ch(mac_ctx->pdev,
|
||||
WLAN_REG_CH_NUM(loop_count)) &&
|
||||
(policy_mgr_disallow_mcc(mac_ctx->psoc,
|
||||
WLAN_REG_CH_NUM(loop_count)) ||
|
||||
WLAN_REG_CH_TO_FREQ(loop_count)) ||
|
||||
!dfs_master_enable))
|
||||
continue;
|
||||
|
||||
|
@@ -1402,7 +1402,8 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sap_ctx,
|
||||
}
|
||||
mac_handle = MAC_HANDLE(mac);
|
||||
|
||||
if (strict && !policy_mgr_is_safe_channel(mac->psoc, targetChannel)) {
|
||||
if (strict && !policy_mgr_is_safe_channel(
|
||||
mac->psoc, wlan_chan_to_freq(targetChannel))) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
"%u is unsafe channel", targetChannel);
|
||||
return QDF_STATUS_E_FAULT;
|
||||
@@ -1461,7 +1462,8 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sap_ctx,
|
||||
|
||||
hw_mode_status =
|
||||
policy_mgr_check_and_set_hw_mode_for_channel_switch(
|
||||
mac->psoc, sap_ctx->sessionId, targetChannel,
|
||||
mac->psoc, sap_ctx->sessionId,
|
||||
wlan_chan_to_freq(targetChannel),
|
||||
POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH);
|
||||
|
||||
/*
|
||||
|
Viittaa uudesa ongelmassa
Block a user