1 /* 2 * Copyright (c) 2024 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 /** 8 * @brief Header containing patch loader specific declarations for the 9 * HAL Layer of the Wi-Fi driver. 10 */ 11 12 #ifndef __HAL_FW_PATCH_LOADER_H__ 13 #define __HAL_FW_PATCH_LOADER_H__ 14 15 #include "hal_structs_common.h" 16 17 enum nrf_wifi_fw_patch_type { 18 NRF_WIFI_FW_PATCH_TYPE_PRI, 19 NRF_WIFI_FW_PATCH_TYPE_SEC, 20 NRF_WIFI_FW_PATCH_TYPE_MAX 21 }; 22 23 24 /* Loads a firmware patch chunk into RPU memory. */ 25 enum nrf_wifi_status hal_fw_patch_chunk_load(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx, 26 enum RPU_PROC_TYPE rpu_proc, 27 unsigned int dest_addr, 28 const void *fw_chunk_data, 29 unsigned int fw_chunk_size); 30 /* 31 * Downloads a firmware patch into RPU memory. 32 */ 33 enum nrf_wifi_status nrf_wifi_hal_fw_patch_load(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx, 34 enum RPU_PROC_TYPE rpu_proc, 35 const void *fw_pri_patch_data, 36 unsigned int fw_pri_patch_size, 37 const void *fw_sec_patch_data, 38 unsigned int fw_sec_patch_size); 39 40 enum nrf_wifi_status nrf_wifi_hal_fw_patch_boot(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx, 41 enum RPU_PROC_TYPE rpu_proc, 42 bool is_patch_present); 43 #endif /* __HAL_FW_PATCH_LOADER_H__ */ 44