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 5
13 #define MAX_SAR_REVISION 2
14 #define REVISION_SIZE 1
15 #define SAR_REV0_CHAINS_COUNT 2
16 #define SAR_REV0_SUBBANDS_COUNT 5
17 #define SAR_FILE_REVISION 1
18 #define SAR_STR_PREFIX "$SAR"
19 #define SAR_STR_PREFIX_SIZE 4
30 uint8_t dsar_set_count
;
32 uint8_t subbands_count
;
46 uint8_t tas_selection
;
47 uint8_t tas_list_size
;
48 uint16_t deny_list_entry
[MAX_DENYLIST_ENTRY
];
52 uint32_t supported_functions
;
53 uint32_t disable_active_sdr_channels
;
54 uint32_t support_indonesia_5g_band
;
55 uint32_t support_ultra_high_band
;
56 uint32_t regulatory_configurations
;
57 uint32_t uart_configurations
;
58 uint32_t enablement_11ax
;
63 char marker
[SAR_STR_PREFIX_SIZE
];
68 /* Wifi SAR limit table structure */
69 union wifi_sar_limits
{
71 struct sar_profile
*sar
;
72 struct geo_profile
*wgds
;
73 struct gain_profile
*ppag
;
74 struct avg_profile
*wtas
;
75 struct dsm_profile
*dsm
;
77 void *profile
[MAX_PROFILE_COUNT
];
81 * Retrieve the wifi ACPI configuration data from CBFS and decode it
82 * sar_limits: Pointer to wifi_sar_limits where the resulted data is stored
84 * Returns: 0 on success, -1 on errors (The .hex file doesn't exist, or the decode failed)
86 int get_wifi_sar_limits(union wifi_sar_limits
*sar_limits
);
88 #define WIFI_SAR_CBFS_DEFAULT_FILENAME "wifi_sar_defaults.hex"
90 const char *get_wifi_sar_cbfs_filename(void);
92 char *get_wifi_sar_fw_config_filename(const struct fw_config_field
*field
);