فهرست منبع

qcacmn: Add support to enable/disable packetlog using iwpriv

Add support to enable/disable packetlog using
iwpriv wlan0 pktlog command.

CRs-Fixed: 970647
Change-Id: I4f7c64332e971591b7a08020a412e6f3979b718d
Nirav Shah 8 سال پیش
والد
کامیت
cb11756463
5فایلهای تغییر یافته به همراه10 افزوده شده و 6 حذف شده
  1. 2 1
      wmi/inc/wmi_unified_api.h
  2. 1 1
      wmi/inc/wmi_unified_priv.h
  3. 1 1
      wmi/inc/wmi_unified_tlv.h
  4. 3 2
      wmi/src/wmi_unified_api.c
  5. 3 1
      wmi/src/wmi_unified_tlv.c

+ 2 - 1
wmi/inc/wmi_unified_api.h

@@ -650,7 +650,8 @@ QDF_STATUS wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
 #ifndef WMI_NON_TLV_SUPPORT
 QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
 				   WMI_PKTLOG_EVENT pktlog_event,
-				   uint32_t cmd_id);
+				   uint32_t cmd_id,
+				   uint8_t user_triggered);
 #endif
 
 QDF_STATUS wmi_unified_add_wow_wakeup_event_cmd(void *wmi_hdl,

+ 1 - 1
wmi/inc/wmi_unified_priv.h

@@ -507,7 +507,7 @@ QDF_STATUS (*send_roam_scan_offload_ap_profile_cmd)(wmi_unified_t wmi_handle,
 
 QDF_STATUS (*send_pktlog_wmi_send_cmd)(wmi_unified_t wmi_handle,
 				   WMI_PKTLOG_EVENT pktlog_event,
-				   WMI_CMD_ID cmd_id);
+				   WMI_CMD_ID cmd_id, uint8_t user_triggered);
 #endif
 
 QDF_STATUS (*send_fw_profiling_cmd)(wmi_unified_t wmi_handle,

+ 1 - 1
wmi/inc/wmi_unified_tlv.h

@@ -379,7 +379,7 @@ send_dfs_phyerr_filter_offload_en_cmd_tlv(wmi_unified_t wmi_handle,
 
 QDF_STATUS send_pktlog_wmi_send_cmd_tlv(wmi_unified_t wmi_handle,
 				   WMI_PKTLOG_EVENT pktlog_event,
-				   WMI_CMD_ID cmd_id);
+				   WMI_CMD_ID cmd_id, uint8_t user_triggered);
 
 QDF_STATUS send_add_wow_wakeup_event_cmd_tlv(wmi_unified_t wmi_handle,
 					uint32_t vdev_id,

+ 3 - 2
wmi/src/wmi_unified_api.c

@@ -2312,13 +2312,14 @@ wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
 #ifndef WMI_NON_TLV_SUPPORT
 QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
 				   WMI_PKTLOG_EVENT pktlog_event,
-				   uint32_t cmd_id)
+				   uint32_t cmd_id,
+				   uint8_t user_triggered)
 {
 	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
 
 	if (wmi_handle->ops->send_pktlog_wmi_send_cmd)
 		return wmi_handle->ops->send_pktlog_wmi_send_cmd(wmi_handle,
-			    pktlog_event, cmd_id);
+			    pktlog_event, cmd_id, user_triggered);
 
 	return QDF_STATUS_E_FAILURE;
 }

+ 3 - 1
wmi/src/wmi_unified_tlv.c

@@ -7072,7 +7072,7 @@ send_dfs_phyerr_filter_offload_en_cmd_tlv(wmi_unified_t wmi_handle,
  */
 QDF_STATUS send_pktlog_wmi_send_cmd_tlv(wmi_unified_t wmi_handle,
 				   WMI_PKTLOG_EVENT pktlog_event,
-				   WMI_CMD_ID cmd_id)
+				   WMI_CMD_ID cmd_id, uint8_t user_triggered)
 {
 	WMI_PKTLOG_EVENT PKTLOG_EVENT;
 	WMI_CMD_ID CMD_ID;
@@ -7099,6 +7099,8 @@ QDF_STATUS send_pktlog_wmi_send_cmd_tlv(wmi_unified_t wmi_handle,
 		       WMITLV_GET_STRUCT_TLVLEN
 		       (wmi_pdev_pktlog_enable_cmd_fixed_param));
 		cmd->evlist = PKTLOG_EVENT;
+		cmd->enable = user_triggered ? WMI_PKTLOG_ENABLE_FORCE
+					: WMI_PKTLOG_ENABLE_AUTO;
 		cmd->pdev_id = WMI_PDEV_ID_SOC;
 		if (wmi_unified_cmd_send(wmi_handle, buf, len,
 					 WMI_PDEV_PKTLOG_ENABLE_CMDID)) {