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

Commit f581e710 authored by Ananya Gupta's avatar Ananya Gupta
Browse files

qcacmn: Pause Tx HW enqueue 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, do not update HP when apps suspend is in progress.

Change-Id: Id4176224563bdd759828397fa1cd23de1598192e
CRs-Fixed: 3294407
parent b8b1b51f
Loading
Loading
Loading
Loading
+25 −1
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
@@ -2047,6 +2047,30 @@ cdp_txrx_set_pdev_status_down(ol_txrx_soc_handle soc,
						    is_pdev_down);
}

/**
 * cdp_set_tx_pause() - Pause or resume tx path
 * @soc_hdl: Datapath soc handle
 * @flag: set or clear is_tx_pause
 *
 * Return: None.
 */
static inline
void cdp_set_tx_pause(ol_txrx_soc_handle soc, bool flag)
{
	if (!soc || !soc->ops) {
		QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
			  "%s: Invalid Instance:", __func__);
		QDF_BUG(0);
		return;
	}

	if (!soc->ops->cmn_drv_ops ||
				!soc->ops->cmn_drv_ops->set_tx_pause)
		return;

	soc->ops->cmn_drv_ops->set_tx_pause(soc, flag);
}

/**
 * cdp_tx_send() - enqueue frame for transmission
 * @soc: soc opaque handle
+4 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2017-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
@@ -519,6 +519,9 @@ struct cdp_cmn_ops {
				    uint32_t value);

	ol_txrx_tx_fp tx_send;

	void (*set_tx_pause)(ol_txrx_soc_handle soc, bool flag);

	/**
	 * txrx_get_os_rx_handles_from_vdev() - Return function, osif vdev
	 *					to deliver pkt to stack.
+17 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-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
@@ -11339,6 +11339,21 @@ dp_set_pkt_capture_mode(struct cdp_soc_t *soc_handle, bool val)
}
#endif

/**
 * dp_set_tx_pause() - Pause or resume tx path
 * @soc_hdl: Datapath soc handle
 * @flag: set or clear is_tx_pause
 *
 * Return: None.
 */
static inline
void dp_set_tx_pause(struct cdp_soc_t *soc_hdl, bool flag)
{
	struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);

	soc->is_tx_pause = flag;
}

static struct cdp_cmn_ops dp_ops_cmn = {
	.txrx_soc_attach_target = dp_soc_attach_target_wifi3,
	.txrx_vdev_attach = dp_vdev_attach_wifi3,
@@ -11411,6 +11426,7 @@ static struct cdp_cmn_ops dp_ops_cmn = {
	.txrx_set_ba_aging_timeout = dp_set_ba_aging_timeout,
	.txrx_get_ba_aging_timeout = dp_get_ba_aging_timeout,
	.tx_send = dp_tx_send,
	.set_tx_pause = dp_set_tx_pause,
	.txrx_peer_reset_ast = dp_wds_reset_ast_wifi3,
	.txrx_peer_reset_ast_table = dp_wds_reset_ast_table_wifi3,
	.txrx_peer_flush_ast_table = dp_wds_flush_ast_table_wifi3,
+2 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-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
@@ -1926,6 +1926,7 @@ struct dp_soc {
	qdf_spinlock_t reo_desc_deferred_freelist_lock;
	bool reo_desc_deferred_freelist_init;
#endif
	bool is_tx_pause;
};

#ifdef IPA_OFFLOAD