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
This commit is contained in:
Jeff Johnson 2018-06-30 18:08:06 -07:00 • committed by nshrivas
commit 75873e9608
3 changed files with 3 additions and 21 deletions

View file

@ -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

View file

@ -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);
}

View file

@ -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