nrfxlib API 0.1.0
Loading...
Searching...
No Matches
hal_api.h
Go to the documentation of this file.
1
7#ifndef __HAL_API_H__
8#define __HAL_API_H__
9
10#include "osal_api.h"
11#include "rpu_if.h"
12#include "bal_api.h"
13#include "hal_structs.h"
14#include "hal_mem.h"
15#include "hal_reg.h"
16#include "hal_fw_patch_loader.h"
17
18#define NRF_WIFI_ADDR_REG_NAME_LEN 16
19
29 unsigned int dest_addr;
30};
31
32extern const struct nrf70_fw_addr_info nrf70_fw_addr_info[];
33
49struct nrf_wifi_hal_priv *
51 enum nrf_wifi_status (*intr_callbk_fn)(void *mac_ctx,
52 void *event_data,
53 unsigned int len),
54 enum nrf_wifi_status (*rpu_recovery_callbk_fn)(void *mac_ctx,
55 void *event_data,
56 unsigned int len));
57
69
71 void *mac_dev_ctx);
72
73
75
76
78
79
81
83
85
86void nrf_wifi_hal_enable(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx);
89
90
91
115 void *cmd,
116 unsigned int cmd_size);
117
118
136 enum NRF_WIFI_HAL_MSG_TYPE cmd_type,
137 void *data_cmd,
138 unsigned int data_cmd_size,
139 unsigned int desc_id,
140 unsigned int pool_id);
141
156
157
171unsigned long nrf_wifi_hal_buf_map_rx(struct nrf_wifi_hal_dev_ctx *hal_ctx,
172 unsigned long buf,
173 unsigned int buf_len,
174 unsigned int pool_id,
175 unsigned int buf_id);
176
190 unsigned int data_len,
191 unsigned int pool_id,
192 unsigned int buf_id);
193
208unsigned long nrf_wifi_hal_buf_map_tx(struct nrf_wifi_hal_dev_ctx *hal_ctx,
209 unsigned long buf,
210 unsigned int buf_len,
211 unsigned int desc_id,
212 unsigned int token,
213 unsigned int buf_indx);
214
226 unsigned int desc_id);
227
237 enum RPU_PROC_TYPE proc);
238
250 enum RPU_PROC_TYPE rpu_proc);
251
263 enum RPU_PROC_TYPE rpu_proc);
264
265#if defined(CONFIG_NRF_WIFI_LOW_POWER) || defined(__DOXYGEN__)
275enum nrf_wifi_status hal_rpu_ps_wake(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx);
276
287enum nrf_wifi_status nrf_wifi_hal_get_rpu_ps_state(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx,
288 int *rpu_ps_ctrl_state);
289#endif /* CONFIG_NRF_WIFI_LOW_POWER */
290
303 struct host_rpu_umac_info *otp_info,
304 unsigned int *otp_flags);
305
317 unsigned int *ft_prog_ver);
318
330 unsigned int *package_info);
331
332#endif /* __HAL_API_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.
unsigned long nrf_wifi_hal_buf_unmap_rx(struct nrf_wifi_hal_dev_ctx *hal_ctx, unsigned int data_len, unsigned int pool_id, unsigned int buf_id)
Unmap a receive buffer from 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)
unsigned long nrf_wifi_hal_buf_unmap_tx(struct nrf_wifi_hal_dev_ctx *hal_ctx, unsigned int desc_id)
Unmap a transmit buffer from the Wi-Fi HAL.
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)
unsigned long nrf_wifi_hal_buf_map_tx(struct nrf_wifi_hal_dev_ctx *hal_ctx, unsigned long buf, unsigned int buf_len, unsigned int desc_id, unsigned int token, unsigned int buf_indx)
Map a transmit buffer for the Wi-Fi HAL.
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.
enum nrf_wifi_status nrf_wifi_hal_data_cmd_send(struct nrf_wifi_hal_dev_ctx *hal_ctx, enum NRF_WIFI_HAL_MSG_TYPE cmd_type, void *data_cmd, unsigned int data_cmd_size, unsigned int desc_id, unsigned int pool_id)
Send a data command to the RPU.
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.
void nrf_wifi_hal_unlock_rx(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx)
unsigned long nrf_wifi_hal_buf_map_rx(struct nrf_wifi_hal_dev_ctx *hal_ctx, unsigned long buf, unsigned int buf_len, unsigned int pool_id, unsigned int buf_id)
Map a receive buffer 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.h:18
void nrf_wifi_hal_enable(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx)
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 *mac_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.
struct nrf_wifi_hal_dev_ctx * nrf_wifi_hal_dev_add(struct nrf_wifi_hal_priv *hpriv, void *mac_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.
void nrf_wifi_hal_lock_rx(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx)
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.h:107
NRF_WIFI_HAL_MSG_TYPE
Enumeration of NRF Wi-Fi HAL message types.
Definition: hal_structs.h:75
RPU_PROC_TYPE
Enumeration of RPU processor types.
Definition: hal_structs.h:32
Header containing structure declarations for the HAL Layer of the Wi-Fi driver.
nrf_wifi_status
The status of an operation performed by the RPU driver.
Definition: osal_structs.h:29
ft_prog_ver
Definition: phy_rf_params.h:589
Common structures and definitions for RPU interface.
This structure represents the information related to UMAC.
Definition: host_rpu_common_if.h:112
enum RPU_PROC_TYPE rpu_proc
Definition: hal_api.h:25
char name[16]
Definition: hal_api.h:27
unsigned int dest_addr
Definition: hal_api.h:29
Structure containing information about the firmware address.
Definition: hal_api.h:23
Structure to hold configuration parameters for the HAL layer.
Definition: hal_structs.h:117
struct nrf_wifi_hal_priv * hpriv
Definition: hal_structs.h:203
void * mac_dev_ctx
Definition: hal_structs.h:205
Structure to hold per device context information for the HAL layer.
Definition: hal_structs.h:201
enum nrf_wifi_status(* intr_callbk_fn)(void *mac_ctx, void *event_data, unsigned int len)
Definition: hal_structs.h:160
struct nrf_wifi_hal_cfg_params cfg_params
Definition: hal_structs.h:167
enum nrf_wifi_status(* rpu_recovery_callbk_fn)(void *mac_ctx, void *event_data, unsigned int len)
Definition: hal_structs.h:164
Structure to hold context information for the HAL layer.
Definition: hal_structs.h:144