qcacld-3.0: Add support for 64-clients

Add support for 64-clients.

Change-Id: Ic97ebb83190b5061734832f6dc6dcdb6d0bdac2b
CRs-Fixed: 2625495
This commit is contained in:
hqu 2020-04-09 17:12:14 +08:00 • committed by nshrivas
commit e2e9ea6d37
3 changed files with 33 additions and 6 deletions

View file

@ -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 @@
* <ini>
* 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")

View file

@ -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 */

View file

@ -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;
}