mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
iwlwifi: acpi: move ACPI method definitions to acpi.h
Instead of defining each method where they are used and re-defining WIFI_DOMAIN in each one of them, move all the definitions to a central place and define the domain only a single time. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
813df5cef3
commit
1c73acf58b
@ -65,6 +65,21 @@
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
|
||||
#define ACPI_WRDS_METHOD "WRDS"
|
||||
#define ACPI_EWRD_METHOD "EWRD"
|
||||
#define ACPI_WGDS_METHOD "WGDS"
|
||||
#define ACPI_WRDD_METHOD "WRDD"
|
||||
#define ACPI_SPLC_METHOD "SPLC"
|
||||
|
||||
#define ACPI_WIFI_DOMAIN (0x07)
|
||||
|
||||
#define ACPI_WRDS_WIFI_DATA_SIZE (IWL_MVM_SAR_TABLE_SIZE + 2)
|
||||
#define ACPI_EWRD_WIFI_DATA_SIZE ((IWL_MVM_SAR_PROFILE_NUM - 1) * \
|
||||
IWL_MVM_SAR_TABLE_SIZE + 3)
|
||||
#define ACPI_WGDS_WIFI_DATA_SIZE 18
|
||||
#define ACPI_WGDS_NUM_BANDS 2
|
||||
#define ACPI_WGDS_TABLE_SIZE 3
|
||||
|
||||
void *iwl_acpi_get_object(struct device *dev, acpi_string method);
|
||||
|
||||
#else /* CONFIG_ACPI */
|
||||
|
@ -946,10 +946,6 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
|
||||
IWL_EXPORT_SYMBOL(iwl_parse_nvm_mcc_info);
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
#define WRDD_METHOD "WRDD"
|
||||
#define WRDD_WIFI (0x07)
|
||||
#define WRDD_WIGIG (0x10)
|
||||
|
||||
static u32 iwl_wrdd_get_mcc(struct device *dev, union acpi_object *wrdd)
|
||||
{
|
||||
union acpi_object *mcc_pkg, *domain_type, *mcc_value;
|
||||
@ -975,7 +971,7 @@ static u32 iwl_wrdd_get_mcc(struct device *dev, union acpi_object *wrdd)
|
||||
}
|
||||
|
||||
domain_type = &mcc_pkg->package.elements[0];
|
||||
if (domain_type->integer.value == WRDD_WIFI)
|
||||
if (domain_type->integer.value == ACPI_WIFI_DOMAIN)
|
||||
break;
|
||||
|
||||
mcc_pkg = NULL;
|
||||
@ -994,7 +990,7 @@ int iwl_get_bios_mcc(struct device *dev, char *mcc)
|
||||
union acpi_object *data;
|
||||
u32 mcc_val;
|
||||
|
||||
data = iwl_acpi_get_object(dev, WRDD_METHOD);
|
||||
data = iwl_acpi_get_object(dev, ACPI_WRDD_METHOD);
|
||||
if (IS_ERR(data))
|
||||
return PTR_ERR(data);
|
||||
|
||||
|
@ -579,17 +579,6 @@ static int iwl_mvm_config_ltr(struct iwl_mvm *mvm)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
#define ACPI_WRDS_METHOD "WRDS"
|
||||
#define ACPI_EWRD_METHOD "EWRD"
|
||||
#define ACPI_WGDS_METHOD "WGDS"
|
||||
#define ACPI_WIFI_DOMAIN (0x07)
|
||||
#define ACPI_WRDS_WIFI_DATA_SIZE (IWL_MVM_SAR_TABLE_SIZE + 2)
|
||||
#define ACPI_EWRD_WIFI_DATA_SIZE ((IWL_MVM_SAR_PROFILE_NUM - 1) * \
|
||||
IWL_MVM_SAR_TABLE_SIZE + 3)
|
||||
#define ACPI_WGDS_WIFI_DATA_SIZE 18
|
||||
#define ACPI_WGDS_NUM_BANDS 2
|
||||
#define ACPI_WGDS_TABLE_SIZE 3
|
||||
|
||||
static int iwl_mvm_sar_set_profile(struct iwl_mvm *mvm,
|
||||
union acpi_object *table,
|
||||
struct iwl_mvm_sar_profile *profile,
|
||||
|
@ -588,9 +588,6 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
|
||||
MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids);
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
#define ACPI_SPLC_METHOD "SPLC"
|
||||
#define ACPI_SPLC_DOMAIN_WIFI (0x07)
|
||||
|
||||
static u64 splc_get_pwr_limit(struct iwl_trans *trans, union acpi_object *splc)
|
||||
{
|
||||
union acpi_object *data_pkg, *dflt_pwr_limit;
|
||||
@ -625,7 +622,7 @@ static u64 splc_get_pwr_limit(struct iwl_trans *trans, union acpi_object *splc)
|
||||
continue;
|
||||
|
||||
domain = &data_pkg->package.elements[0];
|
||||
if (domain->integer.value == ACPI_SPLC_DOMAIN_WIFI)
|
||||
if (domain->integer.value == ACPI_WIFI_DOMAIN)
|
||||
break;
|
||||
|
||||
data_pkg = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user