From f8dec490497522c3eff2f0e3e2e67865752ede52 Mon Sep 17 00:00:00 2001 From: Nirav Shah Date: Mon, 11 May 2020 01:17:04 +0530 Subject: [PATCH] qcacld-3.0: Check CFG_TGT_DEFAULT_MAX_STA_VDEVS for P2P-CLI mode In FW CFG_TGT_DEFAULT_MAX_STA_VDEVS considers total no of STA and P2P-CLI vdevs. Enable CFG_TGT_DEFAULT_MAX_STA_VDEVS check for P2P-CLI mode. Change-Id: Ic21cf39628e7ad19102b040ffdf493a14205043a CRs-Fixed: 2680645 --- core/hdd/src/wlan_hdd_main.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 3959db40f50d..a88721f71c48 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -6000,12 +6000,17 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, uint8_t sessio return NULL; } } - /* Check for max no of supported VDEVs before creating - * another one. + + /* fall through */ + case QDF_P2P_CLIENT_MODE: + + /* Check for max no of supported STA/P2PCLI VDEVs before + * creating another one. */ - intf_count = hdd_get_mode_specific_interface_count( - hdd_ctx, - session_type); + intf_count += hdd_get_mode_specific_interface_count(hdd_ctx, + QDF_STA_MODE); + intf_count += hdd_get_mode_specific_interface_count(hdd_ctx, + QDF_P2P_CLIENT_MODE); if (CFG_TGT_DEFAULT_MAX_STA_VDEVS && (intf_count >= CFG_TGT_DEFAULT_MAX_STA_VDEVS)) { hdd_err("Max limit reached sta vdev-current %d max %d", @@ -6014,7 +6019,6 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, uint8_t sessio } /* fall through */ - case QDF_P2P_CLIENT_MODE: case QDF_P2P_DEVICE_MODE: case QDF_OCB_MODE: case QDF_NDI_MODE: