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

Commit 55fba476 authored by Pragaspathi Thilagaraj's avatar Pragaspathi Thilagaraj
Browse files

qcacld-3.0: Defer messages to LIM during peer create

Before sending peer create command to firmware, defer the
messages to LIM so that peer create confirm event is
protected from disconnect. If the messages are not defered,
disconnect gets processed and the lim timers are not
aborted as part of disconnect sequence and back to back
connect followed by disconnect causes ANR

Defer the LIM messages during peer create and allow the messages
after peer create confirm is received.

Change-Id: Ifffbb4897a4fa85dd83c94eb84be72295905b785
CRs-Fixed: 3421721
parent 29620f09
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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
@@ -356,6 +356,11 @@ lim_post_join_set_link_state_callback(struct mac_context *mac, uint32_t vdev_id,
	tLimMlmJoinCnf mlm_join_cnf;
	struct pe_session *session_entry;

	/*
	 * Allow defered messages after peer create response
	 */
	SET_LIM_PROCESS_DEFD_MESGS(mac, true);

	session_entry = pe_find_session_by_vdev_id(mac, vdev_id);
	if (!session_entry) {
		pe_err("vdev_id:%d PE session is NULL", vdev_id);
@@ -406,13 +411,22 @@ static void
lim_process_mlm_post_join_suspend_link(struct mac_context *mac_ctx,
				       struct pe_session *session)
{
	QDF_STATUS status;

	lim_deactivate_and_change_timer(mac_ctx, eLIM_JOIN_FAIL_TIMER);

	/* assign appropriate sessionId to the timer object */
	mac_ctx->lim.lim_timers.gLimJoinFailureTimer.sessionId =
		session->peSessionId;

	wma_add_bss_peer_sta(session->vdev_id, session->bssId, true);
	/*
	 * Defer msgs to LIM till peer create  confirm event is received
	 */
	SET_LIM_PROCESS_DEFD_MESGS(mac_ctx, false);
	status = wma_add_bss_peer_sta(session->vdev_id, session->bssId, true);
	if (status == QDF_STATUS_E_RESOURCES)
		SET_LIM_PROCESS_DEFD_MESGS(mac_ctx, true);

}

/**
+3 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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
@@ -1924,6 +1924,7 @@ wma_create_sta_mode_bss_peer(tp_wma_handle wma,

	if (!mac) {
		wma_err("vdev%d: Mac context is null", vdev_id);
		status = QDF_STATUS_E_RESOURCES;
		return status;
	}

@@ -5339,6 +5340,7 @@ QDF_STATUS wma_add_bss_peer_sta(uint8_t vdev_id, uint8_t *bssid,
	wma = cds_get_context(QDF_MODULE_ID_WMA);
	if (!wma) {
		wma_err("Invalid wma");
		status = QDF_STATUS_E_RESOURCES;
		goto err;
	}