From e21c8c0aec9ced8886f1f326de112990778760fb Mon Sep 17 00:00:00 2001 From: Krupali Dhanvijay Date: Wed, 19 Jan 2022 10:39:39 +0530 Subject: [PATCH] qcacld-3.0: Do not reserve NAN discovery vdev in case of FTM mode If firmware supports NAN discovery vdev then one vdev is reserved for NAN. Do not reserve NAN discovery vdev in case of FTM mode. Change-Id: Ie16df46bbb09dd89889639d40dc1a65e3786ce73 CRs-Fixed: 2830136 --- core/wma/src/wma_main.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 0b93b9086f9f..c5f66b211333 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2022 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -7031,11 +7031,14 @@ int wma_rx_service_ready_ext_event(void *handle, uint8_t *event, * indicate 3 vdevs and firmware shall add 1 vdev for NAN. So decrement * the num_vdevs by 1. */ - if (ucfg_nan_is_vdev_creation_allowed(wma_handle->psoc)) { - wlan_res_cfg->nan_separate_iface_support = true; - } else { - wlan_res_cfg->num_vdevs--; - wma_update_num_peers_tids(wma_handle, wlan_res_cfg); + + if (QDF_GLOBAL_FTM_MODE != cds_get_conparam()) { + if (ucfg_nan_is_vdev_creation_allowed(wma_handle->psoc)) { + wlan_res_cfg->nan_separate_iface_support = true; + } else { + wlan_res_cfg->num_vdevs--; + wma_update_num_peers_tids(wma_handle, wlan_res_cfg); + } } if ((ucfg_pkt_capture_get_mode(wma_handle->psoc) !=