diff options
author | Jeremy Compostella <jeremy.compostella@intel.com> | 2024-10-28 14:03:29 -0700 |
---|---|---|
committer | Jérémy Compostella <jeremy.compostella@intel.com> | 2024-11-27 21:27:53 +0000 |
commit | 354cba21a41aa868b7b41804c2859f920d2e1b17 (patch) | |
tree | 31e69334fa56cf9150617fa16b4be72ec45ad1ce /src/vendorcode/google/chromeos | |
parent | 8943e40b18911552b28e841394068bed80612829 (diff) |
drivers/wifi: Support Bluetooth Per-Platform Antenna Gain
The ACPI BPAG method provide information to controls the antenna gain
method to be used per country.
The antenna gain mode is a bit field (0 - disabled, 1 -enabled)
defined as follow:
- Bit 0 - Antenna gain in EU
- Bit 1 - Antenna gain in China Mainland
The implementation follows document 559910 Intel Connectivity
Platforms BIOS Guideline revision 9.2 specification.
BUG=b:346600091
TEST=BPAG method is added to the bluetooth companion device and return
the data supplied by the SAR binary blob
Change-Id: Iebe95815c944d045f4cf686abcd1874a8a45e210
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84941
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Diffstat (limited to 'src/vendorcode/google/chromeos')
-rw-r--r-- | src/vendorcode/google/chromeos/sar.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vendorcode/google/chromeos/sar.c b/src/vendorcode/google/chromeos/sar.c index e8d4410f4b..dcf647398e 100644 --- a/src/vendorcode/google/chromeos/sar.c +++ b/src/vendorcode/google/chromeos/sar.c @@ -110,6 +110,14 @@ static size_t wbem_table_size(const struct wbem_profile *wbem) return sizeof(struct wbem_profile); } +static size_t bpag_table_size(const struct bpag_profile *bpag) +{ + if (bpag == NULL) + return 0; + + return sizeof(struct bpag_profile); +} + static bool valid_legacy_length(size_t bin_len) { if (bin_len == LEGACY_SAR_WGDS_BIN_SIZE) @@ -163,6 +171,7 @@ static int fill_wifi_sar_limits(union wifi_sar_limits *sar_limits, const uint8_t expected_sar_bin_size += dsm_table_size(sar_limits->dsm); expected_sar_bin_size += bsar_table_size(sar_limits->bsar); expected_sar_bin_size += wbem_table_size(sar_limits->wbem); + expected_sar_bin_size += bpag_table_size(sar_limits->bpag); if (sar_bin_size != expected_sar_bin_size) { printk(BIOS_ERR, "Invalid SAR size, expected: %zu, obtained: %zu\n", |