qcacmn: [DP]TWT stats feature: add WMI Support for TWT stats event
Add WMI support for WMI_TWT_SESSION_STATS_EVENTID. This event contains stats for a given TWT session. Change-Id: I01d5f7b30da803ee713a14c1d1124b8af7161bca CRs-Fixed: 2609951
This commit is contained in:
@@ -980,11 +980,13 @@ struct cdp_soc_t {
|
||||
* @CDP_CONFIG_NAWDS: Enable nawds mode
|
||||
* @CDP_CONFIG_NAC: Enable nac
|
||||
* @CDP_CONFIG_ISOLATION : Enable isolation
|
||||
* @CDP_CONFIG_IN_TWT : In TWT session or not
|
||||
*/
|
||||
enum cdp_peer_param_type {
|
||||
CDP_CONFIG_NAWDS,
|
||||
CDP_CONFIG_NAC,
|
||||
CDP_CONFIG_ISOLATION,
|
||||
CDP_CONFIG_IN_TWT,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1054,6 +1056,7 @@ enum cdp_pdev_param_type {
|
||||
*
|
||||
* @cdp_peer_param_nawds: Enable nawds mode
|
||||
* @cdp_peer_param_isolation: Enable isolation
|
||||
* @cdp_peer_param_in_twt: in TWT session or not
|
||||
* @cdp_peer_param_nac: Enable nac
|
||||
*
|
||||
* @cdp_vdev_param_nawds: set nawds enable/disable
|
||||
@@ -1110,6 +1113,7 @@ typedef union cdp_config_param_t {
|
||||
bool cdp_peer_param_nawds;
|
||||
bool cdp_peer_param_isolation;
|
||||
uint8_t cdp_peer_param_nac;
|
||||
bool cdp_peer_param_in_twt;
|
||||
|
||||
/* vdev params */
|
||||
bool cdp_vdev_param_wds;
|
||||
|
@@ -815,6 +815,7 @@ struct protocol_trace_count {
|
||||
* @ru_tones: RU tones size
|
||||
* @ru_loc: pkt info for RU location 26/ 52/ 106/ 242/ 484 counter
|
||||
* @num_ppdu_cookie_valid : Number of comp received with valid ppdu cookie
|
||||
* @tx_success_twt: Successful Tx Packets in TWT session
|
||||
*/
|
||||
struct cdp_tx_stats {
|
||||
struct cdp_pkt_info comp_pkt;
|
||||
@@ -905,6 +906,7 @@ struct cdp_tx_stats {
|
||||
|
||||
uint32_t num_ppdu_cookie_valid;
|
||||
uint32_t no_ack_count[QDF_PROTO_SUBTYPE_MAX];
|
||||
struct cdp_pkt_info tx_success_twt;
|
||||
};
|
||||
|
||||
/* struct cdp_rx_stats - rx Level Stats
|
||||
@@ -969,6 +971,7 @@ struct cdp_tx_stats {
|
||||
* @last_rssi: Previous rssi
|
||||
* @multipass_rx_pkt_drop: Dropped multipass rx pkt
|
||||
* @rx_mpdu_cnt: rx mpdu count per MCS rate
|
||||
* @to_stack_twt: Total packets sent up the stack in TWT session
|
||||
*/
|
||||
struct cdp_rx_stats {
|
||||
struct cdp_pkt_info to_stack;
|
||||
@@ -1037,6 +1040,7 @@ struct cdp_rx_stats {
|
||||
uint8_t last_rssi;
|
||||
uint32_t multipass_rx_pkt_drop;
|
||||
uint32_t rx_mpdu_cnt[MAX_MCS];
|
||||
struct cdp_pkt_info to_stack_twt;
|
||||
};
|
||||
|
||||
/* struct cdp_tx_ingress_stats - Tx ingress Stats
|
||||
|
@@ -7976,6 +7976,9 @@ static QDF_STATUS dp_set_peer_param(struct cdp_soc_t *cdp_soc, uint8_t vdev_id,
|
||||
case CDP_CONFIG_ISOLATION:
|
||||
dp_set_peer_isolation(peer, val.cdp_peer_param_isolation);
|
||||
break;
|
||||
case CDP_CONFIG_IN_TWT:
|
||||
peer->in_twt = !!(val.cdp_peer_param_in_twt);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -2619,6 +2619,9 @@ done:
|
||||
nbuf);
|
||||
DP_STATS_INC_PKT(peer, rx.to_stack, 1,
|
||||
QDF_NBUF_CB_RX_PKT_LEN(nbuf));
|
||||
if (qdf_unlikely(peer->in_twt))
|
||||
DP_STATS_INC_PKT(peer, rx.to_stack_twt, 1,
|
||||
QDF_NBUF_CB_RX_PKT_LEN(nbuf));
|
||||
|
||||
tid_stats->delivered_to_stack++;
|
||||
nbuf = next;
|
||||
|
@@ -3613,8 +3613,14 @@ void dp_tx_comp_process_tx_status(struct dp_soc *soc,
|
||||
}
|
||||
} else {
|
||||
DP_STATS_INC_PKT(peer, tx.ucast, 1, length);
|
||||
if (ts->status == HAL_TX_TQM_RR_FRAME_ACKED)
|
||||
if (ts->status == HAL_TX_TQM_RR_FRAME_ACKED) {
|
||||
DP_STATS_INC_PKT(peer, tx.tx_success, 1, length);
|
||||
if (qdf_unlikely(peer->in_twt)) {
|
||||
DP_STATS_INC_PKT(peer,
|
||||
tx.tx_success_twt,
|
||||
1, length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dp_tx_update_peer_stats(tx_desc, ts, peer, ring_id);
|
||||
|
@@ -2356,14 +2356,15 @@ struct dp_peer {
|
||||
} security[2]; /* 0 -> multicast, 1 -> unicast */
|
||||
|
||||
/* NAWDS Flag and Bss Peer bit */
|
||||
uint8_t nawds_enabled:1, /* NAWDS flag */
|
||||
uint16_t nawds_enabled:1, /* NAWDS flag */
|
||||
bss_peer:1, /* set for bss peer */
|
||||
wds_enabled:1, /* WDS peer */
|
||||
authorize:1, /* Set when authorized */
|
||||
nac:1, /* NAC Peer*/
|
||||
tx_cap_enabled:1, /* Peer's tx-capture is enabled */
|
||||
rx_cap_enabled:1, /* Peer's rx-capture is enabled */
|
||||
valid:1; /* valid bit */
|
||||
valid:1, /* valid bit */
|
||||
in_twt:1; /* in TWT session */
|
||||
|
||||
#ifdef QCA_SUPPORT_PEER_ISOLATION
|
||||
bool isolation; /* enable peer isolation for this peer */
|
||||
|
Reference in New Issue
Block a user