diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index af62a9a8fc..66d8ace7a4 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -2399,6 +2399,10 @@ struct cdp_sawf_ops { (*swaf_peer_sla_configuration)(struct cdp_soc_t *soc, uint8_t *mac_addr, uint16_t *sla_mask); + QDF_STATUS + (*sawf_peer_flow_count)(struct cdp_soc_t *hdl, uint8_t *mac_addr, + uint8_t svc_id, uint8_t direction, + uint8_t start_or_stop, uint8_t *peer_mac); #endif }; #endif diff --git a/dp/inc/cdp_txrx_sawf.h b/dp/inc/cdp_txrx_sawf.h index 97923cbbc9..fd7ee2f4f6 100644 --- a/dp/inc/cdp_txrx_sawf.h +++ b/dp/inc/cdp_txrx_sawf.h @@ -364,6 +364,33 @@ cdp_sawf_peer_config_ul(ol_txrx_soc_handle soc, uint8_t *mac_addr, uint8_t tid, add_or_sub); } +/** + * cdp_sawf_peer_flow_count - Peer flow count in SAWF + * @soc: SOC handle + * @mac_addr: MAC address + * @svc_id: Service Class ID + * @direction: Indication of forward or reverse service class match + * @start_or_stop: Indication of start or stop + * @peer_mac: Peer MAC address + * + * Return: QDF_STATUS + */ +static inline QDF_STATUS +cdp_sawf_peer_flow_count(ol_txrx_soc_handle soc, uint8_t *mac_addr, + uint8_t svc_id, uint8_t direction, + uint8_t start_or_stop, uint8_t *peer_mac) +{ + if (!soc || !soc->ops || !soc->ops->sawf_ops || + !soc->ops->sawf_ops->sawf_peer_flow_count) { + dp_cdp_debug("Invalid Instance"); + QDF_BUG(0); + return false; + } + + return soc->ops->sawf_ops->sawf_peer_flow_count + (soc, mac_addr, svc_id, direction, start_or_stop, peer_mac); +} + /** * cdp_swaf_peer_sla_configuration() - Check if sla is configured for a peer * @soc: SOC handle diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 606e0642ae..4d7b3bac57 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -10934,6 +10934,7 @@ static struct cdp_sawf_ops dp_ops_sawf = { .telemetry_get_drop_stats = dp_sawf_get_drop_stats, .peer_config_ul = dp_sawf_peer_config_ul, .swaf_peer_sla_configuration = dp_swaf_peer_sla_configuration, + .sawf_peer_flow_count = dp_sawf_peer_flow_count, #endif }; #endif