nRF WiFi
Loading...
Searching...
No Matches
hal_api_common.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
13#ifndef __HAL_API_COMMON_H__
14#define __HAL_API_COMMON_H__
15
16#include "osal_api.h"
17#include "rpu_if.h"
18
19#include "bal_api.h"
20#include "hal_structs_common.h"
21#include "hal_mem.h"
22#include "hal_reg.h"
23#include "hal_fw_patch_loader.h"
24
25#define NRF_WIFI_ADDR_REG_NAME_LEN 16
26
38
39extern const struct nrf70_fw_addr_info nrf70_fw_addr_info[];
40
56struct nrf_wifi_hal_priv *
58 enum nrf_wifi_status (*intr_callbk_fn)(void *dev_ctx,
59 void *event_data,
60 unsigned int len),
61 enum nrf_wifi_status (*rpu_recovery_callbk_fn)(void *mac_ctx,
62 void *event_data,
63 unsigned int len));
64
74
76
78
80
81void nrf_wifi_hal_enable(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx);
84
108 void *cmd,
109 unsigned int cmd_size);
110
111
126
127
137 enum RPU_PROC_TYPE proc);
138
150 enum RPU_PROC_TYPE rpu_proc);
151
163 enum RPU_PROC_TYPE rpu_proc);
164
165#if defined(NRF_WIFI_LOW_POWER) || defined(__DOXYGEN__)
176
188 int *rpu_ps_ctrl_state);
189#endif /* NRF_WIFI_LOW_POWER */
190
203 struct host_rpu_umac_info *otp_info,
204 unsigned int *otp_flags);
205
217 unsigned int *ft_prog_ver);
218
230 unsigned int *package_info);
231
233
235
237 enum NRF_WIFI_HAL_MSG_TYPE msg_type,
238 unsigned int queue_id,
239 unsigned int msg_addr);
240#endif /* __HAL_API_COMMON_H__ */
enum nrf_wifi_status nrf_wifi_hal_proc_reset(struct nrf_wifi_hal_dev_ctx *hal_ctx, enum RPU_PROC_TYPE rpu_proc)
Reset the processing context for the Wi-Fi HAL.
enum nrf_wifi_status hal_rpu_eventq_process(struct nrf_wifi_hal_dev_ctx *hal_ctx)
Process events from the RPU.
enum nrf_wifi_status nrf_wifi_hal_otp_pack_info_get(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx, unsigned int *package_info)
Get the OTP package information for the Wi-Fi HAL.
enum NRF_WIFI_HAL_STATUS nrf_wifi_hal_status_unlocked(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx)
void nrf_wifi_hal_dev_rem(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx)
enum nrf_wifi_status hal_rpu_ps_init(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx)
enum nrf_wifi_status nrf_wifi_hal_otp_ft_prog_ver_get(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx, unsigned int *ft_prog_ver)
Get the OTP firmware programming version for the Wi-Fi HAL.
enum nrf_wifi_status nrf_wifi_hal_otp_info_get(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx, struct host_rpu_umac_info *otp_info, unsigned int *otp_flags)
Get the OTP information for the Wi-Fi HAL.
void nrf_wifi_hal_disable(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx)
enum nrf_wifi_status nrf_wifi_hal_dev_init(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx)
void nrf_wifi_hal_proc_ctx_set(struct nrf_wifi_hal_dev_ctx *hal_ctx, enum RPU_PROC_TYPE proc)
Set the processing context for the Wi-Fi HAL.
void nrf_wifi_hal_deinit(struct nrf_wifi_hal_priv *hpriv)
Deinitialize the HAL layer.
enum nrf_wifi_status nrf_wifi_hal_ctrl_cmd_send(struct nrf_wifi_hal_dev_ctx *hal_ctx, void *cmd, unsigned int cmd_size)
Send a control command to the RPU.
enum nrf_wifi_status nrf_wifi_hal_irq_handler(void *data)
struct nrf_wifi_hal_priv * nrf_wifi_hal_init(struct nrf_wifi_hal_cfg_params *cfg_params, enum nrf_wifi_status(*intr_callbk_fn)(void *dev_ctx, void *event_data, unsigned int len), enum nrf_wifi_status(*rpu_recovery_callbk_fn)(void *mac_ctx, void *event_data, unsigned int len))
Initialize the HAL layer.
enum nrf_wifi_status hal_rpu_ps_wake(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx)
Wake up the RPU power save mode for the Wi-Fi HAL.
enum nrf_wifi_status nrf_wifi_hal_get_rpu_ps_state(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx, int *rpu_ps_ctrl_state)
Get the RPU power save state for the Wi-Fi HAL.
void nrf_wifi_hal_dev_deinit(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx)
#define NRF_WIFI_ADDR_REG_NAME_LEN
Definition hal_api_common.h:25
enum nrf_wifi_status hal_rpu_msg_post(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx, enum NRF_WIFI_HAL_MSG_TYPE msg_type, unsigned int queue_id, unsigned int msg_addr)
void nrf_wifi_hal_enable(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx)
enum nrf_wifi_status nrf_wifi_hal_fw_chk_boot(struct nrf_wifi_hal_dev_ctx *hal_ctx, enum RPU_PROC_TYPE rpu_proc)
Check the boot status of the firmware for the Wi-Fi HAL.
Header containing memory read/write specific declarations for the HAL Layer of the Wi-Fi driver.
Header containing register read/write specific declarations for the HAL Layer of the Wi-Fi driver.
NRF_WIFI_HAL_STATUS
Enumeration of NRF WiFi HAL status.
Definition hal_structs_common.h:107
NRF_WIFI_HAL_MSG_TYPE
Enumeration of NRF Wi-Fi HAL message types.
Definition hal_structs_common.h:75
RPU_PROC_TYPE
Enumeration of RPU processor types.
Definition hal_structs_common.h:32
Header containing structure declarations for the HAL Layer of the Wi-Fi driver.
unsigned int cmd
Definition host_rpu_data_if.h:1
unsigned int len
Definition host_rpu_data_if.h:3
nrf_wifi_status
The status of an operation performed by the RPU driver.
Definition osal_structs.h:39
ft_prog_ver
Definition phy_rf_params_common.h:468
Common structures and definitions for RPU interface.
This structure represents the information related to UMAC.
Definition host_rpu_common_if.h:111
enum RPU_PROC_TYPE rpu_proc
Definition hal_api_common.h:32
char name[16]
Definition hal_api_common.h:34
unsigned int dest_addr
Definition hal_api_common.h:36
Structure containing information about the firmware address.
Definition hal_api_common.h:30
Structure to hold configuration parameters for the HAL layer in all modes of operation.
Definition hal_structs_common.h:144
Structure to hold per device context information for the HAL layer.
Definition hal_structs_common.h:201
enum nrf_wifi_status(* intr_callbk_fn)(void *mac_ctx, void *event_data, unsigned int len)
Definition hal_structs_common.h:186
struct nrf_wifi_hal_cfg_params cfg_params
Definition hal_structs_common.h:193
enum nrf_wifi_status(* rpu_recovery_callbk_fn)(void *mac_ctx, void *event_data, unsigned int len)
Definition hal_structs_common.h:190
Structure to hold context information for the HAL layer.
Definition hal_structs_common.h:169