From 256ded39df36f14594125c69cb687ce20fbb013b Mon Sep 17 00:00:00 2001 From: Yeshwanth Sriram Guntuka Date: Fri, 5 Feb 2021 13:49:56 +0530 Subject: [PATCH] qcacmn: Add CDP intf to flush fragments for a particular peer Add CDP interface support for flushing fragments for a particular peer. Change-Id: Ic59843408037b9c858599be13727422c2e3031cd CRs-Fixed: 2875946 --- dp/inc/cdp_txrx_ops.h | 2 ++ dp/inc/cdp_txrx_peer_ops.h | 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index 235dc91012a5..121d3b89fa49 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -1369,6 +1369,8 @@ struct cdp_peer_ops { uint8_t *peer_mac, bool val); void (*set_peer_as_tdls_peer)(struct cdp_soc_t *soc, uint8_t vdev_id, uint8_t *peer_mac, bool val); + void (*peer_flush_frags)(struct cdp_soc_t *soc_hdl, + uint8_t vdev_id, uint8_t *peer_mac); }; /** diff --git a/dp/inc/cdp_txrx_peer_ops.h b/dp/inc/cdp_txrx_peer_ops.h index 9a11a5a58863..2a394392029b 100644 --- a/dp/inc/cdp_txrx_peer_ops.h +++ b/dp/inc/cdp_txrx_peer_ops.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -569,4 +569,24 @@ cdp_peer_set_tdls_offchan_enabled(ol_txrx_soc_handle soc, uint8_t vdev_id, peer_mac, val); } +/** + * cdp_peer_flush_frags() - Flush frags on peer + * @soc - data path soc handle + * @vdev_id - virtual interface id + * @peer_mac - peer mac addr + * + * Return: None + */ +static inline void +cdp_peer_flush_frags(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac) +{ + if (!soc || !soc->ops || !soc->ops->peer_ops) { + QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL, + "%s invalid instance", __func__); + return; + } + + if (soc->ops->peer_ops->peer_flush_frags) + soc->ops->peer_ops->peer_flush_frags(soc, vdev_id, peer_mac); +} #endif /* _CDP_TXRX_PEER_H_ */