qcacld-3.0: Send vdev param command to set pkt capture mode

Send vdev param command to FW for STA vdev to set the packet
capture mode. Send the command only if packet capture support
is enabled.

Change-Id: I014acfc5d97a2bf00831259b9811b3c5bc7610a1
CRs-Fixed: 2528554
此提交包含在:
Alok Kumar
2019-09-08 20:39:24 +05:30
提交者 nshrivas
父節點 9cb2c5c234
當前提交 286a65ed19
共有 2 個檔案被更改,包括 69 行新增0 行删除

查看文件

@@ -1118,6 +1118,9 @@ typedef struct {
qdf_mc_timer_t wma_fw_time_sync_timer; qdf_mc_timer_t wma_fw_time_sync_timer;
bool fw_therm_throt_support; bool fw_therm_throt_support;
bool enable_tx_compl_tsf64; bool enable_tx_compl_tsf64;
#ifdef WLAN_FEATURE_PKT_CAPTURE
bool is_pktcapture_enabled;
#endif
} t_wma_handle, *tp_wma_handle; } t_wma_handle, *tp_wma_handle;
/** /**

查看文件

@@ -60,6 +60,9 @@
#include <cdp_txrx_cmn.h> #include <cdp_txrx_cmn.h>
#include <cdp_txrx_misc.h> #include <cdp_txrx_misc.h>
#include <cdp_txrx_ctrl.h> #include <cdp_txrx_ctrl.h>
#ifdef WLAN_FEATURE_PKT_CAPTURE
#include <cdp_txrx_mon.h>
#endif /* WLAN_FEATURE_PKT_CAPTURE */
#include "wlan_policy_mgr_api.h" #include "wlan_policy_mgr_api.h"
#include "wma_nan_datapath.h" #include "wma_nan_datapath.h"
@@ -2096,6 +2099,66 @@ static void wma_clear_iface_key(struct wma_txrx_node *iface)
} }
#endif #endif
#ifdef WLAN_FEATURE_PKT_CAPTURE
/**
* wma_set_packet_capture_mode() - set packet capture mode
* @wma: wma handle
* @vdev_id: vdev id
* @val: mode to set
*
* Return: 0 on success, errno on failure
*/
static int wma_set_packet_capture_mode(
tp_wma_handle wma_handle,
uint8_t vdev_id,
uint8_t val)
{
int ret;
ret = wma_cli_set_command(vdev_id,
WMI_VDEV_PARAM_PACKET_CAPTURE_MODE,
val, VDEV_CMD);
return ret;
}
/**
* wma_handle_packet_capture_mode() - handle packet capture mode
* @wma_handle: wma handle
* @vdev_id: vdev id
* @pdev_id: pdev id
*
* Return: none
*/
static void wma_handle_packet_capture_mode(
tp_wma_handle wma_handle,
uint8_t vdev_id, uint8_t pdev_id)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
if (soc && cds_is_pktcapture_enabled() &&
wma_handle->is_pktcapture_enabled &&
(cds_get_pktcapture_mode() != PKT_CAPTURE_MODE_DISABLE)) {
uint8_t val = cds_get_pktcapture_mode();
status = wma_set_packet_capture_mode(
wma_handle, vdev_id, val);
if (status != QDF_STATUS_SUCCESS)
WMA_LOGE("failed to set capture mode (err=%d)",
status);
else if (status == QDF_STATUS_SUCCESS)
cdp_set_packet_capture_mode(soc, pdev_id, val);
}
}
#else
static void wma_handle_packet_capture_mode(
tp_wma_handle wma_handle,
uint8_t vdev_id, uint8_t pdev_id)
{
}
#endif
QDF_STATUS QDF_STATUS
__wma_handle_vdev_stop_rsp(struct vdev_stop_response *resp_event) __wma_handle_vdev_stop_rsp(struct vdev_stop_response *resp_event)
{ {
@@ -2485,6 +2548,9 @@ QDF_STATUS wma_post_vdev_create_setup(struct wlan_objmgr_vdev *vdev)
WMA_LOGE("failed to set sw retry threshold tx non aggr(status = %d)", WMA_LOGE("failed to set sw retry threshold tx non aggr(status = %d)",
status); status);
wma_handle_packet_capture_mode(wma_handle, vdev_id,
WMI_PDEV_ID_SOC);
status = wma_set_sw_retry_threshold_per_ac(wma_handle, vdev_id, status = wma_set_sw_retry_threshold_per_ac(wma_handle, vdev_id,
qos_aggr); qos_aggr);
if (QDF_IS_STATUS_ERROR(status)) if (QDF_IS_STATUS_ERROR(status))