qcacmn: separate dp_rx_tid functionality

As of today, dp_peer.c has the peer management and rx_tid
functionality(create/setup/remove) which is used by the REO HW.

WCN6450 does not have REO HW and dp_rx_tid functionality is not
required for WCN6450. Hence, separate out dp rx tid functionality
from dp_peer.c so that we can avoid compiling unnecessary code
for WCN6450.

Change-Id: I322823704f38ff72e485f050941be6b1254bad09
CRs-Fixed: 3383330
This commit is contained in:
Venkateswara Naralasetty
2023-03-01 15:32:44 +05:30
committed by Madan Koyyalamudi
parent 5b3d70f9a2
commit 76e5c1f345
5 changed files with 2440 additions and 2256 deletions

View File

@@ -133,9 +133,6 @@ struct dp_peer *dp_peer_find_hash_find(struct dp_soc *soc,
*/
bool dp_peer_find_by_id_valid(struct dp_soc *soc, uint16_t peer_id);
#ifdef DP_UMAC_HW_RESET_SUPPORT
void dp_reset_tid_q_setup(struct dp_soc *soc);
#endif
/**
* dp_peer_get_ref() - Returns peer object given the peer id
*
@@ -693,9 +690,6 @@ void dp_rx_sec_ind_handler(struct dp_soc *soc, uint16_t peer_id,
enum cdp_sec_type sec_type, int is_unicast,
u_int32_t *michael_key, u_int32_t *rx_pn);
QDF_STATUS dp_rx_delba_ind_handler(void *soc_handle, uint16_t peer_id,
uint8_t tid, uint16_t win_sz);
uint8_t dp_get_peer_mac_addr_frm_id(struct cdp_soc_t *soc_handle,
uint16_t peer_id, uint8_t *peer_mac);
@@ -1061,18 +1055,6 @@ void dp_peer_ast_index_flow_queue_map_create(void *soc_hdl,
struct dp_ast_flow_override_info *ast_info);
#endif
/**
* dp_rx_tid_delete_cb() - Callback to flush reo descriptor HW cache
* after deleting the entries (ie., setting valid=0)
*
* @soc: DP SOC handle
* @cb_ctxt: Callback context
* @reo_status: REO command status
*/
void dp_rx_tid_delete_cb(struct dp_soc *soc,
void *cb_ctxt,
union hal_reo_status *reo_status);
#ifdef QCA_PEER_EXT_STATS
/**
* dp_peer_delay_stats_ctx_alloc() - Allocate peer delay stats content
@@ -1381,57 +1363,6 @@ static inline void dp_peer_mec_flush_entries(struct dp_soc *soc)
}
#endif
#ifdef DUMP_REO_QUEUE_INFO_IN_DDR
/**
* dp_send_cache_flush_for_rx_tid() - Send cache flush cmd to REO per tid
* @soc: dp_soc handle
* @peer: peer
*
* This function is used to send cache flush cmd to reo and
* to register the callback to handle the dumping of the reo
* queue stas from DDR
*
* Return: none
*/
void dp_send_cache_flush_for_rx_tid(
struct dp_soc *soc, struct dp_peer *peer);
/**
* dp_get_rx_reo_queue_info() - Handler to get rx tid info
* @soc_hdl: cdp_soc_t handle
* @vdev_id: vdev id
*
* Handler to get rx tid info from DDR after h/w cache is
* invalidated first using the cache flush cmd.
*
* Return: none
*/
void dp_get_rx_reo_queue_info(
struct cdp_soc_t *soc_hdl, uint8_t vdev_id);
/**
* dp_dump_rx_reo_queue_info() - Callback function to dump reo queue stats
* @soc: dp_soc handle
* @cb_ctxt: callback context
* @reo_status: vdev id
*
* This is the callback function registered after sending the reo cmd
* to flush the h/w cache and invalidate it. In the callback the reo
* queue desc info is dumped from DDR.
*
* Return: none
*/
void dp_dump_rx_reo_queue_info(
struct dp_soc *soc, void *cb_ctxt, union hal_reo_status *reo_status);
#else /* DUMP_REO_QUEUE_INFO_IN_DDR */
static inline void dp_get_rx_reo_queue_info(
struct cdp_soc_t *soc_hdl, uint8_t vdev_id)
{
}
#endif /* DUMP_REO_QUEUE_INFO_IN_DDR */
static inline int dp_peer_find_mac_addr_cmp(
union dp_align_mac_addr *mac_addr1,
union dp_align_mac_addr *mac_addr2)
@@ -2277,53 +2208,6 @@ static inline void dp_print_mlo_ast_stats_be(struct dp_soc *soc)
}
#endif /* WLAN_FEATURE_11BE_MLO */
static inline
QDF_STATUS dp_peer_rx_tids_create(struct dp_peer *peer)
{
uint8_t i;
if (IS_MLO_DP_MLD_PEER(peer)) {
dp_peer_info("skip for mld peer");
return QDF_STATUS_SUCCESS;
}
if (peer->rx_tid) {
QDF_BUG(0);
dp_peer_err("peer rx_tid mem already exist");
return QDF_STATUS_E_FAILURE;
}
peer->rx_tid = qdf_mem_malloc(DP_MAX_TIDS *
sizeof(struct dp_rx_tid));
if (!peer->rx_tid) {
dp_err("fail to alloc tid for peer" QDF_MAC_ADDR_FMT,
QDF_MAC_ADDR_REF(peer->mac_addr.raw));
return QDF_STATUS_E_NOMEM;
}
qdf_mem_zero(peer->rx_tid, DP_MAX_TIDS * sizeof(struct dp_rx_tid));
for (i = 0; i < DP_MAX_TIDS; i++)
qdf_spinlock_create(&peer->rx_tid[i].tid_lock);
return QDF_STATUS_SUCCESS;
}
static inline
void dp_peer_rx_tids_destroy(struct dp_peer *peer)
{
uint8_t i;
if (!IS_MLO_DP_LINK_PEER(peer)) {
for (i = 0; i < DP_MAX_TIDS; i++)
qdf_spinlock_destroy(&peer->rx_tid[i].tid_lock);
qdf_mem_free(peer->rx_tid);
}
peer->rx_tid = NULL;
}
static inline
void dp_peer_defrag_rx_tids_init(struct dp_txrx_peer *txrx_peer)
{