From 75873e96085ebfabfd3ecbbc5c37ac5d8a1fc81a Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sat, 30 Jun 2018 18:08:06 -0700 Subject: [PATCH] qcacld-3.0: Replace wmi_unified_nat_keepalive_enable() There are multiple issues with wmi_unified_nat_keepalive_enable(): 1) WMA global functions should have a wma_ prefix. 2) The function prototype indicates it should return int status, and the one caller, wma_add_sta_req_sta_mode(), is expecting that, but it actually returns QDF_STATUS. 3) The function is a very thin wrapper that calls the unified WMI API wmi_unified_nat_keepalive_en_cmd() and hence adds no real value. Rather than address these issues, just remove the function and update wma_add_sta_req_sta_mode() to directly call the unified WMI API wmi_unified_nat_keepalive_en_cmd(). Change-Id: I13a4140ba6343240bde51704af2921c001f66a21 CRs-Fixed: 2271552 --- core/wma/inc/wma_internal.h | 2 -- core/wma/src/wma_dev_if.c | 6 +++--- core/wma/src/wma_features.c | 16 ---------------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/core/wma/inc/wma_internal.h b/core/wma/inc/wma_internal.h index 62dfce311594..b620a879ad42 100644 --- a/core/wma/inc/wma_internal.h +++ b/core/wma/inc/wma_internal.h @@ -924,8 +924,6 @@ QDF_STATUS wma_unified_fw_profiling_cmd(wmi_unified_t wmi_handle, void wma_wow_tx_complete(void *wma); -int wmi_unified_nat_keepalive_enable(tp_wma_handle wma, uint8_t vdev_id); - int wma_unified_csa_offload_enable(tp_wma_handle wma, uint8_t vdev_id); #ifdef WLAN_FEATURE_NAN diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 9fd6b3cca4b5..b1fc673a3fab 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -5135,9 +5135,9 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params) } if (wmi_service_enabled(wma->wmi_handle, - wmi_service_filter_ipsec_natkeepalive)) { - if (wmi_unified_nat_keepalive_enable(wma, params->smesessionId) - < 0) { + wmi_service_filter_ipsec_natkeepalive)) { + if (wmi_unified_nat_keepalive_en_cmd(wma->wmi_handle, + params->smesessionId)) { WMA_LOGE("Unable to enable NAT keepalive for vdev_id:%d", params->smesessionId); } diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 8991ebaf236d..c1a67e449aa8 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -1186,22 +1186,6 @@ void wma_check_and_set_wake_timer(uint32_t time) WMA_LOGD("set key not in progress for any vdev"); } -/** - * wmi_unified_nat_keepalive_enable() - enable NAT keepalive filter - * @wma: wma handle - * @vdev_id: vdev id - * - * Return: 0 for success or error code - */ -int wmi_unified_nat_keepalive_enable(tp_wma_handle wma, uint8_t vdev_id) -{ - - if (wmi_unified_nat_keepalive_en_cmd(wma->wmi_handle, vdev_id)) - return QDF_STATUS_E_FAILURE; - - return QDF_STATUS_SUCCESS; -} - /** * wma_unified_csa_offload_enable() - sen CSA offload enable command * @wma: wma handle