From e9b36b03ce63c40fd9d81cefc797928ca867bbb7 Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Tue, 29 Oct 2024 11:36:16 -0700 Subject: drivers/wifi: Support Bluetooth Bands Selection Mode This feature provides ability to provide Bluetooth Bands Selection Mode. The bluetooth bands selection mode is defined as follow: | Bit | Band GHz | Value | Description | Default | |------+----------+-------+----------------------+---------| | 0 | 2.4GHz | 0 | Controlled by NIC | 0 | | | | 1 | Force disable 2.4GHz | | | 1 | 5.2GHz | 0 | Controlled by NIC | 0 | | | | 1 | Force disable 5.2GHz | | | 2 | 5.8GHz | 0 | Controlled by NIC | 0 | | | | 1 | Force disable 5.8GHz | | | 3 | 6.2GHz | 0 | Controlled by NIC | 0 | | | | 1 | Force disable 6.2GHz | | | 31:4 | Reserved | | NA | 0 | The implementation follows document 559910 Intel Connectivity Platforms BIOS Guideline revision 9.2 specification. BUG=b:346600091 TEST=BBSM method is added to the bluetooth companion device and return the data supplied by the SAR binary blob Change-Id: Iebe95815c944d045f4cf686abcd1874a8a45e230 Signed-off-by: Jeremy Compostella Reviewed-on: https://review.coreboot.org/c/coreboot/+/84944 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik Reviewed-by: Kapil Porwal --- src/vendorcode/google/chromeos/sar.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/vendorcode/google') diff --git a/src/vendorcode/google/chromeos/sar.c b/src/vendorcode/google/chromeos/sar.c index bf2900b019..f6f11181d6 100644 --- a/src/vendorcode/google/chromeos/sar.c +++ b/src/vendorcode/google/chromeos/sar.c @@ -134,6 +134,14 @@ static size_t bdcm_table_size(const struct bdcm_profile *bdcm) return sizeof(struct bdcm_profile); } +static size_t bbsm_table_size(const struct bbsm_profile *bbsm) +{ + if (bbsm == NULL) + return 0; + + return sizeof(struct bbsm_profile); +} + static bool valid_legacy_length(size_t bin_len) { if (bin_len == LEGACY_SAR_WGDS_BIN_SIZE) @@ -190,6 +198,7 @@ static int fill_wifi_sar_limits(union wifi_sar_limits *sar_limits, const uint8_t expected_sar_bin_size += bpag_table_size(sar_limits->bpag); expected_sar_bin_size += bbfb_table_size(sar_limits->bbfb); expected_sar_bin_size += bdcm_table_size(sar_limits->bdcm); + expected_sar_bin_size += bbsm_table_size(sar_limits->bbsm); if (sar_bin_size != expected_sar_bin_size) { printk(BIOS_ERR, "Invalid SAR size, expected: %zu, obtained: %zu\n", -- cgit v1.2.3