qcacmn: tx capture update bar frames
as we are overriding bar ppdu information, we need bar start/end timestamp and duration. added resp_type, mprot_type, rts_success and rts_failure in cdp completion user. Change-Id: I53c215e948fad8d079e1d4c40ec07d34aff1fefe
This commit is contained in:
@@ -1433,6 +1433,10 @@ struct cdp_tx_completion_ppdu_user {
|
||||
* @mcs: MCS index
|
||||
* @preamble: preamble
|
||||
* @gi: guard interval 800/400/1600/3200 ns
|
||||
* @resp_type: response type
|
||||
* @mprot_type: medium protection type
|
||||
* @rts_success: rts success
|
||||
* @rts failure: rts failure
|
||||
* @channel: frequency
|
||||
* @channel_num: channel number
|
||||
* @ack_rssi: ack rssi
|
||||
@@ -1445,6 +1449,9 @@ struct cdp_tx_completion_ppdu_user {
|
||||
* @ba_start_seq: Block Ack sequence number
|
||||
* @ba_bitmap: Block Ack bitmap
|
||||
* @ppdu_cookie: 16-bit ppdu_cookie
|
||||
* @long_retries: long retries
|
||||
* @short_retries: short retries
|
||||
* @completion_status: completion status - OK/Filter/Abort/Timeout
|
||||
*/
|
||||
struct cdp_tx_indication_mpdu_info {
|
||||
uint32_t ppdu_id;
|
||||
@@ -1475,6 +1482,13 @@ struct cdp_tx_indication_mpdu_info {
|
||||
uint32_t ba_start_seq;
|
||||
uint32_t ba_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS];
|
||||
uint16_t ppdu_cookie;
|
||||
uint16_t long_retries:4,
|
||||
short_retries:4,
|
||||
completion_status:8;
|
||||
uint16_t resp_type:4,
|
||||
mprot_type:3,
|
||||
rts_success:1,
|
||||
rts_failure:1;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1499,8 +1513,14 @@ struct cdp_tx_indication_info {
|
||||
* @num_mpdu: Number of MPDUs in PPDU
|
||||
* @num_msdu: Number of MSDUs in PPDU
|
||||
* @frame_type: frame SU or MU
|
||||
* @htt_frame_type: frame type from htt
|
||||
* @frame_ctrl: frame control of 80211 header
|
||||
* @channel: Channel informartion
|
||||
* @resp_type: response type
|
||||
* @mprot_type: medium protection type
|
||||
* @rts_success: rts success
|
||||
* @rts failure: rts failure
|
||||
* @phymode: phy mode
|
||||
* @ack_rssi: RSSI value of last ack packet (units=dB above noise floor)
|
||||
* @tx_duration: PPDU airtime
|
||||
* @ppdu_start_timestamp: TSF at PPDU start
|
||||
@@ -1510,6 +1530,10 @@ struct cdp_tx_indication_info {
|
||||
* @user: per-User stats (array of per-user structures)
|
||||
* @mpdu_q: queue of mpdu in a ppdu
|
||||
* @mpdus: MPDU list based on enqueue sequence bitmap
|
||||
* @bar_ppdu_id: BAR ppdu_id
|
||||
* @bar_tx_duration: BAR tx duration
|
||||
* @bar_ppdu_start_timestamp: BAR start timestamp
|
||||
* @bar_ppdu_end_timestamp: BAR end timestamp
|
||||
*/
|
||||
struct cdp_tx_completion_ppdu {
|
||||
uint32_t ppdu_id;
|
||||
@@ -1522,8 +1546,13 @@ struct cdp_tx_completion_ppdu {
|
||||
uint32_t num_mpdu:9,
|
||||
num_msdu:16;
|
||||
uint16_t frame_type;
|
||||
uint16_t htt_frame_type;
|
||||
uint16_t frame_ctrl;
|
||||
uint16_t channel;
|
||||
uint16_t resp_type:4,
|
||||
mprot_type:3,
|
||||
rts_success:1,
|
||||
rts_failure:1;
|
||||
uint16_t phy_mode;
|
||||
uint32_t ack_rssi;
|
||||
uint32_t tx_duration;
|
||||
@@ -1534,6 +1563,10 @@ struct cdp_tx_completion_ppdu {
|
||||
struct cdp_tx_completion_ppdu_user user[CDP_MU_MAX_USERS];
|
||||
qdf_nbuf_queue_t mpdu_q;
|
||||
qdf_nbuf_t *mpdus;
|
||||
uint32_t bar_ppdu_id;
|
||||
uint32_t bar_tx_duration;
|
||||
uint32_t bar_ppdu_start_timestamp;
|
||||
uint32_t bar_ppdu_end_timestamp;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -2054,6 +2054,7 @@ static void dp_process_ppdu_stats_common_tlv(struct dp_pdev *pdev,
|
||||
HTT_PPDU_STATS_COMMON_TLV_NUM_USERS_GET(*tag_buf);
|
||||
tag_buf++;
|
||||
frame_type = HTT_PPDU_STATS_COMMON_TLV_FRM_TYPE_GET(*tag_buf);
|
||||
ppdu_desc->htt_frame_type = frame_type;
|
||||
|
||||
frame_ctrl = ppdu_desc->frame_ctrl;
|
||||
|
||||
@@ -2072,6 +2073,7 @@ static void dp_process_ppdu_stats_common_tlv(struct dp_pdev *pdev,
|
||||
case HTT_STATS_FTYPE_SGEN_MU_BAR:
|
||||
case HTT_STATS_FTYPE_SGEN_BAR:
|
||||
ppdu_desc->frame_type = CDP_PPDU_FTYPE_BAR;
|
||||
ppdu_desc->bar_ppdu_id = ppdu_info->ppdu_id;
|
||||
break;
|
||||
default:
|
||||
ppdu_desc->frame_type = CDP_PPDU_FTYPE_CTRL;
|
||||
@@ -2085,6 +2087,11 @@ static void dp_process_ppdu_stats_common_tlv(struct dp_pdev *pdev,
|
||||
|
||||
ppdu_desc->ppdu_end_timestamp = ppdu_desc->ppdu_start_timestamp +
|
||||
ppdu_desc->tx_duration;
|
||||
|
||||
ppdu_desc->bar_ppdu_start_timestamp = ppdu_desc->ppdu_start_timestamp;
|
||||
ppdu_desc->bar_ppdu_end_timestamp = ppdu_desc->ppdu_end_timestamp;
|
||||
ppdu_desc->bar_tx_duration = ppdu_desc->tx_duration;
|
||||
|
||||
/* Ack time stamp is same as end time stamp*/
|
||||
ppdu_desc->ack_timestamp = ppdu_desc->ppdu_end_timestamp;
|
||||
|
||||
@@ -2118,6 +2125,8 @@ static void dp_process_ppdu_stats_user_common_tlv(
|
||||
struct cdp_tx_completion_ppdu *ppdu_desc;
|
||||
struct cdp_tx_completion_ppdu_user *ppdu_user_desc;
|
||||
uint8_t curr_user_index = 0;
|
||||
struct dp_peer *peer;
|
||||
struct dp_vdev *vdev;
|
||||
|
||||
ppdu_desc =
|
||||
(struct cdp_tx_completion_ppdu *)qdf_nbuf_data(ppdu_info->nbuf);
|
||||
@@ -2133,9 +2142,20 @@ static void dp_process_ppdu_stats_user_common_tlv(
|
||||
if (peer_id == DP_SCAN_PEER_ID) {
|
||||
ppdu_desc->vdev_id =
|
||||
HTT_PPDU_STATS_USER_COMMON_TLV_VAP_ID_GET(*tag_buf);
|
||||
} else {
|
||||
if (!dp_peer_find_by_id_valid(pdev->soc, peer_id))
|
||||
vdev =
|
||||
dp_get_vdev_from_soc_vdev_id_wifi3(pdev->soc,
|
||||
ppdu_desc->vdev_id);
|
||||
if (!vdev)
|
||||
return;
|
||||
qdf_mem_copy(ppdu_user_desc->mac_addr, vdev->mac_addr.raw,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
} else {
|
||||
peer = dp_peer_find_by_id(pdev->soc, peer_id);
|
||||
if (!peer)
|
||||
return;
|
||||
qdf_mem_copy(ppdu_user_desc->mac_addr,
|
||||
peer->mac_addr.raw, QDF_MAC_ADDR_SIZE);
|
||||
dp_peer_unref_del_find_by_id(peer);
|
||||
}
|
||||
|
||||
ppdu_user_desc->peer_id = peer_id;
|
||||
@@ -2212,14 +2232,10 @@ static void dp_process_ppdu_stats_user_rate_tlv(struct dp_pdev *pdev,
|
||||
ppdu_desc->vdev_id);
|
||||
if (!vdev)
|
||||
return;
|
||||
qdf_mem_copy(ppdu_user_desc->mac_addr, vdev->mac_addr.raw,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
} else {
|
||||
peer = dp_peer_find_by_id(pdev->soc, peer_id);
|
||||
if (!peer)
|
||||
return;
|
||||
qdf_mem_copy(ppdu_user_desc->mac_addr,
|
||||
peer->mac_addr.raw, QDF_MAC_ADDR_SIZE);
|
||||
dp_peer_unref_del_find_by_id(peer);
|
||||
}
|
||||
|
||||
@@ -2439,6 +2455,15 @@ static void dp_process_ppdu_stats_user_cmpltn_common_tlv(
|
||||
HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_AMPDU_GET(*tag_buf);
|
||||
ppdu_info->is_ampdu = ppdu_user_desc->is_ampdu;
|
||||
|
||||
ppdu_desc->resp_type =
|
||||
HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_RESP_TYPE_GET(*tag_buf);
|
||||
ppdu_desc->mprot_type =
|
||||
HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPROT_TYPE_GET(*tag_buf);
|
||||
ppdu_desc->rts_success =
|
||||
HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_RTS_SUCCESS_GET(*tag_buf);
|
||||
ppdu_desc->rts_failure =
|
||||
HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_RTS_FAILURE_GET(*tag_buf);
|
||||
|
||||
/*
|
||||
* increase successful mpdu counter from
|
||||
* htt_ppdu_stats_user_cmpltn_common_tlv
|
||||
@@ -3322,6 +3347,9 @@ static struct ppdu_info *dp_htt_process_tlv(struct dp_pdev *pdev,
|
||||
if (peer->last_delayed_ba) {
|
||||
dp_peer_copy_stats_to_bar(peer,
|
||||
&ppdu_desc->user[i]);
|
||||
ppdu_desc->bar_ppdu_id = ppdu_desc->ppdu_id;
|
||||
ppdu_desc->ppdu_id =
|
||||
peer->last_delayed_ba_ppduid;
|
||||
}
|
||||
dp_peer_unref_del_find_by_id(peer);
|
||||
}
|
||||
|
Reference in New Issue
Block a user