Browse Source

qcacmn: Populate timestamp,duration,lsig_a stats

ppdu stats timestamp,duration,channel etc were not
updated and corrected the same

Also RSSI was incorrectly getting updated for
mcast frames also, fix both of the above issues

Change-Id: Id8446c6c0cfe8761f8c524fc7af0ff5bdd8b96aa
Anish Nataraj 7 years ago
parent
commit
57614da632
3 changed files with 6 additions and 4 deletions
  1. 1 1
      dp/inc/cdp_txrx_cmn_struct.h
  2. 1 1
      dp/wifi3.0/dp_htt.c
  3. 4 2
      dp/wifi3.0/dp_rx_mon_status.c

+ 1 - 1
dp/inc/cdp_txrx_cmn_struct.h

@@ -1036,7 +1036,7 @@ struct cdp_rx_indication_ppdu {
 	} u;
 	uint32_t lsig_a;
 	uint32_t rssi;
-	uint32_t timestamp;
+	uint64_t timestamp;
 	uint8_t channel;
 };
 

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

@@ -81,7 +81,6 @@ static void dp_tx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
 	DP_STATS_INC(peer, tx.sgi_count[ppdu->gi], num_msdu);
 	DP_STATS_INC(peer, tx.bw[ppdu->bw], num_msdu);
 	DP_STATS_INC(peer, tx.nss[ppdu->nss], num_msdu);
-	DP_STATS_UPD(peer, tx.last_ack_rssi, ack_rssi);
 	DP_STATS_INC(peer, tx.wme_ac_type[TID_TO_WME_AC(ppdu->tid)], num_msdu);
 	DP_STATS_INCC(peer, tx.stbc, num_msdu, ppdu->stbc);
 	DP_STATS_INCC(peer, tx.ldpc, num_msdu, ppdu->ldpc);
@@ -94,6 +93,7 @@ static void dp_tx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
 					+ ppdu->retry_bytes +
 					ppdu->failed_bytes));
 	} else {
+		DP_STATS_UPD(peer, tx.last_ack_rssi, ack_rssi);
 		DP_STATS_INC_PKT(peer, tx.ucast, num_msdu, (ppdu->success_bytes
 					+ ppdu->retry_bytes +
 					ppdu->failed_bytes));

+ 4 - 2
dp/wifi3.0/dp_rx_mon_status.c

@@ -83,18 +83,20 @@ dp_rx_populate_cdp_indication_ppdu(struct dp_soc *soc,
 	cdp_rx_ppdu->u.preamble = ppdu_info->rx_status.preamble_type;
 	cdp_rx_ppdu->u.ppdu_type = ppdu_info->rx_status.reception_type;
 	cdp_rx_ppdu->rssi = ppdu_info->rx_status.rssi_comb;
-	cdp_rx_ppdu->timestamp = ppdu_info->com_info.ppdu_timestamp;
-	cdp_rx_ppdu->channel = ppdu_info->rx_status.chan_freq;
+	cdp_rx_ppdu->timestamp = ppdu_info->rx_status.tsft;
+	cdp_rx_ppdu->channel = ppdu_info->rx_status.chan_num;
 	cdp_rx_ppdu->num_msdu = (cdp_rx_ppdu->tcp_msdu_count +
 			cdp_rx_ppdu->udp_msdu_count +
 			cdp_rx_ppdu->other_msdu_count);
 
+	cdp_rx_ppdu->num_mpdu = ppdu_info->com_info.mpdu_cnt_fcs_ok;
 	if (ppdu_info->com_info.mpdu_cnt_fcs_ok > 1)
 		cdp_rx_ppdu->is_ampdu = 1;
 	else
 		cdp_rx_ppdu->is_ampdu = 0;
 
 	cdp_rx_ppdu->tid = ppdu_info->rx_status.tid;
+	cdp_rx_ppdu->lsig_a = ppdu_info->rx_status.rate;
 }
 #else
 static inline void