Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d33a637 authored by Yeshwanth Sriram Guntuka's avatar Yeshwanth Sriram Guntuka Committed by nshrivas
Browse files

qcacmn: Add support to track per peer no ack counts

Add support to track no ack count for different protocol
packets per peer.

Change-Id: I32f04eb3817c1b6c4806c8bb0230db3a71fadb5e
CRs-Fixed: 2643532
parent ffa6920a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -858,6 +858,7 @@ struct cdp_tx_stats {
	struct cdp_tx_pkt_info ru_loc[MAX_RU_LOCATIONS];

	uint32_t num_ppdu_cookie_valid;
	uint32_t no_ack_count[QDF_PROTO_SUBTYPE_MAX];
};

/* struct cdp_rx_stats - rx Level Stats
+18 −0
Original line number Diff line number Diff line
@@ -2897,6 +2897,23 @@ static void dp_tx_compute_delay(struct dp_vdev *vdev,
	vdev->prev_tx_enq_tstamp = timestamp_ingress;
}

#ifdef DISABLE_DP_STATS
static
inline void dp_update_no_ack_stats(qdf_nbuf_t nbuf, struct dp_peer *peer)
{
}
#else
static
inline void dp_update_no_ack_stats(qdf_nbuf_t nbuf, struct dp_peer *peer)
{
	enum qdf_proto_subtype subtype = QDF_PROTO_INVALID;

	DPTRACE(qdf_dp_track_noack_check(nbuf, &subtype));
	if (subtype != QDF_PROTO_INVALID)
		DP_STATS_INC(peer, tx.no_ack_count[subtype], 1);
}
#endif

/**
 * dp_tx_update_peer_stats() - Update peer stats from Tx completion indications
 *				per wbm ring
@@ -2983,6 +3000,7 @@ dp_tx_update_peer_stats(struct dp_tx_desc_s *tx_desc,
	}

	if (ts->status != HAL_TX_TQM_RR_FRAME_ACKED) {
		dp_update_no_ack_stats(tx_desc->nbuf, peer);
		return;
	}