summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/wifi/generic/acpi.c41
-rw-r--r--src/include/sar.h12
-rw-r--r--src/vendorcode/google/chromeos/sar.c9
3 files changed, 61 insertions, 1 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)
diff --git a/src/include/sar.h b/src/include/sar.h
index 44fcd1e322..d0d312ebd9 100644
--- a/src/include/sar.h
+++ b/src/include/sar.h
@@ -9,7 +9,7 @@
#define MAX_DENYLIST_ENTRY 16
#define MAX_DSAR_SET_COUNT 3
#define MAX_GEO_OFFSET_REVISION 3
-#define MAX_PROFILE_COUNT 14
+#define MAX_PROFILE_COUNT 15
#define MAX_SAR_REVISION 2
#define MAX_BSAR_REVISION 2
#define WBEM_REVISION 0
@@ -20,6 +20,7 @@
#define BUCS_REVISION 1
#define BDMM_REVISION 1
#define EBRD_REVISION 1
+#define WPFC_REVISION 0
#define REVISION_SIZE 1
#define SAR_REV0_CHAINS_COUNT 2
#define SAR_REV0_SUBBANDS_COUNT 5
@@ -144,6 +145,14 @@ struct ebrd_profile {
} sar_table_sets[3];
} __packed;
+struct wpfc_profile {
+ uint8_t revision;
+ uint8_t filter_cfg_chain_a;
+ uint8_t filter_cfg_chain_b;
+ uint8_t filter_cfg_chain_c;
+ uint8_t filter_cfg_chain_d;
+} __packed;
+
struct sar_header {
char marker[SAR_STR_PREFIX_SIZE];
uint8_t version;
@@ -167,6 +176,7 @@ union wifi_sar_limits {
struct bucs_profile *bucs;
struct bdmm_profile *bdmm;
struct ebrd_profile *ebrd;
+ struct wpfc_profile *wpfc;
};
void *profile[MAX_PROFILE_COUNT];
};
diff --git a/src/vendorcode/google/chromeos/sar.c b/src/vendorcode/google/chromeos/sar.c
index 6ebf931d7d..1a7497518c 100644
--- a/src/vendorcode/google/chromeos/sar.c
+++ b/src/vendorcode/google/chromeos/sar.c
@@ -170,6 +170,14 @@ static size_t ebrd_table_size(const struct ebrd_profile *ebrd)
return sizeof(struct ebrd_profile);
}
+static size_t wpfc_table_size(const struct wpfc_profile *wpfc)
+{
+ if (wpfc == NULL)
+ return 0;
+
+ return sizeof(struct wpfc_profile);
+}
+
static bool valid_legacy_length(size_t bin_len)
{
if (bin_len == LEGACY_SAR_WGDS_BIN_SIZE)
@@ -230,6 +238,7 @@ static int fill_wifi_sar_limits(union wifi_sar_limits *sar_limits, const uint8_t
expected_sar_bin_size += bucs_table_size(sar_limits->bucs);
expected_sar_bin_size += bdmm_table_size(sar_limits->bdmm);
expected_sar_bin_size += ebrd_table_size(sar_limits->ebrd);
+ expected_sar_bin_size += wpfc_table_size(sar_limits->wpfc);
if (sar_bin_size != expected_sar_bin_size) {
printk(BIOS_ERR, "Invalid SAR size, expected: %zu, obtained: %zu\n",