Robbie Zhang | ed84002 | 2016-12-23 11:43:07 -0800 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2017 Intel Corp. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | */ |
| 15 | #ifndef _SAR_H_ |
| 16 | #define _SAR_H_ |
| 17 | |
| 18 | #include <stdint.h> |
| 19 | |
| 20 | #define NUM_SAR_LIMITS 4 |
| 21 | #define BYTES_PER_SAR_LIMIT 10 |
| 22 | |
| 23 | /* Wifi SAR limit table structure */ |
| 24 | struct wifi_sar_limits { |
| 25 | /* Total 4 SAR limit sets, each has 10 bytes */ |
| 26 | uint8_t sar_limit[NUM_SAR_LIMITS][BYTES_PER_SAR_LIMIT]; |
| 27 | }; |
| 28 | |
| 29 | /* |
| 30 | * Retrieve the SAR limits data from VPD and decode it. |
| 31 | * sar_limits: Pointer to wifi_sar_limits where the resulted data is stored |
| 32 | * |
| 33 | * Returns: 0 on success, -1 on errors (The VPD entry doesn't exist, or the |
| 34 | * VPD entry contains non-heximal value.) |
| 35 | */ |
| 36 | int get_wifi_sar_limits(struct wifi_sar_limits *sar_limits); |
| 37 | |
| 38 | #endif /* _SAR_H_ */ |