From 007fd086526fc2b495715758e61cb5cc09d36ecf Mon Sep 17 00:00:00 2001 From: Ananya Gupta Date: Fri, 23 Sep 2022 09:31:28 +0530 Subject: [PATCH] qcacld-3.0: Pause Tx when bus suspend in progress In SAP due to intrabss forwarding, Tx ring update is going through when WOW enable command has been sent to FW. This results in crash. To fix this, set is_tx_pause flag when suspend sequence starts, which will pause Tx ring HP update. Change-Id: I81f25b8bfca917c95180c460fd932c0f75094c10 CRs-Fixed: 3295428 --- core/dp/txrx3.0/dp_txrx.h | 4 ++++ core/hdd/src/wlan_hdd_tx_rx.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/dp/txrx3.0/dp_txrx.h b/core/dp/txrx3.0/dp_txrx.h index de2a3cf30feb..065b6c170d05 100644 --- a/core/dp/txrx3.0/dp_txrx.h +++ b/core/dp/txrx3.0/dp_txrx.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 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 @@ -202,6 +203,8 @@ static inline QDF_STATUS dp_txrx_resume(ol_txrx_soc_handle soc) goto ret; } + cdp_set_tx_pause(soc, false); + refill_thread = &dp_ext_hdl->refill_thread; if (refill_thread->enabled) { qdf_status = dp_rx_refill_thread_resume(refill_thread); @@ -248,6 +251,7 @@ static inline QDF_STATUS dp_txrx_suspend(ol_txrx_soc_handle soc) if (QDF_IS_STATUS_ERROR(qdf_status) && refill_thread->enabled) dp_rx_refill_thread_resume(refill_thread); + cdp_set_tx_pause(soc, true); ret: return qdf_status; } diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index f4ffa2002ce9..39de8384548a 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-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 @@ -1029,7 +1029,8 @@ static void __hdd_hard_start_xmit(struct sk_buff *skb, if (wlan_hdd_validate_context(hdd_ctx)) goto drop_pkt; - if (hdd_ctx->hdd_wlan_suspended) { + if (qdf_unlikely(!hdd_ctx || hdd_ctx->hdd_wlan_suspended || + hdd_ctx->hdd_wlan_suspend_in_progress)) { hdd_err_rl("Device is system suspended, drop pkt"); goto drop_pkt; }