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

Commit 91950513 authored by Ananya Gupta's avatar Ananya Gupta Committed by Rahul Choudhary
Browse files

qcacld-3.0: Drop packets if suspend in progress

Currently, there is a race condition where packet gets
enqueued when WOW handshake is being done in parallel during
bus suspend resulting in assert in FW as Tx is aborted when
WOW command is received in FW.
To fix this, hdd_wlan_suspend_in_progress flag is set to drop
packets in SAP mode when APSS suspend is in progress.

Change-Id: I38a6a6bdf9858f627205f75f75f351f7debbb7f7
CRs-Fixed: 3227752
parent 54e06bfd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1937,6 +1937,7 @@ struct hdd_context {
	bool is_ol_rx_thread_suspended;
#endif

	bool hdd_wlan_suspend_in_progress;
	bool hdd_wlan_suspended;
	bool suspended;
	/* flag to start pktlog after SSR/PDR if previously enabled */
+7 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2021 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
@@ -1496,12 +1496,17 @@ hdd_suspend_wlan(void)
		hdd_adapter_dev_put_debug(adapter, NET_DEV_HOLD_SUSPEND_WLAN);
	}

	hdd_ctx->hdd_wlan_suspend_in_progress = true;

	status = ucfg_pmo_psoc_user_space_suspend_req(hdd_ctx->psoc,
						      QDF_SYSTEM_SUSPEND);
	if (status != QDF_STATUS_SUCCESS)
	if (status != QDF_STATUS_SUCCESS) {
		hdd_ctx->hdd_wlan_suspend_in_progress = false;
		return -EAGAIN;
	}

	hdd_ctx->hdd_wlan_suspended = true;
	hdd_ctx->hdd_wlan_suspend_in_progress = false;

	hdd_configure_sar_sleep_index(hdd_ctx);

+3 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2021 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
@@ -551,7 +551,8 @@ static void __hdd_softap_hard_start_xmit(struct sk_buff *skb,
		goto drop_pkt;
	}

	if (hdd_ctx->hdd_wlan_suspended) {
	if (qdf_unlikely(hdd_ctx->hdd_wlan_suspended ||
			 hdd_ctx->hdd_wlan_suspend_in_progress)) {
		hdd_err_rl("Device is system suspended, drop pkt");
		goto drop_pkt;
	}