Skip to content

Commit

Permalink
drivers: qcacld-3.0: Merge tag 'LA.UM.8.3.c25-00900-sdm845.0' into ca…
Browse files Browse the repository at this point in the history
…nting-4.9-q

* tag 'LA.UM.8.3.c25-00900-sdm845.0' of https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0:
  qcacld-3.0: Send assoc reject upon failing to post ASSOC_IND

Signed-off-by: Khusika Dhamar Gusti <mail@khusika.com>
  • Loading branch information
Khusika Dhamar Gusti committed Mar 4, 2021
2 parents af5b5ac + 73d5f55 commit ea0aa45
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2546,19 +2546,9 @@ static void fill_mlm_assoc_ind_vht(tpSirAssocReq assocreq,
}
}

/**
* lim_send_mlm_assoc_ind() - Sends assoc indication to SME
* @mac_ctx: Global Mac context
* @sta_ds: Station DPH hash entry
* @session_entry: PE session entry
*
* This function sends either LIM_MLM_ASSOC_IND
* or LIM_MLM_REASSOC_IND to SME.
*
* Return: None
*/
void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
tpDphHashNode sta_ds, tpPESession session_entry)
QDF_STATUS lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
tpDphHashNode sta_ds,
tpPESession session_entry)
{
tpLimMlmAssocInd assoc_ind = NULL;
tpSirAssocReq assoc_req;
Expand All @@ -2571,7 +2561,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,

if (!session_entry->parsedAssocReq) {
pe_err(" Parsed Assoc req is NULL");
return;
return QDF_STATUS_E_INVAL;
}

/* Get a copy of the already parsed Assoc Request */
Expand All @@ -2580,7 +2570,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,

if (!assoc_req) {
pe_err("assoc req for assoc_id:%d is NULL", sta_ds->assocId);
return;
return QDF_STATUS_E_INVAL;
}

/* Get the phy_mode */
Expand All @@ -2605,7 +2595,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
lim_release_peer_idx(mac_ctx, sta_ds->assocId,
session_entry);
pe_err("AllocateMemory failed for assoc_ind");
return;
return QDF_STATUS_E_NOMEM;
}
qdf_mem_copy((uint8_t *) assoc_ind->peerMacAddr,
(uint8_t *) sta_ds->staAddr, sizeof(tSirMacAddr));
Expand Down Expand Up @@ -2659,7 +2649,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
pe_err("rsnIEdata index out of bounds: %d",
rsn_len);
qdf_mem_free(assoc_ind);
return;
return QDF_STATUS_E_INVAL;
}
assoc_ind->rsnIE.rsnIEdata[rsn_len] =
SIR_MAC_WPA_EID;
Expand Down Expand Up @@ -2819,5 +2809,5 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
(uint32_t *) assoc_ind);
qdf_mem_free(assoc_ind);
}
return;
return QDF_STATUS_SUCCESS;
}
Original file line number Diff line number Diff line change
Expand Up @@ -1993,7 +1993,15 @@ void lim_process_ap_mlm_add_sta_rsp(tpAniSirGlobal pMac,
* 2) PE receives eWNI_SME_ASSOC_CNF from SME
* 3) BTAMP-AP sends Re/Association Response to BTAMP-STA
*/
lim_send_mlm_assoc_ind(pMac, pStaDs, psessionEntry);
if (lim_send_mlm_assoc_ind(pMac, pStaDs, psessionEntry) !=
QDF_STATUS_SUCCESS) {
lim_reject_association(pMac, pStaDs->staAddr,
pStaDs->mlmStaContext.subType,
true, pStaDs->mlmStaContext.authType,
pStaDs->assocId, true,
eSIR_MAC_UNSPEC_FAILURE_STATUS,
psessionEntry);
}
/* fall though to reclaim the original Add STA Response message */
end:
if (0 != limMsgQ->bodyptr) {
Expand Down
17 changes: 15 additions & 2 deletions drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,21 @@ QDF_STATUS lim_process_auth_frame_no_session(tpAniSirGlobal mac,


void lim_process_assoc_req_frame(tpAniSirGlobal, uint8_t *, uint8_t, tpPESession);
void lim_send_mlm_assoc_ind(tpAniSirGlobal pMac, tpDphHashNode pStaDs,
tpPESession psessionEntry);

/**
* lim_send_mlm_assoc_ind() - Sends assoc indication to SME
* @mac_ctx: Global Mac context
* @sta_ds: Station DPH hash entry
* @session_entry: PE session entry
*
* This function sends either LIM_MLM_ASSOC_IND
* or LIM_MLM_REASSOC_IND to SME.
*
* Return: QDF_STATUS
*/
QDF_STATUS lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
tpDphHashNode sta_ds,
tpPESession session_entry);

void lim_process_assoc_rsp_frame(tpAniSirGlobal, uint8_t *, uint8_t, tpPESession);
void lim_process_disassoc_frame(tpAniSirGlobal, uint8_t *, tpPESession);
Expand Down

0 comments on commit ea0aa45

Please sign in to comment.