瀏覽代碼

qcacmn: Add mpdu tx retries stats

Customer reported their HLOS LTE-WLAN transition algo sometimes go wrong
for wrong low layer stats, Txretry delta is bigger than Txtotal delta.
Txretry unit is msdu while Txtotal unit is mpdu.

Add vdev/peer stats for mpdu number of successfully transmitted after
more than one retransmission attempt, to align mpdu tx_packets, tx_failed.

CRs-Fixed: 3099490
Change-Id: Id4b9d8fd81af4bf0c141dad481bfd2b3f6c1db2a
Jianmin Zhu 3 年之前
父節點
當前提交
326f1015bc
共有 3 個文件被更改,包括 6 次插入1 次删除
  1. 2 0
      dp/inc/cdp_txrx_stats_struct.h
  2. 1 0
      dp/wifi3.0/dp_stats.c
  3. 3 1
      dp/wifi3.0/dp_tx.c

+ 2 - 0
dp/inc/cdp_txrx_stats_struct.h

@@ -1166,6 +1166,7 @@ struct protocol_trace_count {
  * @stbc: Packets in STBC
  * @ldpc: Packets in LDPC
  * @retries: Packet retries
+ * @retries_mpdu: mpdu number of successfully transmitted after retries
  * @non_amsdu_cnt: Number of MSDUs with no MSDU level aggregation
  * @amsdu_cnt: Number of MSDUs part of AMSDU
  * @tx_rate: Tx Rate
@@ -1262,6 +1263,7 @@ struct cdp_tx_stats {
 	uint32_t stbc;
 	uint32_t ldpc;
 	uint32_t retries;
+	uint32_t retries_mpdu;
 	uint32_t non_amsdu_cnt;
 	uint32_t amsdu_cnt;
 	uint32_t tx_rate;

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

@@ -7260,6 +7260,7 @@ void dp_update_vdev_stats(struct dp_soc *soc,
 	tgtobj->tx.ldpc += srcobj->stats.tx.ldpc;
 	tgtobj->tx.pream_punct_cnt += srcobj->stats.tx.pream_punct_cnt;
 	tgtobj->tx.retries += srcobj->stats.tx.retries;
+	tgtobj->tx.retries_mpdu += srcobj->stats.tx.retries_mpdu;
 	tgtobj->tx.non_amsdu_cnt += srcobj->stats.tx.non_amsdu_cnt;
 	tgtobj->tx.amsdu_cnt += srcobj->stats.tx.amsdu_cnt;
 	tgtobj->tx.non_ampdu_cnt += srcobj->stats.tx.non_ampdu_cnt;

+ 3 - 1
dp/wifi3.0/dp_tx.c

@@ -3783,10 +3783,12 @@ dp_tx_update_peer_stats(struct dp_tx_desc_s *tx_desc,
 	DP_STATS_INCC(peer, tx.stbc, 1, ts->stbc);
 	DP_STATS_INCC(peer, tx.ldpc, 1, ts->ldpc);
 	DP_STATS_INCC(peer, tx.retries, 1, ts->transmit_cnt > 1);
-	if (ts->first_msdu)
+	if (ts->first_msdu) {
+		DP_STATS_INCC(peer, tx.retries_mpdu, 1, ts->transmit_cnt > 1);
 		DP_STATS_INCC(peer, tx.mpdu_success_with_retries,
 			      qdf_do_div(ts->transmit_cnt, DP_RETRY_COUNT),
 			      ts->transmit_cnt > DP_RETRY_COUNT);
+	}
 	peer->stats.tx.last_tx_ts = qdf_system_ticks();
 }