Bläddra i källkod

qcacmn: Handle AP and STA Tx stats separately

AP and STA stats need to be handled separately.

Change-Id: I105856d6d4ee39a116966eb3ff47775b54f08ef4
Chaitanya Kiran Godavarthi 5 år sedan
förälder
incheckning
8c880d3fd2
3 ändrade filer med 15 tillägg och 8 borttagningar
  1. 9 1
      dp/wifi3.0/dp_htt.c
  2. 1 1
      dp/wifi3.0/dp_stats.c
  3. 5 6
      dp/wifi3.0/dp_tx.c

+ 9 - 1
dp/wifi3.0/dp_htt.c

@@ -110,7 +110,15 @@ dp_tx_rate_stats_update(struct dp_peer *peer,
 	DP_STATS_UPD(peer, tx.rnd_avg_tx_rate, ppdu_tx_rate);
 
 	if (peer->vdev) {
-		if (peer->bss_peer) {
+		/*
+		 * In STA mode:
+		 *	We get ucast stats as BSS peer stats.
+		 *
+		 * In AP mode:
+		 *	We get mcast stats as BSS peer stats.
+		 *	We get ucast stats as assoc peer stats.
+		 */
+		if (peer->vdev->opmode == wlan_op_mode_ap && peer->bss_peer) {
 			peer->vdev->stats.tx.mcast_last_tx_rate = ratekbps;
 			peer->vdev->stats.tx.mcast_last_tx_rate_mcs = ppdu->mcs;
 		} else {

+ 1 - 1
dp/wifi3.0/dp_stats.c

@@ -5260,7 +5260,7 @@ dp_print_pdev_tx_stats(struct dp_pdev *pdev)
 		       pdev->stats.tx.dropped.age_out);
 	DP_PRINT_STATS("	headroom insufficient = %d",
 		       pdev->stats.tx_i.dropped.headroom_insufficient);
-	DP_PRINT_STATS("	Multicast:");
+	DP_PRINT_STATS("Multicast:");
 	DP_PRINT_STATS("	Packets: %u",
 		       pdev->stats.tx.mcast.num);
 	DP_PRINT_STATS("	Bytes: %llu",

+ 5 - 6
dp/wifi3.0/dp_tx.c

@@ -3090,12 +3090,7 @@ void dp_tx_comp_process_tx_status(struct dp_tx_desc_s *tx_desc,
 		goto out;
 	}
 
-	if (qdf_likely(!peer->bss_peer)) {
-		DP_STATS_INC_PKT(peer, tx.ucast, 1, length);
-
-		if (ts->status == HAL_TX_TQM_RR_FRAME_ACKED)
-			DP_STATS_INC_PKT(peer, tx.tx_success, 1, length);
-	} else {
+	if (qdf_unlikely(peer->bss_peer && vdev->opmode == wlan_op_mode_ap)) {
 		if (ts->status != HAL_TX_TQM_RR_REM_CMD_REM) {
 			DP_STATS_INC_PKT(peer, tx.mcast, 1, length);
 
@@ -3105,6 +3100,10 @@ void dp_tx_comp_process_tx_status(struct dp_tx_desc_s *tx_desc,
 				DP_STATS_INC_PKT(peer, tx.bcast, 1, length);
 			}
 		}
+	} else {
+		DP_STATS_INC_PKT(peer, tx.ucast, 1, length);
+		if (ts->status == HAL_TX_TQM_RR_FRAME_ACKED)
+			DP_STATS_INC_PKT(peer, tx.tx_success, 1, length);
 	}
 
 	dp_tx_update_peer_stats(tx_desc, ts, peer, ring_id);