xref: /freebsd/sys/contrib/dev/iwlwifi/fw/pnvm.h (revision 9af1bba4)
1bfcc09ddSBjoern A. Zeeb /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
29af1bba4SBjoern A. Zeeb /*
39af1bba4SBjoern A. Zeeb  * Copyright(c) 2020-2023 Intel Corporation
49af1bba4SBjoern A. Zeeb  */
5bfcc09ddSBjoern A. Zeeb #ifndef __IWL_PNVM_H__
6bfcc09ddSBjoern A. Zeeb #define __IWL_PNVM_H__
7bfcc09ddSBjoern A. Zeeb 
89af1bba4SBjoern A. Zeeb #include "iwl-drv.h"
9bfcc09ddSBjoern A. Zeeb #include "fw/notif-wait.h"
10bfcc09ddSBjoern A. Zeeb 
11bfcc09ddSBjoern A. Zeeb #define MVM_UCODE_PNVM_TIMEOUT	(HZ / 4)
12bfcc09ddSBjoern A. Zeeb 
13bfcc09ddSBjoern A. Zeeb #define MAX_PNVM_NAME  64
14bfcc09ddSBjoern A. Zeeb 
15bfcc09ddSBjoern A. Zeeb int iwl_pnvm_load(struct iwl_trans *trans,
169af1bba4SBjoern A. Zeeb 		  struct iwl_notif_wait_data *notif_wait,
179af1bba4SBjoern A. Zeeb 		  const struct iwl_ucode_capabilities *capa);
18bfcc09ddSBjoern A. Zeeb 
19bfcc09ddSBjoern A. Zeeb static inline
iwl_pnvm_get_fs_name(struct iwl_trans * trans,u8 * pnvm_name,size_t max_len)20bfcc09ddSBjoern A. Zeeb void iwl_pnvm_get_fs_name(struct iwl_trans *trans,
21bfcc09ddSBjoern A. Zeeb 			  u8 *pnvm_name, size_t max_len)
22bfcc09ddSBjoern A. Zeeb {
239af1bba4SBjoern A. Zeeb 	char _fw_name_pre[FW_NAME_PRE_BUFSIZE];
24bfcc09ddSBjoern A. Zeeb 
259af1bba4SBjoern A. Zeeb 	snprintf(pnvm_name, max_len, "%s.pnvm",
269af1bba4SBjoern A. Zeeb 		 iwl_drv_get_fwname_pre(trans, _fw_name_pre));
27bfcc09ddSBjoern A. Zeeb }
28bfcc09ddSBjoern A. Zeeb 
29bfcc09ddSBjoern A. Zeeb #endif /* __IWL_PNVM_H__ */
30