diff --git a/src/mainboard/google/dedede/variants/magolor/variant.c b/src/mainboard/google/dedede/variants/magolor/variant.c index bb9cf087f6..ccea87385e 100644 --- a/src/mainboard/google/dedede/variants/magolor/variant.c +++ b/src/mainboard/google/dedede/variants/magolor/variant.c @@ -1,13 +1,27 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include #include #include +enum { + MAGOLOR_SKU_START = 0x70000, + MAGOLOR_SKU_END = 0x7ffff, + MAGLIA_SKU_START = 0x80000, + MAGLIA_SKU_END = 0x8ffff, + MAGISTER_SKU_START = 0xc0000, + MAGISTER_SKU_END = 0xcffff, +}; + const char *get_wifi_sar_cbfs_filename(void) { - if (fw_config_probe(FW_CONFIG(TABLETMODE, TABLETMODE_ENABLED))) + uint32_t sku_id = google_chromeec_get_board_sku(); + + if (sku_id >= MAGOLOR_SKU_START && sku_id <= MAGLIA_SKU_END) return "wifi_sar-magolor.hex"; + if (sku_id >= MAGISTER_SKU_START && sku_id <= MAGISTER_SKU_END) + return "wifi_sar-magister.hex"; return WIFI_SAR_CBFS_DEFAULT_FILENAME; }