ソースを参照

qcacld-3.0: Add per CPU interrupt statistics

Add per CPU per copy engine interrupt statistics.

Change-Id: I397733ca9c46274f9b5c0026f032e3345100a98d
CRs-Fixed: 1017437
Nirav Shah 9 年 前
コミット
bf1b033062

+ 1 - 0
core/dp/ol/inc/ol_txrx_ctrl_api.h

@@ -68,6 +68,7 @@
 #define WLAN_HDD_NETIF_OPER_HISTORY 4
 #define WLAN_DUMP_TX_FLOW_POOL_INFO 5
 #define WLAN_TXRX_DESC_STATS  6
+#define WLAN_HIF_STATS  7
 #define WLAN_SCHEDULER_STATS        21
 #define WLAN_TX_QUEUE_STATS         22
 #define WLAN_BUNDLE_STATS           23

+ 1 - 0
core/hdd/inc/wlan_hdd_main.h

@@ -1633,6 +1633,7 @@ void hdd_update_config(hdd_context_t *hdd_ctx);
 QDF_STATUS hdd_chan_change_notify(hdd_adapter_t *adapter,
 		struct net_device *dev,
 		struct hdd_chan_change_params chan_change);
+
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
 QDF_STATUS hdd_register_for_sap_restart_with_channel_switch(void);
 #else

+ 3 - 0
core/hdd/src/wlan_hdd_hostapd.c

@@ -2935,6 +2935,9 @@ static __iw_softap_setparam(struct net_device *dev,
 		case WLAN_HDD_NETIF_OPER_HISTORY:
 			wlan_hdd_clear_netif_queue_history(hdd_ctx);
 			break;
+		case WLAN_HIF_STATS:
+			hdd_clear_hif_stats();
+			break;
 		default:
 			ol_txrx_clear_stats(set_value);
 		}

+ 30 - 0
core/hdd/src/wlan_hdd_stats.c

@@ -31,6 +31,7 @@
 #include "cds_sched.h"
 #include "wlan_hdd_trace.h"
 #include "wlan_hdd_lpass.h"
+#include "hif.h"
 
 #ifdef WLAN_FEATURE_LINK_LAYER_STATS
 
@@ -2321,3 +2322,32 @@ inline void hdd_init_ll_stats_ctx(void)
 
 	return;
 }
+
+/**
+ * hdd_display_hif_stats() - display hif stats
+ *
+ * Return: none
+ *
+ */
+void hdd_display_hif_stats(void)
+{
+	void *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
+
+	if (!hif_ctx)
+		return;
+	hif_display_stats(hif_ctx);
+}
+
+/**
+ * hdd_clear_hif_stats() - clear hif stats
+ *
+ * Return: none
+ */
+void hdd_clear_hif_stats(void)
+{
+	void *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
+
+	if (!hif_ctx)
+		return;
+	hif_clear_stats(hif_ctx);
+}

+ 5 - 1
core/hdd/src/wlan_hdd_stats.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -203,5 +203,9 @@ struct net_device_stats *hdd_get_stats(struct net_device *dev);
 int wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
 				  struct net_device *dev,
 				  int idx, struct survey_info *survey);
+
+void hdd_display_hif_stats(void);
+void hdd_clear_hif_stats(void);
+
 #endif /* end #if !defined(WLAN_HDD_STATS_H) */
 

+ 7 - 0
core/hdd/src/wlan_hdd_wext.c

@@ -88,6 +88,7 @@
 #include "wlan_hdd_napi.h"
 #include "cdp_txrx_flow_ctrl_legacy.h"
 #include "wlan_hdd_nan_datapath.h"
+#include "wlan_hdd_stats.h"
 
 #define HDD_FINISH_ULA_TIME_OUT         800
 #define HDD_SET_MCBC_FILTERS_TO_FW      1
@@ -705,6 +706,9 @@ void hdd_wlan_dump_stats(hdd_adapter_t *adapter, int value)
 	case WLAN_HDD_NETIF_OPER_HISTORY:
 		wlan_hdd_display_netif_queue_history(hdd_ctx);
 		break;
+	case WLAN_HIF_STATS:
+		hdd_display_hif_stats();
+		break;
 	default:
 		ol_txrx_display_stats(value);
 		break;
@@ -5812,6 +5816,9 @@ static int __iw_setint_getnone(struct net_device *dev,
 		case WLAN_HDD_NETIF_OPER_HISTORY:
 			wlan_hdd_clear_netif_queue_history(hdd_ctx);
 			break;
+		case WLAN_HIF_STATS:
+			hdd_clear_hif_stats();
+			break;
 		default:
 			ol_txrx_clear_stats(set_value);
 		}