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

Commit a5e7c6d8 authored by Pragaspathi Thilagaraj's avatar Pragaspathi Thilagaraj
Browse files

qcacld-3.0: Reset wait for hw mode change event

Hw mode change in progress is set after the set_hw_mode
command is queued in serialization. Its not reset in below
cases:
Active command timeout case, serialization command
cancelled case.

Before connect request is queued, if hw mode change is in
progress, there is 6 secs wait and if there is no hw mode
change response, connection failure. This causes subsequent
connection failures and there is no recovery.

Reset the wait for hw mode change event in serialization
command failure cases.

Change-Id: I716982f06198e9c3495685ddb158044778c4b1ff
CRs-Fixed: 3256424
parent d7ec4582
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1967,6 +1967,14 @@ QDF_STATUS policy_mgr_wait_for_connection_update(
 */
QDF_STATUS policy_mgr_reset_connection_update(struct wlan_objmgr_psoc *psoc);

/**
 * policy_mgr_reset_hw_mode_change() - Reset the hw mode change.
 * @psoc: Pointer to PSOC object
 *
 * Return: none
 */
void policy_mgr_reset_hw_mode_change(struct wlan_objmgr_psoc *psoc);

/**
 * policy_mgr_set_connection_update() - Set connection update
 * event
+8 −0
Original line number Diff line number Diff line
@@ -2609,6 +2609,14 @@ QDF_STATUS policy_mgr_reset_connection_update(struct wlan_objmgr_psoc *psoc)
	return QDF_STATUS_SUCCESS;
}

void policy_mgr_reset_hw_mode_change(struct wlan_objmgr_psoc *psoc)
{
	policy_mgr_err("Clear hw mode change and connection update evt");
	policy_mgr_set_hw_mode_change_in_progress(
			psoc, POLICY_MGR_HW_MODE_NOT_IN_PROGRESS);
	policy_mgr_reset_connection_update(psoc);
}

QDF_STATUS policy_mgr_set_connection_update(struct wlan_objmgr_psoc *psoc)
{
	QDF_STATUS status;
+6 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-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
@@ -615,6 +615,8 @@ QDF_STATUS sme_ser_cmd_callback(struct wlan_serialization_command *cmd,
		status = sme_ser_handle_active_cmd(cmd);
		break;
	case WLAN_SER_CB_CANCEL_CMD:
		if (cmd->cmd_type == WLAN_SER_CMD_SET_HW_MODE)
			policy_mgr_reset_hw_mode_change(mac_ctx->psoc);
		break;
	case WLAN_SER_CB_RELEASE_MEM_CMD:
		if (cmd->vdev)
@@ -629,6 +631,9 @@ QDF_STATUS sme_ser_cmd_callback(struct wlan_serialization_command *cmd,
		    sme_cmd->command == eSmeCommandWmStatusChange))
			qdf_trigger_self_recovery(mac_ctx->psoc,
						  QDF_ACTIVE_LIST_TIMEOUT);

		if (cmd->cmd_type == WLAN_SER_CMD_SET_HW_MODE)
			policy_mgr_reset_hw_mode_change(mac_ctx->psoc);
		break;
	default:
		sme_debug("unknown reason code");