summaryrefslogtreecommitdiff
path: root/src/drivers/wifi
diff options
context:
space:
mode:
authorJeremy Compostella <jeremy.compostella@intel.com>2024-10-31 13:08:44 -0700
committerJérémy Compostella <jeremy.compostella@intel.com>2024-11-27 21:28:34 +0000
commit1e8c6819b16ef5e21b2f3f0137a6027367387298 (patch)
tree1aab94bdb4e0cbd03564d89be358d756cfa14830 /src/drivers/wifi
parentc8ab1db0c65f4ffbdebd384abba455af005bd0a5 (diff)
drivers/wifi: Support Wi-Fi PHY Filter Configuration
This feature provides ability to provide Wi-Fi PHY filter Configuration. A well-defined dedicated filter on particular platform can be used to perform the maximum Wi-Fi performance. The implementation follows document 559910 Intel Connectivity Platforms BIOS Guideline revision 9.2 specification. BUG=b:346600091 TEST=WPFC method is added to the wifi device and return the data supplied by the SAR binary blob Change-Id: Iebe95815c944d045f4cf686abcd1874a8a45e270 Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84948 Reviewed-by: Kapil Porwal <kapilporwal@google.com> Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/wifi')
-rw-r--r--src/drivers/wifi/generic/acpi.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c
index be44f6b907..d3277cc1e0 100644
--- a/src/drivers/wifi/generic/acpi.c
+++ b/src/drivers/wifi/generic/acpi.c
@@ -927,6 +927,46 @@ static void sar_emit_ebrd(const struct ebrd_profile *ebrd)
acpigen_write_package_end();
}
+static void sar_emit_wpfc(const struct wpfc_profile *wpfc)
+{
+ if (wpfc == NULL)
+ return;
+
+ /*
+ * Name ("WPFC", Package() {
+ * {
+ * Revision,
+ * Package()
+ * {
+ * DomainType, // 0x7:WiFi
+ * Chain A Filter Platform Configuration
+ * Chain B Filter Platform Configuration
+ * Chain C Filter Platform Configuration
+ * Chain D Filter Platform Configuration
+ * }
+ } })
+ */
+ if (wpfc->revision != WPFC_REVISION) {
+ printk(BIOS_ERR, "Unsupported WPFC table revision: %d\n",
+ wpfc->revision);
+ return;
+ }
+
+ acpigen_write_name("WPFC");
+ acpigen_write_package(2);
+ acpigen_write_dword(wpfc->revision);
+
+ acpigen_write_package(5);
+ acpigen_write_dword(DOMAIN_TYPE_WIFI);
+ acpigen_write_byte(wpfc->filter_cfg_chain_a);
+ acpigen_write_byte(wpfc->filter_cfg_chain_b);
+ acpigen_write_byte(wpfc->filter_cfg_chain_c);
+ acpigen_write_byte(wpfc->filter_cfg_chain_d);
+
+ acpigen_write_package_end();
+ acpigen_write_package_end();
+}
+
static void emit_wifi_sar_acpi_structures(const struct device *dev,
union wifi_sar_limits *sar_limits)
{
@@ -943,6 +983,7 @@ static void emit_wifi_sar_acpi_structures(const struct device *dev,
sar_emit_ppag(sar_limits->ppag);
sar_emit_wtas(sar_limits->wtas);
sar_emit_wbem(sar_limits->wbem);
+ sar_emit_wpfc(sar_limits->wpfc);
}
static void wifi_ssdt_write_device(const struct device *dev, const char *path)