1 /*
2  * Copyright (c) 2024 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 /**
8  * @file bal_structs.h
9  *
10  * @brief Header containing the structure declarations for the Bus Abstraction
11  * Layer (BAL) of the Wi-Fi driver.
12  */
13 
14 #ifndef __BAL_STRUCTS_H__
15 #define __BAL_STRUCTS_H__
16 
17 #include "osal_ops.h"
18 #include "bal_ops.h"
19 
20 /**
21  * @brief Structure holding configuration parameters for the BAL.
22  */
23 struct nrf_wifi_bal_cfg_params {
24 	/** Base address of the packet RAM. */
25 	unsigned long addr_pktram_base;
26 };
27 
28 /**
29  * @brief Structure holding context information for the BAL.
30  */
31 struct nrf_wifi_bal_priv {
32 	/** Pointer to a specific bus context. */
33 	void *bus_priv;
34 	/** Pointer to bus operations provided by a specific bus implementation. */
35 	struct nrf_wifi_bal_ops *ops;
36 	/** Callback function for device initialization. */
37 	enum nrf_wifi_status (*init_dev_callbk_fn)(void *ctx);
38 	/** Callback function for device deinitialization. */
39 	void (*deinit_dev_callbk_fn)(void *ctx);
40 	/** Callback function for handling interrupts. */
41 	enum nrf_wifi_status (*intr_callbk_fn)(void *ctx);
42 };
43 
44 /**
45  * @brief Structure holding the device context for the BAL.
46  */
47 struct nrf_wifi_bal_dev_ctx {
48 	/** Pointer to the BAL private context. */
49 	struct nrf_wifi_bal_priv *bpriv;
50 	/** Pointer to the HAL device context. */
51 	void *hal_dev_ctx;
52 	/** Pointer to the bus device context. */
53 	void *bus_dev_ctx;
54 #ifdef NRF_WIFI_LOW_POWER
55 	/** Flag indicating if the RPU firmware has booted. */
56 	bool rpu_fw_booted;
57 #endif /* NRF_WIFI_LOW_POWER */
58 };
59 
60 #endif /* __BAL_STRUCTS_H__ */
61