diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2021-06-21 10:37:35 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2021-06-22 16:57:57 +0300 |
commit | 84c3c9952afbf7df39937095aa0ad70b58703e91 (patch) | |
tree | 7ce2a037197ab0da19422e1e4840c8346991598e /drivers/net/wireless/intel/iwlwifi/fw/uefi.h | |
parent | 5c157941cda00e9a1127a7a909177900f9195e19 (diff) |
iwlwifi: move UEFI code to a separate file
We are going to read more variables from UEFI, so it's cleaner to have
all the code that handles UEFI variables in a separate file.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210621103449.c705ac86f2e9.Ia7421c17fe52929e4098b4f0cf070809ed3ef906@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/uefi.h')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/uefi.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/uefi.h b/drivers/net/wireless/intel/iwlwifi/fw/uefi.h new file mode 100644 index 000000000000..48f1b54e3e76 --- /dev/null +++ b/drivers/net/wireless/intel/iwlwifi/fw/uefi.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ +/* + * Copyright(c) 2021 Intel Corporation + */ + + +#define IWL_UEFI_OEM_PNVM_NAME L"UefiCnvWlanOemSignedPnvm" + +/* + * TODO: we have these hardcoded values that the caller must pass, + * because reading from the UEFI is not working. To implement this + * properly, we have to change iwl_pnvm_get_from_uefi() to call + * efivar_entry_size() and return the value to the caller instead. + */ +#define IWL_HARDCODED_PNVM_SIZE 4096 + +#ifdef CONFIG_EFI +void *iwl_uefi_get_pnvm(struct iwl_trans *trans, size_t *len); +#else /* CONFIG_EFI */ +static inline +void *iwl_uefi_get_pnvm(struct iwl_trans *trans, size_t *len) +{ + return ERR_PTR(-EOPNOTSUPP); +} +#endif /* CONFIG_EFI */ |