From 9c73dc02e93e256c9bd01db188ce7b90c449c8a8 Mon Sep 17 00:00:00 2001 From: Chaithanya Garrepalli Date: Mon, 17 Sep 2018 12:35:13 +0530 Subject: [PATCH] qcacmn: set tx search type appropriately Set search type only when peer map v2 messaging is enabled as we will have the search index (AST hash) only when v2 is enabled Change-Id: I6c1ab4a4d7519278755d93537a8430755d708a3c CRs-fixed: 2316418 --- dp/wifi3.0/dp_tx.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index 6ad04131f03e..529d76cc5dc8 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -3200,6 +3200,8 @@ QDF_STATUS dp_tx_vdev_attach(struct dp_vdev *vdev) */ void dp_tx_vdev_update_search_flags(struct dp_vdev *vdev) { + struct dp_soc *soc = vdev->pdev->soc; + /* * Enable both AddrY (SA based search) and AddrX (Da based search) * for TDLS link @@ -3220,7 +3222,11 @@ void dp_tx_vdev_update_search_flags(struct dp_vdev *vdev) else vdev->hal_desc_addr_search_flags = HAL_TX_DESC_ADDRX_EN; - if (vdev->opmode == wlan_op_mode_sta) + /* Set search type only when peer map v2 messaging is enabled + * as we will have the search index (AST hash) only when v2 is + * enabled + */ + if (soc->is_peer_map_unmap_v2 && vdev->opmode == wlan_op_mode_sta) vdev->search_type = HAL_TX_ADDR_INDEX_SEARCH; else vdev->search_type = HAL_TX_ADDR_SEARCH_DEFAULT;