summaryrefslogtreecommitdiff
path: root/core/mac/src
diff options
context:
space:
mode:
authorService qcabuildsw <qcabuildsw@localhost>2016-09-20 17:45:13 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-09-20 17:45:13 -0700
commit061013e1eadb11c1757a3eba1739e55bdb85fc08 (patch)
treef1cfdf1fc856d29554d99e075ff4c556d2284a88 /core/mac/src
parent94e8ed4d94ca7123bd14e416ea57b9b77b426771 (diff)
parentfaaa7bd8e2765fe5796d5500969ccde4eed7c326 (diff)
Merge "qcacld-3.0: Fix buffer overflow" into wlan-cld3.driver.lnx.1.1-dev
Diffstat (limited to 'core/mac/src')
-rw-r--r--core/mac/src/pe/lim/lim_aid_mgmt.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/core/mac/src/pe/lim/lim_aid_mgmt.c b/core/mac/src/pe/lim/lim_aid_mgmt.c
index f99a8ae25197..c1c0b48398d3 100644
--- a/core/mac/src/pe/lim/lim_aid_mgmt.c
+++ b/core/mac/src/pe/lim/lim_aid_mgmt.c
@@ -50,37 +50,32 @@
#define LIM_START_PEER_IDX 1
/**
- * lim_init_peer_idxpool()
+ * lim_init_peer_idxpool() -- initializes peer index pool
+ * @pMac: mac context
+ * @pSessionEntry: session entry
*
- ***FUNCTION:
* This function is called while starting a BSS at AP
* to initialize AID pool. This may also be called while
* starting/joining an IBSS if 'Association' is allowed
* in IBSS.
*
- ***LOGIC:
- *
- ***ASSUMPTIONS:
- * NA
- *
- ***NOTE:
- * NA
- *
- * @param pMac - Pointer to Global MAC structure
- * @return None
+ * Return: None
*/
void lim_init_peer_idxpool(tpAniSirGlobal pMac, tpPESession pSessionEntry)
{
uint8_t i;
- uint8_t maxAssocSta = pMac->lim.gLimAssocStaLimit;
+ uint8_t maxAssocSta = pMac->lim.maxStation;
pSessionEntry->gpLimPeerIdxpool[0] = 0;
#ifdef FEATURE_WLAN_TDLS
- /* In station role, DPH_STA_HASH_INDEX_PEER (index 1) is reserved for peer */
- /* station index corresponding to AP. Avoid choosing that index and get index */
- /* starting from (DPH_STA_HASH_INDEX_PEER + 1) (index 2) for TDLS stations; */
+ /*
+ * In station role, DPH_STA_HASH_INDEX_PEER (index 1) is reserved
+ * for peer station index corresponding to AP. Avoid choosing that index
+ * and get index starting from (DPH_STA_HASH_INDEX_PEER + 1)
+ * (index 2) for TDLS stations;
+ */
if (LIM_IS_STA_ROLE(pSessionEntry)) {
pSessionEntry->freePeerIdxHead = DPH_STA_HASH_INDEX_PEER + 1;
} else
@@ -88,7 +83,6 @@ void lim_init_peer_idxpool(tpAniSirGlobal pMac, tpPESession pSessionEntry)
#ifdef QCA_IBSS_SUPPORT
if (LIM_IS_IBSS_ROLE(pSessionEntry)) {
pSessionEntry->freePeerIdxHead = LIM_START_PEER_IDX;
- maxAssocSta = pMac->lim.gLimIbssStaLimit;
} else
#endif
{