1 /* SPDX-License-Identifier: GPL-2.0-only */
7 #define NUM_SAR_LIMITS 4
8 #define BYTES_PER_SAR_LIMIT 10
16 struct wifi_sar_delta_table
{
19 uint8_t power_max_2400mhz
;
20 uint8_t power_chain_a_2400mhz
;
21 uint8_t power_chain_b_2400mhz
;
22 uint8_t power_max_5200mhz
;
23 uint8_t power_chain_a_5200mhz
;
24 uint8_t power_chain_b_5200mhz
;
25 } __packed group
[SAR_NUM_WGDS_GROUPS
];
28 /* Wifi SAR limit table structure */
29 struct wifi_sar_limits
{
30 /* Total 4 SAR limit sets, each has 10 bytes */
31 uint8_t sar_limit
[NUM_SAR_LIMITS
][BYTES_PER_SAR_LIMIT
];
32 struct wifi_sar_delta_table wgds
;
36 * Retrieve the SAR limits data from VPD and decode it.
37 * sar_limits: Pointer to wifi_sar_limits where the resulted data is stored
39 * Returns: 0 on success, -1 on errors (The VPD entry doesn't exist, or the
40 * VPD entry contains non-heximal value.)
42 int get_wifi_sar_limits(struct wifi_sar_limits
*sar_limits
);
44 #define WIFI_SAR_CBFS_DEFAULT_FILENAME "wifi_sar_defaults.hex"
46 const char *get_wifi_sar_cbfs_filename(void);