1 /* SPDX-License-Identifier: GPL-2.0-only */
8 #define MAX_ANT_GAINS_REVISION 2
9 #define MAX_DENYLIST_ENTRY 16
10 #define MAX_DSAR_SET_COUNT 3
11 #define MAX_GEO_OFFSET_REVISION 3
12 #define MAX_PROFILE_COUNT 7
13 #define MAX_SAR_REVISION 2
14 #define BSAR_REVISION 1
15 #define WBEM_REVISION 0
16 #define REVISION_SIZE 1
17 #define SAR_REV0_CHAINS_COUNT 2
18 #define SAR_REV0_SUBBANDS_COUNT 5
19 #define SAR_FILE_REVISION 1
20 #define SAR_STR_PREFIX "$SAR"
21 #define SAR_STR_PREFIX_SIZE 4
32 uint8_t dsar_set_count
;
34 uint8_t subbands_count
;
48 uint8_t tas_selection
;
49 uint8_t tas_list_size
;
50 uint16_t deny_list_entry
[MAX_DENYLIST_ENTRY
];
54 uint32_t supported_functions
;
55 uint32_t disable_active_sdr_channels
;
56 uint32_t support_indonesia_5g_band
;
57 uint32_t support_ultra_high_band
;
58 uint32_t regulatory_configurations
;
59 uint32_t uart_configurations
;
60 uint32_t enablement_11ax
;
62 uint32_t enablement_11be
;
63 uint32_t energy_detection_threshold
;
64 uint32_t rfi_mitigation
;
69 uint8_t increased_power_mode_limitation
;
70 uint8_t sar_lb_power_restriction
;
71 uint8_t br_modulation
;
72 uint8_t edr2_modulation
;
73 uint8_t edr3_modulation
;
74 uint8_t le_modulation
;
75 uint8_t le2_mhz_modulation
;
76 uint8_t le_lr_modulation
;
81 uint32_t bandwidth_320mhz_country_enablement
;
85 char marker
[SAR_STR_PREFIX_SIZE
];
90 /* Wifi SAR limit table structure */
91 union wifi_sar_limits
{
93 struct sar_profile
*sar
;
94 struct geo_profile
*wgds
;
95 struct gain_profile
*ppag
;
96 struct avg_profile
*wtas
;
97 struct dsm_profile
*dsm
;
98 struct bsar_profile
*bsar
;
99 struct wbem_profile
*wbem
;
101 void *profile
[MAX_PROFILE_COUNT
];
105 * Retrieve the wifi ACPI configuration data from CBFS and decode it
106 * sar_limits: Pointer to wifi_sar_limits where the resulted data is stored
108 * Returns: 0 on success, -1 on errors (The .hex file doesn't exist, or the decode failed)
110 int get_wifi_sar_limits(union wifi_sar_limits
*sar_limits
);
112 #define WIFI_SAR_CBFS_DEFAULT_FILENAME "wifi_sar_defaults.hex"
114 const char *get_wifi_sar_cbfs_filename(void);
116 char *get_wifi_sar_fw_config_filename(const struct fw_config_field
*field
);