From 56559ee3876e25105f8113e727859970121c1f84 Mon Sep 17 00:00:00 2001 From: Santosh Anbu Date: Tue, 28 Feb 2023 00:55:28 +0530 Subject: [PATCH] qcacmn: Add MLO peer AST on primary soc In scenario where assoc peer soc id is different from primary soc id, reset the soc to point to primary psoc. Since unmap is received on primary soc, the map should also add ast on primary soc. Change-Id: I85c6ba72a217eb5350ccc072d56b36b111af4d58 CRs-Fixed: 3410916 --- dp/wifi3.0/dp_peer.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/dp/wifi3.0/dp_peer.c b/dp/wifi3.0/dp_peer.c index d7ab0cc378..4084bccfcc 100644 --- a/dp/wifi3.0/dp_peer.c +++ b/dp/wifi3.0/dp_peer.c @@ -2724,7 +2724,7 @@ dp_rx_mlo_peer_map_handler(struct dp_soc *soc, uint16_t peer_id, uint16_t ml_peer_id = dp_gen_ml_peer_id(soc, peer_id); enum cdp_txrx_ast_entry_type type = CDP_TXRX_AST_TYPE_STATIC; QDF_STATUS err = QDF_STATUS_SUCCESS; - struct dp_soc *primary_soc; + struct dp_soc *primary_soc = NULL; dp_cfg_event_record_peer_map_unmap_evt(soc, DP_CFG_EVENT_MLO_PEER_MAP, NULL, peer_mac_addr, @@ -2802,6 +2802,9 @@ dp_rx_mlo_peer_map_handler(struct dp_soc *soc, uint16_t peer_id, } } + if (!primary_soc) + primary_soc = soc; + err = dp_peer_map_ast(soc, peer, peer_mac_addr, hw_peer_id, vdev_id, ast_hash, is_wds); @@ -2810,7 +2813,7 @@ dp_rx_mlo_peer_map_handler(struct dp_soc *soc, uint16_t peer_id, * host based on mlo peer map event from FW */ if (soc->ast_offload_support && soc->host_ast_db_enable) { - dp_peer_host_add_map_ast(soc, ml_peer_id, peer_mac_addr, + dp_peer_host_add_map_ast(primary_soc, ml_peer_id, peer_mac_addr, hw_peer_id, vdev_id, ast_hash, is_wds); } @@ -3036,6 +3039,14 @@ dp_rx_peer_unmap_handler(struct dp_soc *soc, uint16_t peer_id, WDI_NO_VAL, vdev->pdev->pdev_id); } + /* + * In scenario where assoc peer soc id is different from + * primary soc id, reset the soc to point to primary psoc. + * Since map is received on primary soc, the unmap should + * also delete ast on primary soc. + */ + soc = peer->vdev->pdev->soc; + /* If V2 Peer map messages are enabled AST entry has to be * freed here */