mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00

We still don't use #pragma once in the kernel, but even if
we did it'd be missing. Add the missing include guards.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Fixes: 84c3c9952a
("iwlwifi: move UEFI code to a separate file")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211024181719.7fc9988ed49b.I87e300fab664047581e51fb9b02744c75320d08c@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
45 lines
1.2 KiB
C
45 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
|
/*
|
|
* Copyright(c) 2021 Intel Corporation
|
|
*/
|
|
#ifndef __iwl_fw_uefi__
|
|
#define __iwl_fw_uefi__
|
|
|
|
#define IWL_UEFI_OEM_PNVM_NAME L"UefiCnvWlanOemSignedPnvm"
|
|
#define IWL_UEFI_REDUCED_POWER_NAME L"UefiCnvWlanReducedPower"
|
|
|
|
/*
|
|
* 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
|
|
#define IWL_HARDCODED_REDUCE_POWER_SIZE 32768
|
|
|
|
struct pnvm_sku_package {
|
|
u8 rev;
|
|
u32 total_size;
|
|
u8 n_skus;
|
|
u32 reserved[2];
|
|
u8 data[];
|
|
} __packed;
|
|
|
|
#ifdef CONFIG_EFI
|
|
void *iwl_uefi_get_pnvm(struct iwl_trans *trans, size_t *len);
|
|
void *iwl_uefi_get_reduced_power(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);
|
|
}
|
|
|
|
static inline
|
|
void *iwl_uefi_get_reduced_power(struct iwl_trans *trans, size_t *len)
|
|
{
|
|
return ERR_PTR(-EOPNOTSUPP);
|
|
}
|
|
#endif /* CONFIG_EFI */
|
|
|
|
#endif /* __iwl_fw_uefi__ */
|