qcacmn: Implement the commands that cover APF 3.0 requirements

Android Packet Filter 3.0 requires the framework to be able to
read and write into the APF work memory in the Firmware. It
also requires to be able to enable or disable the interpreter.
New WMI commands are defined for read/write/enable/disable
operations.

Complete the implementation of these new commands.

Change-Id: I852d61eb213d9ae530e8a71069144ef35816f5b8
CRs-Fixed: 2184971
This commit is contained in:
Nachiket Kukade
2018-05-25 14:52:55 +05:30
committed by nshrivas
parent eaf8a8bd28
commit e06beaa8f4
3 changed files with 228 additions and 17 deletions

View File

@@ -3157,24 +3157,67 @@ QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl,
}
#endif
#ifdef FEATURE_WLAN_APF
QDF_STATUS
wmi_unified_set_active_apf_mode_cmd(void *wmi_hdl, uint8_t vdev_id,
wmi_unified_set_active_apf_mode_cmd(wmi_unified_t wmi, uint8_t vdev_id,
enum wmi_host_active_apf_mode ucast_mode,
enum wmi_host_active_apf_mode
mcast_bcast_mode)
{
wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
if (!wmi->ops->send_set_active_apf_mode_cmd) {
WMI_LOGD("send_set_active_apf_mode_cmd op is NULL");
return QDF_STATUS_E_FAILURE;
}
return wmi->ops->send_set_active_apf_mode_cmd(wmi, vdev_id,
ucast_mode,
mcast_bcast_mode);
if (wmi->ops->send_set_active_apf_mode_cmd)
return wmi->ops->send_set_active_apf_mode_cmd(wmi, vdev_id,
ucast_mode,
mcast_bcast_mode);
return QDF_STATUS_E_FAILURE;
}
QDF_STATUS
wmi_unified_send_apf_enable_cmd(wmi_unified_t wmi,
uint32_t vdev_id, bool enable)
{
if (wmi->ops->send_apf_enable_cmd)
return wmi->ops->send_apf_enable_cmd(wmi, vdev_id, enable);
return QDF_STATUS_E_FAILURE;
}
QDF_STATUS
wmi_unified_send_apf_write_work_memory_cmd(wmi_unified_t wmi,
struct wmi_apf_write_memory_params
*write_params)
{
if (wmi->ops->send_apf_write_work_memory_cmd)
return wmi->ops->send_apf_write_work_memory_cmd(wmi,
write_params);
return QDF_STATUS_E_FAILURE;
}
QDF_STATUS
wmi_unified_send_apf_read_work_memory_cmd(wmi_unified_t wmi,
struct wmi_apf_read_memory_params
*read_params)
{
if (wmi->ops->send_apf_read_work_memory_cmd)
return wmi->ops->send_apf_read_work_memory_cmd(wmi,
read_params);
return QDF_STATUS_E_FAILURE;
}
QDF_STATUS
wmi_extract_apf_read_memory_resp_event(wmi_unified_t wmi, void *evt_buf,
struct wmi_apf_read_memory_resp_event_params
*read_mem_evt)
{
if (wmi->ops->extract_apf_read_memory_resp_event)
return wmi->ops->extract_apf_read_memory_resp_event(wmi,
evt_buf,
read_mem_evt);
return QDF_STATUS_E_FAILURE;
}
#endif /* FEATURE_WLAN_APF */
/**
* wmi_unified_pdev_get_tpc_config_cmd_send() - WMI get tpc config function
* @param wmi_handle : handle to WMI.