From 154559caad3ad45353bac5ccfd57ec93b9199a50 Mon Sep 17 00:00:00 2001 From: Rachit Kankane Date: Thu, 12 Jul 2018 14:02:30 +0530 Subject: [PATCH] qcacld-3.0: Reduce MAX_BBS and MAX_PEERs for Genoa Max 3 BSS sessions and 10 peers are required in Genoa. To support this, reduce SIR_MAX_SUPPORTED_BSS to 3 and SIR_SAP_MAX_NUM_PEERS to 10. Change-Id: Ic773b5b38193d446288321c2dfd740f6de57704e CRs-Fixed: 2283825 --- Kbuild | 8 ++++++++ configs/genoa.common | 8 ++++++++ core/mac/inc/sir_api.h | 4 ++++ 3 files changed, 20 insertions(+) diff --git a/Kbuild b/Kbuild index 170ac855da0e..653352dac717 100644 --- a/Kbuild +++ b/Kbuild @@ -2138,6 +2138,14 @@ ifdef CONFIG_CFG_NUM_OF_TDLS_CONN_TABLE_ENTRIES ccflags-y += -DCFG_TGT_NUM_TDLS_CONN_TABLE_ENTRIES=$(CONFIG_CFG_NUM_OF_TDLS_CONN_TABLE_ENTRIES) endif +ifdef CONFIG_SIR_MAX_SUPPORTED_BSS +ccflags-y += -DSIR_MAX_SUPPORTED_BSS=$(CONFIG_SIR_MAX_SUPPORTED_BSS) +endif + +ifdef CONFIG_SIR_SAP_MAX_NUM_PEERS +ccflags-y += -DSIR_SAP_MAX_NUM_PEERS=$(CONFIG_SIR_SAP_MAX_NUM_PEERS) +endif + KBUILD_CPPFLAGS += $(cppflags-y) # Currently, for versions of gcc which support it, the kernel Makefile diff --git a/configs/genoa.common b/configs/genoa.common index 5cd6663694f6..01deb86bf63a 100644 --- a/configs/genoa.common +++ b/configs/genoa.common @@ -154,4 +154,12 @@ CONFIG_CFG_NUM_OF_ADDITIONAL_FW_PEERS := 0 # Number of TDLS peers that each Tdls vdev can track CONFIG_CFG_NUM_OF_TDLS_CONN_TABLE_ENTRIES := 4 + +#Number of BSS sessions at a time, used for allocating memory should never be +#less then number of vdevs - INI +CONFIG_SIR_MAX_SUPPORTED_BSS := 3 + +#Number of STA sessions max connected to our SAP, used for allocating memory +#should never be less then number of max peers - INI +CONFIG_SIR_SAP_MAX_NUM_PEERS := 10 ################################### diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 31043f2dcf3a..2b90af51a696 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -50,7 +50,9 @@ typedef struct sAniSirGlobal *tpAniSirGlobal; #include #include "wlan_policy_mgr_api.h" +#ifndef SIR_MAX_SUPPORTED_BSS #define SIR_MAX_SUPPORTED_BSS 5 +#endif #define OFFSET_OF(structType, fldName) (&((structType *)0)->fldName) @@ -113,7 +115,9 @@ typedef uint8_t tSirVersionString[SIR_VERSION_STRING_LEN]; #define MAX_PEER_STA 12 /* Maximum number of peers for SAP */ +#ifndef SIR_SAP_MAX_NUM_PEERS #define SIR_SAP_MAX_NUM_PEERS 32 +#endif #define SIR_KRK_KEY_LEN 16 #define SIR_BTK_KEY_LEN 32