From 82fd1e58e2f7e190a3a23b24fa7234d4ab8ac6c0 Mon Sep 17 00:00:00 2001 From: Santosh Anbu Date: Wed, 29 Jun 2022 01:44:02 +0530 Subject: [PATCH] qcacmn: Add support to delete AST on BE platforms Add change to support deletion/cleanup of AST entries on host for BE platforms(Waikiki) based on peer map and unmap event received from FW. Change-Id: I494f7beb572e81cf68cc1cf90864eea0d8125369 CRs-Fixed: 3237943 --- dp/wifi3.0/dp_peer.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dp/wifi3.0/dp_peer.c b/dp/wifi3.0/dp_peer.c index 37cb61a73b..d0f5fa3165 100644 --- a/dp/wifi3.0/dp_peer.c +++ b/dp/wifi3.0/dp_peer.c @@ -1301,7 +1301,7 @@ void dp_peer_ast_hash_remove(struct dp_soc *soc, struct dp_ast_entry *tmpase; int found = 0; - if (soc->ast_offload_support) + if (soc->ast_offload_support && !soc->host_ast_db_enable) return; index = dp_peer_ast_hash_index(soc, &ase->mac_addr); @@ -2433,7 +2433,7 @@ dp_peer_clean_wds_entries(struct dp_soc *soc, struct dp_peer *peer, { uint32_t wds_deleted = 0; - if (soc->ast_offload_support) + if (soc->ast_offload_support && !soc->host_ast_db_enable) return; wds_deleted = dp_peer_ast_free_wds_entries(soc, peer); @@ -3157,8 +3157,14 @@ dp_rx_peer_unmap_handler(struct dp_soc *soc, uint16_t peer_id, struct dp_peer *peer; struct dp_vdev *vdev = NULL; - if (soc->ast_offload_support && is_wds) - return; + /* + * If FW AST offload is enabled and host AST DB is enabled, + * the AST entries are created during peer map from FW. + */ + if (soc->ast_offload_support && is_wds) { + if (!soc->host_ast_db_enable) + return; + } peer = __dp_peer_get_ref_by_id(soc, peer_id, DP_MOD_ID_HTT);