Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e9b8131 authored by Srinivas Dasari's avatar Srinivas Dasari Committed by Gerrit - the friendly Code Review server
Browse files

qcacld-3.0: Send assoc reject upon failing to post ASSOC_IND

Currently, lim silently drops the association if it fails to
post ASSOC_IND due to some reason(e.g. invalid contents of
assoc request) and the MLM state is stuck in
eLIM_MLM_WT_ASSOC_CNF_STATE. Station context is not cleaned up
till the next association. Gracefully cleanup the association
in such failure cases.

Change-Id: Iede43a1ddc4ac6ef300af02776b153b58dd70c2c
CRs-Fixed: 2810235
parent 79cbff8e
Loading
Loading
Loading
Loading
+8 −18
Original line number Diff line number Diff line
@@ -2960,19 +2960,9 @@ bool lim_fill_lim_assoc_ind_params(
	return true;
}

/**
 * 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(struct mac_context *mac_ctx,
	tpDphHashNode sta_ds, struct pe_session *session_entry)
QDF_STATUS lim_send_mlm_assoc_ind(struct mac_context *mac_ctx,
				  tpDphHashNode sta_ds,
				  struct pe_session *session_entry)
{
	tpLimMlmAssocInd assoc_ind;
	tpSirAssocReq assoc_req;
@@ -2982,7 +2972,7 @@ void lim_send_mlm_assoc_ind(struct mac_context *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 */
@@ -2991,7 +2981,7 @@ void lim_send_mlm_assoc_ind(struct mac_context *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 */
@@ -3015,17 +3005,17 @@ void lim_send_mlm_assoc_ind(struct mac_context *mac_ctx,
		if (!assoc_ind) {
			lim_release_peer_idx(mac_ctx, sta_ds->assocId,
					     session_entry);
			return;
			return QDF_STATUS_E_INVAL;
		}
		if (!lim_fill_lim_assoc_ind_params(assoc_ind, mac_ctx,
						   sta_ds, session_entry)) {
			qdf_mem_free(assoc_ind);
			return;
			return QDF_STATUS_E_INVAL;
		}
		lim_post_sme_message(mac_ctx, LIM_MLM_ASSOC_IND,
				     (uint32_t *)assoc_ind);
		qdf_mem_free(assoc_ind);
	}

	return;
	return QDF_STATUS_SUCCESS;
}
+8 −1
Original line number Diff line number Diff line
@@ -1941,7 +1941,14 @@ void lim_process_ap_mlm_add_sta_rsp(struct mac_context *mac,
	 * 2) PE receives eWNI_SME_ASSOC_CNF from SME
	 * 3) BTAMP-AP sends Re/Association Response to BTAMP-STA
	 */
	lim_send_mlm_assoc_ind(mac, sta, pe_session);
	if (lim_send_mlm_assoc_ind(mac, sta, pe_session) != QDF_STATUS_SUCCESS)
		lim_reject_association(mac, sta->staAddr,
				       sta->mlmStaContext.subType,
				       true, sta->mlmStaContext.authType,
				       sta->assocId, true,
				       eSIR_MAC_UNSPEC_FAILURE_STATUS,
				       pe_session);

	/* fall though to reclaim the original Add STA Response message */
end:
	if (0 != limMsgQ->bodyptr) {
+15 −2
Original line number Diff line number Diff line
@@ -446,7 +446,20 @@ lim_fill_sme_assoc_ind_params(
	struct mac_context *mac_ctx,
	tpLimMlmAssocInd assoc_ind, struct assoc_ind *sme_assoc_ind,
	struct pe_session *session_entry, bool assoc_req_alloc);
void lim_send_mlm_assoc_ind(struct mac_context *mac, tpDphHashNode sta,

/**
 * 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(struct mac_context *mac,
				  tpDphHashNode sta,
				  struct pe_session *pe_session);

void lim_process_assoc_rsp_frame(struct mac_context *, uint8_t *, uint8_t, struct pe_session *);