drivers/wifi: Support Bluetooth BiQuad Bypass Filter

This feature provides ability to identify non-LTE platform and disable
BiQuad Bypass filter logic in hardware for Bluetooth usecases reducing
device power consumption.

The implementation follows document 559910 Intel Connectivity
Platforms BIOS Guideline revision 9.2 specification.

BUG=b:346600091
TEST=BBFB method is added to the bluetooth companion device and
     return the data supplied by the SAR binary blob

Change-Id: Iebe95815c944d045f4cf686abcd1874a8a45e213
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84942
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
Jeremy Compostella 2024-10-28 16:32:55 -07:00 committed by Jérémy Compostella
commit 3f535d3a0d
3 changed files with 53 additions and 1 deletions

View file

@ -118,6 +118,14 @@ static size_t bpag_table_size(const struct bpag_profile *bpag)
return sizeof(struct bpag_profile);
}
static size_t bbfb_table_size(const struct bbfb_profile *bbfb)
{
if (bbfb == NULL)
return 0;
return sizeof(struct bbfb_profile);
}
static bool valid_legacy_length(size_t bin_len)
{
if (bin_len == LEGACY_SAR_WGDS_BIN_SIZE)
@ -172,6 +180,7 @@ static int fill_wifi_sar_limits(union wifi_sar_limits *sar_limits, const uint8_t
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);
expected_sar_bin_size += bbfb_table_size(sar_limits->bbfb);
if (sar_bin_size != expected_sar_bin_size) {
printk(BIOS_ERR, "Invalid SAR size, expected: %zu, obtained: %zu\n",