qcacmn: Add method to configure TID queues flush

This enables the option to configure when a peer's
TID queue needs to be flushed. This is required to
discard packets that are no longer useful to the application.

Change-Id: I558debff043fc0c8038e5f5f2c815b64c90e1561
CRs-Fixed: 3130422
This commit is contained in:
Madhvapathi Sriram
2022-05-06 13:56:42 +05:30
committed by Madan Koyyalamudi
orang tua f666bb4d71
melakukan f4bfa6616b
10 mengubah file dengan 422 tambahan dan 2 penghapusan

Melihat File

@@ -92,6 +92,9 @@ cdp_dump_flow_pool_info(struct cdp_soc_t *soc)
#ifdef CONFIG_SAWF_DEF_QUEUES
#include "dp_sawf.h"
#endif
#ifdef WLAN_FEATURE_PEER_TXQ_FLUSH_CONF
#include <target_if_dp.h>
#endif
#ifdef WLAN_FEATURE_STATS_EXT
#define INIT_RX_HW_STATS_LOCK(_soc) \
@@ -13405,6 +13408,35 @@ static void dp_mark_first_wakeup_packet(struct cdp_soc_t *soc_hdl,
}
#endif
#ifdef WLAN_FEATURE_PEER_TXQ_FLUSH_CONF
/**
* dp_set_peer_txq_flush_config() - Set the peer txq flush configuration
* @soc_hdl: Opaque handle to the DP soc object
* @vdev_id: VDEV identifier
* @mac: MAC address of the peer
* @ac: access category mask
* @tid: TID mask
* @policy: Flush policy
*
* Return: 0 on success, errno on failure
*/
static int dp_set_peer_txq_flush_config(struct cdp_soc_t *soc_hdl,
uint8_t vdev_id, uint8_t *mac,
uint8_t ac, uint32_t tid,
enum cdp_peer_txq_flush_policy policy)
{
struct dp_soc *soc;
if (!soc_hdl) {
dp_err("soc is null");
return -EINVAL;
}
soc = cdp_soc_t_to_dp_soc(soc_hdl);
return target_if_peer_txq_flush_config(soc->ctrl_psoc, vdev_id,
mac, ac, tid, policy);
}
#endif
#ifdef DP_PEER_EXTENDED_API
static struct cdp_misc_ops dp_ops_misc = {
#ifdef FEATURE_WLAN_TDLS
@@ -13438,6 +13470,9 @@ static struct cdp_misc_ops dp_ops_misc = {
#ifdef WLAN_FEATURE_MARK_FIRST_WAKEUP_PACKET
.mark_first_wakeup_packet = dp_mark_first_wakeup_packet,
#endif
#ifdef WLAN_FEATURE_PEER_TXQ_FLUSH_CONF
.set_peer_txq_flush_config = dp_set_peer_txq_flush_config,
#endif
};
#endif