diff --git a/components/mlme/dispatcher/inc/cfg_mlme_sap.h b/components/mlme/dispatcher/inc/cfg_mlme_sap.h index 84f455c5227c..13db067cbd6f 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_sap.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_sap.h @@ -68,7 +68,7 @@ #define CFG_ASSOC_STA_LIMIT CFG_UINT( \ "cfg_assoc_sta_limit", \ 1, \ - 32, \ + 64, \ 10, \ CFG_VALUE_OR_DEFAULT, \ "CFG_ASSOC_STA_LIMIT") @@ -260,7 +260,7 @@ * * gSoftApMaxPeers - Set Max peers connected for SAP * @Min: 1 - * @Max: 32 + * @Max: 64 * @Default: 32 * * This ini is used to set Max peers connected for SAP @@ -276,7 +276,7 @@ #define CFG_SAP_MAX_NO_PEERS CFG_INI_UINT( \ "gSoftApMaxPeers", \ 1, \ - 32, \ + 64, \ 32, \ CFG_VALUE_OR_DEFAULT, \ "max no of peers") diff --git a/core/mac/inc/sir_types.h b/core/mac/inc/sir_types.h index eec1a9b114c4..531c3d8aa807 100644 --- a/core/mac/inc/sir_types.h +++ b/core/mac/inc/sir_types.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2016,2018-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2016,2018-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 @@ -68,7 +68,18 @@ typedef struct opaque_mac_handle *mac_handle_t; struct opaque_hdd_handle; typedef struct opaque_hdd_handle *hdd_handle_t; +#ifndef WLAN_MAX_CLIENTS_ALLOWED #define HAL_NUM_ASSOC_STA 32 #define HAL_NUM_STA 41 +#else +#define HAL_NUM_ASSOC_STA WLAN_MAX_CLIENTS_ALLOWED +/* + * Sync with OL_TXRX_NUM_LOCAL_PEER_IDS definition. + * Each AP will occupy one ID, so it will occupy two IDs for AP-AP mode. + * Clients will be assigned max 64 IDs. + * STA(associated)/P2P DEV(self-PEER) will get one ID. + */ +#define HAL_NUM_STA (WLAN_MAX_CLIENTS_ALLOWED + 1 + 1 + 1) +#endif #endif /* __SIR_TYPES_H */ diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index b079bccdb5a5..c6a8ccc28b45 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -186,6 +186,11 @@ struct wma_ini_config *wma_get_ini_handle(tp_wma_handle wma) #define MAX_SUPPORTED_PEERS_REV1_1 14 #define MAX_SUPPORTED_PEERS_REV1_3 32 +#ifdef WLAN_MAX_CLIENTS_ALLOWED +#define MAX_SUPPORTED_PEERS WLAN_MAX_CLIENTS_ALLOWED +#else +#define MAX_SUPPORTED_PEERS 32 +#endif #define MIN_NO_OF_PEERS 1 /** @@ -1616,17 +1621,28 @@ static uint8_t wma_init_max_no_of_peers(tp_wma_handle wma_handle, struct hif_opaque_softc *scn = cds_get_context(QDF_MODULE_ID_HIF); uint32_t tgt_version = hif_get_target_info_handle(scn)->target_version; uint8_t max_no_of_peers; - uint8_t max_supported_peers = (tgt_version == AR6320_REV1_1_VERSION) ? - MAX_SUPPORTED_PEERS_REV1_1 : MAX_SUPPORTED_PEERS_REV1_3; + uint8_t max_supported_peers; if (!cfg) { WMA_LOGE("%s: NULL WMA ini handle", __func__); return 0; } + switch (tgt_version) { + case AR6320_REV1_1_VERSION: + max_supported_peers = MAX_SUPPORTED_PEERS_REV1_1; + break; + case AR6320_REV1_3_VERSION: + max_supported_peers = MAX_SUPPORTED_PEERS_REV1_3; + break; + default: + max_supported_peers = MAX_SUPPORTED_PEERS; + break; + } max_no_of_peers = (max_peers > max_supported_peers) ? max_supported_peers : max_peers; cfg->max_no_of_peers = max_no_of_peers; + return max_no_of_peers; }