mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
qcacld-3.0: Fix channel to freq conversion
wlan_reg_ch_to_freq accepts channel enum number. Use wlan_reg_chan_to_freq to do channel -> freq conversion. Change-Id: I19255e5a3564139191fa53f528264388fc263a83 CRs-Fixed: 2534927
This commit is contained in:
parent
953aaf29d2
commit
eaf41e382c
3 changed files with 11 additions and 7 deletions
|
|
@ -239,6 +239,7 @@ QDF_STATUS wlansap_pre_start_bss_acs_scan_callback(mac_handle_t mac_handle,
|
|||
eCsrScanStatus scan_status)
|
||||
{
|
||||
uint8_t oper_channel = SAP_CHANNEL_NOT_SELECTED;
|
||||
struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
|
||||
|
||||
host_log_acs_scan_done(acs_scan_done_status_str(scan_status),
|
||||
sessionid, scanid);
|
||||
|
|
@ -248,7 +249,8 @@ QDF_STATUS wlansap_pre_start_bss_acs_scan_callback(mac_handle_t mac_handle,
|
|||
scan_status);
|
||||
oper_channel =
|
||||
sap_select_default_oper_chan(sap_ctx->acs_cfg);
|
||||
sap_ctx->chan_freq = wlan_reg_ch_to_freq(oper_channel);
|
||||
sap_ctx->chan_freq = wlan_reg_chan_to_freq(mac_ctx->pdev,
|
||||
oper_channel);
|
||||
sap_ctx->acs_cfg->pri_ch = oper_channel;
|
||||
sap_config_acs_result(mac_handle, sap_ctx,
|
||||
sap_ctx->acs_cfg->ht_sec_ch);
|
||||
|
|
@ -268,7 +270,7 @@ QDF_STATUS wlansap_pre_start_bss_acs_scan_callback(mac_handle_t mac_handle,
|
|||
oper_channel = sap_select_default_oper_chan(sap_ctx->acs_cfg);
|
||||
}
|
||||
|
||||
sap_ctx->chan_freq = wlan_reg_ch_to_freq(oper_channel);
|
||||
sap_ctx->chan_freq = wlan_reg_chan_to_freq(mac_ctx->pdev, oper_channel);
|
||||
sap_ctx->acs_cfg->pri_ch = oper_channel;
|
||||
sap_config_acs_result(mac_handle, sap_ctx,
|
||||
sap_ctx->acs_cfg->ht_sec_ch);
|
||||
|
|
@ -350,7 +352,8 @@ wlansap_roam_process_ch_change_success(struct mac_context *mac_ctx,
|
|||
is_ch_dfs = true;
|
||||
}
|
||||
|
||||
sap_ctx->chan_freq = wlan_reg_ch_to_freq(target_channel);
|
||||
sap_ctx->chan_freq = wlan_reg_chan_to_freq(mac_ctx->pdev,
|
||||
target_channel);
|
||||
/* check if currently selected channel is a DFS channel */
|
||||
if (is_ch_dfs && sap_ctx->pre_cac_complete) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_MED, FL(
|
||||
|
|
|
|||
|
|
@ -2749,7 +2749,8 @@ uint8_t sap_select_channel(mac_handle_t mac_handle,
|
|||
} else if (best_ch_num == 14) {
|
||||
sap_ctx->acs_cfg->ht_sec_ch = 0;
|
||||
}
|
||||
sap_ctx->sec_ch_freq = wlan_reg_ch_to_freq(sap_ctx->acs_cfg->ht_sec_ch);
|
||||
sap_ctx->sec_ch_freq = wlan_reg_chan_to_freq(
|
||||
mac_ctx->pdev, sap_ctx->acs_cfg->ht_sec_ch);
|
||||
|
||||
sap_ch_sel_end:
|
||||
/* Free all the allocated memory */
|
||||
|
|
|
|||
|
|
@ -735,12 +735,12 @@ sap_validate_chan(struct sap_context *sap_context,
|
|||
if (sap_context->cc_switch_mode !=
|
||||
QDF_MCC_TO_SCC_SWITCH_DISABLE) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
|
||||
FL("check for overlap: chan:%d mode:%d"),
|
||||
sap_ch,
|
||||
FL("check for overlap: chan freq:%d mode:%d"),
|
||||
sap_context->chan_freq,
|
||||
sap_context->csr_roamProfile.phyMode);
|
||||
con_ch = sme_check_concurrent_channel_overlap(
|
||||
mac_handle,
|
||||
sap_ch,
|
||||
sap_context->chan_freq,
|
||||
sap_context->csr_roamProfile.phyMode,
|
||||
sap_context->cc_switch_mode);
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
|
||||
|
|
|
|||
Loading…
Reference in a new issue