Browse Source

qcacld-3.0: Fix for supporting dump statistics

1. Avoid breaking compilation on legacy code
2. Rename dump stats macro options to CDP macros
   appropriately

Change-Id: If8594fad2145f29cb8f8f9f6bc3cd34633d0e9a4
CRs-Fixed: 2023386
Venkata Sharath Chandra Manchala 8 years ago
parent
commit
71032b649b
4 changed files with 36 additions and 36 deletions
  1. 20 20
      core/dp/txrx/ol_txrx.c
  2. 4 4
      core/hdd/src/wlan_hdd_hostapd.c
  3. 11 11
      core/hdd/src/wlan_hdd_wext.c
  4. 1 1
      core/wma/src/wma_data.c

+ 20 - 20
core/dp/txrx/ol_txrx.c

@@ -4389,13 +4389,13 @@ static void ol_txrx_ipa_uc_get_stat(struct cdp_pdev *ppdev)
 }
 #endif /* IPA_UC_OFFLOAD */
 
-/**
+/*
  * ol_txrx_display_stats() - Display OL TXRX display stats
  * @value: Module id for which stats needs to be displayed
  *
- * Return: None
+ * Return: status
  */
-static QDF_STATUS ol_txrx_display_stats(uint16_t value)
+static QDF_STATUS ol_txrx_display_stats(void *soc, uint16_t value)
 {
 	ol_txrx_pdev_handle pdev;
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
@@ -4408,34 +4408,34 @@ static QDF_STATUS ol_txrx_display_stats(uint16_t value)
 	}
 
 	switch (value) {
-	case WLAN_TXRX_STATS:
+	case CDP_TXRX_PATH_STATS:
 		ol_txrx_stats_display(pdev);
 		break;
-	case WLAN_TXRX_TSO_STATS:
+	case CDP_TXRX_TSO_STATS:
 		ol_txrx_stats_display_tso(pdev);
 		break;
-	case WLAN_DUMP_TX_FLOW_POOL_INFO:
+	case CDP_DUMP_TX_FLOW_POOL_INFO:
 		ol_tx_dump_flow_pool_info();
 		break;
-	case WLAN_TXRX_DESC_STATS:
+	case CDP_TXRX_DESC_STATS:
 		qdf_nbuf_tx_desc_count_display();
 		break;
 #ifdef CONFIG_HL_SUPPORT
-	case WLAN_SCHEDULER_STATS:
+	case CDP_SCHEDULER_STATS:
 		ol_tx_sched_cur_state_display(pdev);
 		ol_tx_sched_stats_display(pdev);
 		break;
-	case WLAN_TX_QUEUE_STATS:
+	case CDP_TX_QUEUE_STATS:
 		ol_tx_queue_log_display(pdev);
 		break;
 #ifdef FEATURE_HL_GROUP_CREDIT_FLOW_CONTROL
-	case WLAN_CREDIT_STATS:
+	case CDP_CREDIT_STATS:
 		ol_tx_dump_group_credit_stats(pdev);
 		break;
 #endif
 
 #ifdef DEBUG_HL_LOGGING
-	case WLAN_BUNDLE_STATS:
+	case CDP__BUNDLE_STATS:
 		htt_dump_bundle_stats(pdev->htt_pdev);
 		break;
 #endif
@@ -4466,28 +4466,28 @@ static void ol_txrx_clear_stats(uint16_t value)
 	}
 
 	switch (value) {
-	case WLAN_TXRX_STATS:
+	case CDP_TXRX_PATH_STATS:
 		ol_txrx_stats_clear(pdev);
 		break;
-	case WLAN_DUMP_TX_FLOW_POOL_INFO:
+	case CDP_DUMP_TX_FLOW_POOL_INFO:
 		ol_tx_clear_flow_pool_stats();
 		break;
-	case WLAN_TXRX_DESC_STATS:
+	case CDP_TXRX_DESC_STATS:
 		qdf_nbuf_tx_desc_count_clear();
 		break;
 #ifdef CONFIG_HL_SUPPORT
-	case WLAN_SCHEDULER_STATS:
+	case CDP_SCHEDULER_STATS:
 		ol_tx_sched_stats_clear(pdev);
 		break;
-	case WLAN_TX_QUEUE_STATS:
+	case CDP_TX_QUEUE_STATS:
 		ol_tx_queue_log_clear(pdev);
 		break;
 #ifdef FEATURE_HL_GROUP_CREDIT_FLOW_CONTROL
-	case WLAN_CREDIT_STATS:
+	case CDP_CREDIT_STATS:
 		ol_tx_clear_group_credit_stats(pdev);
 		break;
 #endif
-	case WLAN_BUNDLE_STATS:
+	case CDP_BUNDLE_STATS:
 		htt_clear_bundle_stats(pdev->htt_pdev);
 		break;
 #endif
@@ -5315,7 +5315,8 @@ static struct cdp_cmn_ops ol_ops_cmn = {
 	.txrx_data_tx_cb_set = ol_txrx_data_tx_cb_set,
 	.txrx_get_tx_pending = ol_txrx_get_tx_pending,
 	.flush_cache_rx_queue = ol_txrx_flush_cache_rx_queue,
-	.txrx_fw_stats_get = ol_txrx_fw_stats_get
+	.txrx_fw_stats_get = ol_txrx_fw_stats_get,
+	.display_stats = ol_txrx_display_stats,
 	/* TODO: Add other functions */
 };
 
@@ -5404,7 +5405,6 @@ static struct cdp_throttle_ops ol_ops_throttle = {
 };
 
 static struct cdp_mob_stats_ops ol_ops_mob_stats = {
-	.display_stats = ol_txrx_display_stats,
 	.clear_stats = ol_txrx_clear_stats,
 	.stats = ol_txrx_stats
 };

+ 4 - 4
core/hdd/src/wlan_hdd_hostapd.c

@@ -3306,19 +3306,19 @@ static __iw_softap_setparam(struct net_device *dev,
 		void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 		hdd_debug("QCASAP_CLEAR_STATS val %d", set_value);
 		switch (set_value) {
-		case WLAN_HDD_STATS:
+		case CDP_HDD_STATS:
 			memset(&pHostapdAdapter->stats, 0,
 						sizeof(pHostapdAdapter->stats));
 			memset(&pHostapdAdapter->hdd_stats, 0,
 					sizeof(pHostapdAdapter->hdd_stats));
 			break;
-		case WLAN_TXRX_HIST_STATS:
+		case CDP_TXRX_HIST_STATS:
 			wlan_hdd_clear_tx_rx_histogram(hdd_ctx);
 			break;
-		case WLAN_HDD_NETIF_OPER_HISTORY:
+		case CDP_HDD_NETIF_OPER_HISTORY:
 			wlan_hdd_clear_netif_queue_history(hdd_ctx);
 			break;
-		case WLAN_HIF_STATS:
+		case CDP_HIF_STATS:
 			hdd_clear_hif_stats();
 			break;
 		default:

+ 11 - 11
core/hdd/src/wlan_hdd_wext.c

@@ -3100,8 +3100,8 @@ void hdd_display_stats_help(void)
 	hdd_err("iwpriv wlan0 dumpStats [option] - dump statistics");
 	hdd_err("iwpriv wlan0 clearStats [option] - clear statistics");
 	hdd_err("options:");
-	hdd_err("  1 -- TXRX Layer statistics");
-	hdd_err("  2 -- Bandwidth compute timer stats");
+	hdd_err("  1 -- TXRX PATH statistics");
+	hdd_err("  2 -- TXRX HIST statistics");
 	hdd_err("  3 -- TSO statistics");
 	hdd_err("  4 -- Network queue statistics");
 	hdd_err("  5 -- Flow control statistics");
@@ -3125,18 +3125,18 @@ int hdd_wlan_dump_stats(hdd_adapter_t *adapter, int value)
 	hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 
 	switch (value) {
-	case WLAN_TXRX_HIST_STATS:
+	case CDP_TXRX_HIST_STATS:
 		wlan_hdd_display_tx_rx_histogram(hdd_ctx);
 		break;
-	case WLAN_HDD_NETIF_OPER_HISTORY:
+	case CDP_HDD_NETIF_OPER_HISTORY:
 		wlan_hdd_display_netif_queue_history(hdd_ctx);
 		break;
-	case WLAN_HIF_STATS:
+	case CDP_HIF_STATS:
 		hdd_display_hif_stats();
 		break;
-	case WLAN_LRO_STATS:
+	case CDP_LRO_STATS:
 		hdd_lro_display_stats(hdd_ctx);
-	case WLAN_NAPI_STATS:
+	case CDP_NAPI_STATS:
 		if (hdd_display_napi_stats()) {
 			hdd_err("error displaying napi stats");
 			ret = EFAULT;
@@ -8407,18 +8407,18 @@ static int __iw_setint_getnone(struct net_device *dev,
 	{
 		hdd_notice("WE_CLEAR_STATS val %d", set_value);
 		switch (set_value) {
-		case WLAN_HDD_STATS:
+		case CDP_HDD_STATS:
 			memset(&pAdapter->stats, 0, sizeof(pAdapter->stats));
 			memset(&pAdapter->hdd_stats, 0,
 					sizeof(pAdapter->hdd_stats));
 			break;
-		case WLAN_TXRX_HIST_STATS:
+		case CDP_TXRX_HIST_STATS:
 			wlan_hdd_clear_tx_rx_histogram(hdd_ctx);
 			break;
-		case WLAN_HDD_NETIF_OPER_HISTORY:
+		case CDP_HDD_NETIF_OPER_HISTORY:
 			wlan_hdd_clear_netif_queue_history(hdd_ctx);
 			break;
-		case WLAN_HIF_STATS:
+		case CDP_HIF_STATS:
 			hdd_clear_hif_stats();
 			break;
 		default:

+ 1 - 1
core/wma/src/wma_data.c

@@ -2852,7 +2852,7 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
 			 * WMA_TX_FRAME_COMPLETE_TIMEOUT (1 sec)
 			 */
 			/* display scheduler stats */
-			cdp_display_stats(soc, WLAN_SCHEDULER_STATS);
+			return cdp_display_stats(soc, CDP_SCHEDULER_STATS);
 		}
 	}