qcacld-3.0: Fill the ppdu stats in tx status in pkt capture mode
Ppdu stats related to transmitted msdu are received from firmware and queued to a list. Remove the received ppdu stats from front of list and fill in tx status of current msdu. Change-Id: I764aa909497971010202ce3decb3380a732ce12c CRs-Fixed: 3004483
This commit is contained in:

committed by
Madan Koyyalamudi

parent
98bf0f00c3
commit
e850d08b1f
@@ -168,6 +168,7 @@ void pkt_capture_offload_deliver_indication_handler(
|
|||||||
* @dir: direction rx: 0 and tx: 1
|
* @dir: direction rx: 0 and tx: 1
|
||||||
* @status: tx status
|
* @status: tx status
|
||||||
* @tx_retry_cnt: tx retry count
|
* @tx_retry_cnt: tx retry count
|
||||||
|
* @ppdu_id: ppdu_id of msdu
|
||||||
*/
|
*/
|
||||||
struct pkt_capture_tx_hdr_elem_t {
|
struct pkt_capture_tx_hdr_elem_t {
|
||||||
uint32_t timestamp;
|
uint32_t timestamp;
|
||||||
@@ -186,6 +187,7 @@ struct pkt_capture_tx_hdr_elem_t {
|
|||||||
uint8_t tx_retry_cnt;
|
uint8_t tx_retry_cnt;
|
||||||
uint16_t framectrl;
|
uint16_t framectrl;
|
||||||
uint16_t seqno;
|
uint16_t seqno;
|
||||||
|
uint32_t ppdu_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
#ifdef WLAN_FEATURE_PKT_CAPTURE_V2
|
#ifdef WLAN_FEATURE_PKT_CAPTURE_V2
|
||||||
#include "dp_internal.h"
|
#include "dp_internal.h"
|
||||||
#include "cds_utils.h"
|
#include "cds_utils.h"
|
||||||
|
#include "htt_ppdu_stats.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RESERVE_BYTES (100)
|
#define RESERVE_BYTES (100)
|
||||||
@@ -262,8 +263,12 @@ pkt_capture_update_tx_status(
|
|||||||
struct pkt_capture_tx_hdr_elem_t *pktcapture_hdr)
|
struct pkt_capture_tx_hdr_elem_t *pktcapture_hdr)
|
||||||
{
|
{
|
||||||
struct connection_info info[MAX_NUMBER_OF_CONC_CONNECTIONS];
|
struct connection_info info[MAX_NUMBER_OF_CONC_CONNECTIONS];
|
||||||
|
struct pkt_capture_vdev_priv *vdev_priv;
|
||||||
struct wlan_objmgr_vdev *vdev = context;
|
struct wlan_objmgr_vdev *vdev = context;
|
||||||
|
htt_ppdu_stats_for_smu_tlv *smu;
|
||||||
struct wlan_objmgr_psoc *psoc;
|
struct wlan_objmgr_psoc *psoc;
|
||||||
|
struct pkt_capture_ppdu_stats_q_node *q_node;
|
||||||
|
qdf_list_node_t *node;
|
||||||
uint32_t conn_count;
|
uint32_t conn_count;
|
||||||
uint8_t vdev_id;
|
uint8_t vdev_id;
|
||||||
int i;
|
int i;
|
||||||
@@ -288,12 +293,41 @@ pkt_capture_update_tx_status(
|
|||||||
|
|
||||||
pkt_capture_tx_get_phy_info(pktcapture_hdr, tx_status);
|
pkt_capture_tx_get_phy_info(pktcapture_hdr, tx_status);
|
||||||
|
|
||||||
|
vdev_priv = pkt_capture_vdev_get_priv(vdev);
|
||||||
|
if (qdf_unlikely(!vdev_priv))
|
||||||
|
goto skip_ppdu_stats;
|
||||||
|
|
||||||
|
/* Remove the ppdu stats from front of list and fill it in tx_status */
|
||||||
|
qdf_spin_lock(&vdev_priv->lock_q);
|
||||||
|
if (QDF_STATUS_SUCCESS ==
|
||||||
|
qdf_list_remove_front(&vdev_priv->ppdu_stats_q, &node)) {
|
||||||
|
q_node = qdf_container_of(
|
||||||
|
node, struct pkt_capture_ppdu_stats_q_node, node);
|
||||||
|
smu = (htt_ppdu_stats_for_smu_tlv *)(q_node->buf);
|
||||||
|
tx_status->prev_ppdu_id = smu->ppdu_id;
|
||||||
|
tx_status->start_seq = smu->start_seq;
|
||||||
|
tx_status->tid = smu->tid_num;
|
||||||
|
|
||||||
|
if (smu->win_size == 8)
|
||||||
|
qdf_mem_copy(tx_status->ba_bitmap, smu->ba_bitmap,
|
||||||
|
8 * sizeof(uint32_t));
|
||||||
|
else if (smu->win_size == 2)
|
||||||
|
qdf_mem_copy(tx_status->ba_bitmap, smu->ba_bitmap,
|
||||||
|
2 * sizeof(uint32_t));
|
||||||
|
|
||||||
|
qdf_mem_free(q_node);
|
||||||
|
}
|
||||||
|
qdf_spin_unlock(&vdev_priv->lock_q);
|
||||||
|
|
||||||
|
skip_ppdu_stats:
|
||||||
tx_status->tsft = (u_int64_t)(pktcapture_hdr->timestamp);
|
tx_status->tsft = (u_int64_t)(pktcapture_hdr->timestamp);
|
||||||
tx_status->ant_signal_db = pktcapture_hdr->rssi_comb;
|
tx_status->ant_signal_db = pktcapture_hdr->rssi_comb;
|
||||||
tx_status->rssi_comb = pktcapture_hdr->rssi_comb;
|
tx_status->rssi_comb = pktcapture_hdr->rssi_comb;
|
||||||
tx_status->tx_status = pktcapture_hdr->status;
|
tx_status->tx_status = pktcapture_hdr->status;
|
||||||
tx_status->tx_retry_cnt = pktcapture_hdr->tx_retry_cnt;
|
tx_status->tx_retry_cnt = pktcapture_hdr->tx_retry_cnt;
|
||||||
|
tx_status->ppdu_id = pktcapture_hdr->ppdu_id;
|
||||||
tx_status->add_rtap_ext = true;
|
tx_status->add_rtap_ext = true;
|
||||||
|
tx_status->add_rtap_ext2 = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -277,6 +277,8 @@ void pkt_capture_callback(void *soc, enum WDI_EVENT event, void *log_data,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tx_comp_status.valid)
|
||||||
|
pktcapture_hdr.ppdu_id = tx_comp_status.ppdu_id;
|
||||||
pktcapture_hdr.timestamp = tx_comp_status.tsf;
|
pktcapture_hdr.timestamp = tx_comp_status.tsf;
|
||||||
pktcapture_hdr.preamble = tx_comp_status.pkt_type;
|
pktcapture_hdr.preamble = tx_comp_status.pkt_type;
|
||||||
pktcapture_hdr.mcs = tx_comp_status.mcs;
|
pktcapture_hdr.mcs = tx_comp_status.mcs;
|
||||||
|
Reference in New Issue
Block a user