瀏覽代碼

qcacmn: Add new vendor event to notify fw pagefault

Introduce new event type to notify userspace about FW
pagefault. Use this new vendor subcommand to send
pagefault address and count of pagefault to userspace.

Change-Id: I330675b194a0f220cc627a0722494ba36a0def61
CRs-Fixed: 3713819
Vinod Kumar Pirla 1 年之前
父節點
當前提交
784c8b910d
共有 2 個文件被更改,包括 30 次插入2 次删除
  1. 26 1
      os_if/linux/qca_vendor.h
  2. 4 1
      os_if/linux/wlan_cfg80211.h

+ 26 - 1
os_if/linux/qca_vendor.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -850,6 +850,11 @@
  *	information will be set to target. Target will decide the final TX power
  *	based on this and chip specific power conformance test limits (CTL), and
  *	SAR limits.
+ *
+ * @QCA_NL80211_VENDOR_SUBCMD_FW_PAGE_FAULT_REPORT: Event indication from the
+ *      driver to user space which is carrying firmware page fault related
+ *      summary report. The attributes for this command are defined in
+ *      enum qca_wlan_vendor_attr_fw_page_fault_report.
  */
 
 enum qca_nl80211_vendor_subcmds {
@@ -1115,6 +1120,7 @@ enum qca_nl80211_vendor_subcmds {
 	QCA_NL80211_VENDOR_SUBCMD_TX_LATENCY = 233,
 	QCA_NL80211_VENDOR_SUBCMD_RECONFIG_REMOVE_COMPLETE_EVENT = 234,
 	QCA_NL80211_VENDOR_SUBCMD_REGULATORY_TPC_INFO = 237,
+	QCA_NL80211_VENDOR_SUBCMD_FW_PAGE_FAULT_REPORT = 238,
 };
 
 enum qca_wlan_vendor_tos {
@@ -1235,6 +1241,25 @@ enum qca_wlan_vendor_hang_reason {
 	QCA_WLAN_HANG_HOST_WAKEUP_REASON_PAGE_FAULT = 36,
 };
 
+/**
+ * enum qca_wlan_vendor_attr_fw_page_fault_report - Used by the vendor
+ * command %QCA_NL80211_VENDOR_SUBCMD_FW_PAGE_FAULT_REPORT.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_FW_PAGE_FAULT_REPORT_DATA: The binary blob data
+ * associated with the firmware page fault that is expected to contain the
+ * required dump to analyze frequent page faults.
+ * NLA_BINARY attribute, the maximum size is QDF_HANG_EVENT_DATA_SIZE
+ */
+enum qca_wlan_vendor_attr_fw_page_fault_report {
+	QCA_WLAN_VENDOR_ATTR_FW_PAGE_FAULT_REPORT_INVALID = 0,
+	QCA_WLAN_VENDOR_ATTR_FW_PAGE_FAULT_REPORT_DATA = 1,
+
+	/* keep last */
+	QCA_WLAN_VENDOR_ATTR_FW_PAGE_FAULT_REPORT_LAST,
+	QCA_WLAN_VENDOR_ATTR_FW_PAGE_FAULT_REPORT_MAX =
+	QCA_WLAN_VENDOR_ATTR_FW_PAGE_FAULT_REPORT_LAST - 1,
+};
+
 /**
  * enum qca_wlan_vendor_attr_hang - Used by the vendor command
  * QCA_NL80211_VENDOR_SUBCMD_HANG.

+ 4 - 1
os_if/linux/wlan_cfg80211.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -187,6 +187,8 @@
  *	latency stats
  * @QCA_NL80211_VENDOR_SUBCMD_RECONFIG_REMOVE_COMPLETE_EVENT_INDEX: ML Reconfig
  * remove complete event index
+ * @QCA_NL80211_VENDOR_SUBCMD_FW_PAGE_FAULT_REPORT_INDEX: Pagefault report
+ * event index
  */
 
 enum qca_nl80211_vendor_subcmds_index {
@@ -323,6 +325,7 @@ enum qca_nl80211_vendor_subcmds_index {
 	QCA_NL80211_VENDOR_SUBCMD_TX_LATENCY_INDEX,
 #endif
 	QCA_NL80211_VENDOR_SUBCMD_RECONFIG_REMOVE_COMPLETE_EVENT_INDEX,
+	QCA_NL80211_VENDOR_SUBCMD_FW_PAGE_FAULT_REPORT_INDEX,
 };
 
 #if !defined(SUPPORT_WDEV_CFG80211_VENDOR_EVENT_ALLOC) && \