From 6363f77af4d379670bb1b78cbc2f985a2751d07f Mon Sep 17 00:00:00 2001 From: Visweswara Tanuku Date: Mon, 13 Jul 2020 19:42:29 +0530 Subject: [PATCH] qcacld-3.0: Set twt ap sta count in target config Provide defines in Kbuild to set twt ap sta count in target config Change-Id: Ie7be53d2cb003c1176b6dec26d22f833288308c0 CRs-Fixed: 2730789 --- Kbuild | 3 +++ core/mac/inc/wlan_tgt_def_config.h | 11 ++++++++++- core/mac/inc/wlan_tgt_def_config_hl.h | 7 ++++++- core/wma/src/wma_main.c | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Kbuild b/Kbuild index 4be6c9c3f05c..a41303195735 100644 --- a/Kbuild +++ b/Kbuild @@ -2537,6 +2537,9 @@ cppflags-$(CONFIG_DIRECT_BUF_RX_ENABLE) += -DDBR_MULTI_SRNG_ENABLE endif cppflags-$(CONFIG_WMI_CMD_STRINGS) += -DWMI_CMD_STRINGS cppflags-$(CONFIG_WLAN_FEATURE_TWT) += -DWLAN_SUPPORT_TWT +ifdef CONFIG_WLAN_TWT_SAP_STA_COUNT +ccflags-y += -DWLAN_TWT_SAP_STA_COUNT=$(CONFIG_WLAN_TWT_SAP_STA_COUNT) +endif cppflags-$(CONFIG_WLAN_DISABLE_EXPORT_SYMBOL) += -DWLAN_DISABLE_EXPORT_SYMBOL cppflags-$(CONFIG_WIFI_POS_CONVERGED) += -DWIFI_POS_CONVERGED cppflags-$(CONFIG_WIFI_POS_LEGACY) += -DFEATURE_OEM_DATA_SUPPORT diff --git a/core/mac/inc/wlan_tgt_def_config.h b/core/mac/inc/wlan_tgt_def_config.h index 2dc52fc0bfa6..9061b42ba88a 100644 --- a/core/mac/inc/wlan_tgt_def_config.h +++ b/core/mac/inc/wlan_tgt_def_config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2011, 2014-2020 The Linux Foundation. All rights reserved. * * * @@ -261,4 +261,13 @@ */ #define CFG_TGT_NUM_OCB_SCHEDULES 2 +/* + * Default TWT AP STA Count + */ +#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_SAP_STA_COUNT) +#define CFG_TGT_DEFAULT_TWT_AP_STA_COUNT WLAN_TWT_SAP_STA_COUNT +#else +#define CFG_TGT_DEFAULT_TWT_AP_STA_COUNT 0 +#endif /* WLAN_SUPPORT_TWT && WLAN_TWT_SAP_STA_COUNT */ + #endif /*__WLAN_TGT_DEF_CONFIG_H__ */ diff --git a/core/mac/inc/wlan_tgt_def_config_hl.h b/core/mac/inc/wlan_tgt_def_config_hl.h index 5de6d8d4f7fe..f3cb8a89f45c 100644 --- a/core/mac/inc/wlan_tgt_def_config_hl.h +++ b/core/mac/inc/wlan_tgt_def_config_hl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2020 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 @@ -300,4 +300,9 @@ */ #define CFG_TGT_NUM_OCB_SCHEDULES 2 +/* + * Default TWT AP STA Count + */ +#define CFG_TGT_DEFAULT_TWT_AP_STA_COUNT 0 + #endif /*__WLAN_TGT_DEF_CONFIG_H__ */ diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 22a2b43f2f74..c9e848d6f2e2 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -345,7 +345,7 @@ static void wma_set_default_tgt_config(tp_wma_handle wma_handle, tgt_cfg->num_ocb_vdevs = CFG_TGT_NUM_OCB_VDEVS; tgt_cfg->num_ocb_channels = CFG_TGT_NUM_OCB_CHANNELS; tgt_cfg->num_ocb_schedules = CFG_TGT_NUM_OCB_SCHEDULES; - + tgt_cfg->twt_ap_sta_count = CFG_TGT_DEFAULT_TWT_AP_STA_COUNT; tgt_cfg->mgmt_comp_evt_bundle_support = true; tgt_cfg->tx_msdu_new_partition_id_support = true;