From bc841052ca0cb4fc03c2dacc681a390202d6bf4d Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Mon, 28 Oct 2019 17:24:39 +0800 Subject: [PATCH] qcacld-3.0: Convert SME code legacy channel ID usage Modify the following 2 APIs' code and parameters to use frequency instead of channel ID: sme_get_operation_channel wlan_hdd_update_survey_info Change-Id: I90f05cc7fedd061bf08b47299d2fb6530c470136 CRs-Fixed: 2554149 --- core/hdd/src/wlan_hdd_stats.c | 5 ++--- core/sme/inc/sme_api.h | 2 +- core/sme/src/common/sme_api.c | 6 ++---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 621fc9002e49f..844be6aa247ef 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -4907,13 +4907,12 @@ static bool wlan_hdd_update_survey_info(struct wiphy *wiphy, { bool filled = false; int i, j = 0; - uint32_t channel = 0, opfreq; /* Initialization Required */ + uint32_t opfreq = 0; /* Initialization Required */ struct hdd_context *hdd_ctx; hdd_ctx = WLAN_HDD_GET_CTX(adapter); - sme_get_operation_channel(hdd_ctx->mac_handle, &channel, + sme_get_operation_channel(hdd_ctx->mac_handle, &opfreq, adapter->vdev_id); - opfreq = wlan_reg_chan_to_freq(hdd_ctx->pdev, channel); mutex_lock(&hdd_ctx->chan_info_lock); diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index d6888a0b96d21..05a6ed03672fd 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -737,7 +737,7 @@ QDF_STATUS sme_set_host_offload(mac_handle_t mac_handle, uint8_t sessionId, QDF_STATUS sme_set_keep_alive(mac_handle_t mac_handle, uint8_t sessionId, struct keep_alive_req *pRequest); QDF_STATUS sme_get_operation_channel(mac_handle_t mac_handle, - uint32_t *pChannel, + uint32_t *chan_freq, uint8_t sessionId); QDF_STATUS sme_register_mgmt_frame(mac_handle_t mac_handle, uint8_t sessionId, uint16_t frameType, uint8_t *matchData, diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index caecc1eba5173..1a3642d0aa7f4 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -4701,7 +4701,7 @@ QDF_STATUS sme_set_keep_alive(mac_handle_t mac_handle, uint8_t session_id, * QDF_STATUS_E_FAILURE */ QDF_STATUS sme_get_operation_channel(mac_handle_t mac_handle, - uint32_t *pChannel, + uint32_t *chan_freq, uint8_t sessionId) { struct mac_context *mac = MAC_CONTEXT(mac_handle); @@ -4718,9 +4718,7 @@ QDF_STATUS sme_get_operation_channel(mac_handle_t mac_handle, eCSR_BSS_TYPE_INFRA_AP) || (pSession->connectedProfile.BSSType == eCSR_BSS_TYPE_START_IBSS)) { - *pChannel = wlan_reg_freq_to_chan( - mac->pdev, - pSession->connectedProfile.op_freq); + *chan_freq = pSession->connectedProfile.op_freq; return QDF_STATUS_SUCCESS; } }