1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /* Copyright(c) 2021-2023 Realtek Corporation
5 #ifndef __RTW89_ACPI_H__
6 #define __RTW89_ACPI_H__
10 enum rtw89_acpi_dsm_func {
11 RTW89_ACPI_DSM_FUNC_IDN_BAND_SUP = 2,
12 RTW89_ACPI_DSM_FUNC_6G_DIS = 3,
13 RTW89_ACPI_DSM_FUNC_6G_BP = 4,
14 RTW89_ACPI_DSM_FUNC_TAS_EN = 5,
15 RTW89_ACPI_DSM_FUNC_UNII4_SUP = 6,
16 RTW89_ACPI_DSM_FUNC_6GHZ_SP_SUP = 7,
19 enum rtw89_acpi_conf_unii4 {
20 RTW89_ACPI_CONF_UNII4_FCC = BIT(0),
21 RTW89_ACPI_CONF_UNII4_IC = BIT(1),
24 enum rtw89_acpi_policy_mode {
25 RTW89_ACPI_POLICY_BLOCK = 0,
26 RTW89_ACPI_POLICY_ALLOW = 1,
29 struct rtw89_acpi_country_code {
31 * * ISO alpha2 country code
32 * * EU for countries in Europe
37 struct rtw89_acpi_policy_6ghz {
42 struct rtw89_acpi_country_code country_list[] __counted_by(country_count);
45 enum rtw89_acpi_conf_6ghz_sp {
46 RTW89_ACPI_CONF_6GHZ_SP_US = BIT(0),
49 struct rtw89_acpi_policy_6ghz_sp {
57 struct rtw89_acpi_dsm_result {
60 /* caller needs to free it after using */
61 struct rtw89_acpi_policy_6ghz *policy_6ghz;
62 struct rtw89_acpi_policy_6ghz_sp *policy_6ghz_sp;
66 int rtw89_acpi_evaluate_dsm(struct rtw89_dev *rtwdev,
67 enum rtw89_acpi_dsm_func func,
68 struct rtw89_acpi_dsm_result *res);