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
This commit is contained in:
Ananya Gupta 2022-09-23 09:31:28 +05:30 • committed by Rahul Choudhary
commit 007fd08652
2 changed files with 7 additions and 2 deletions

View file

@ -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;
}

View file

@ -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;
}