Now that the refactoring is complete, the unions for the table header are no longer needed. Therefore, drop them. Change-Id: I4e170e84a12646386d3fd84ae973dd6c18f25809 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55910 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
42 lines
1.0 KiB
C
42 lines
1.0 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
#include <device/device.h>
|
|
#include <device/pci_ids.h>
|
|
#include <smbios.h>
|
|
#include <string.h>
|
|
|
|
#include "wifi_private.h"
|
|
|
|
static int smbios_write_intel_wifi(struct device *dev, int *handle, unsigned long *current)
|
|
{
|
|
struct smbios_type_intel_wifi {
|
|
struct smbios_header header;
|
|
u8 str;
|
|
u8 eos[2];
|
|
} __packed;
|
|
|
|
struct smbios_type_intel_wifi *t = smbios_carve_table(*current, 0x85,
|
|
sizeof(*t), *handle);
|
|
|
|
/* Intel wifi driver expects this string to be in the table 0x85. */
|
|
t->str = smbios_add_string(t->eos, "KHOIHGIUCCHHII");
|
|
|
|
const int len = smbios_full_table_len(&t->header, t->eos);
|
|
*current += len;
|
|
*handle += 1;
|
|
return len;
|
|
}
|
|
|
|
int smbios_write_wifi_pcie(struct device *dev, int *handle, unsigned long *current)
|
|
{
|
|
if (dev->vendor == PCI_VENDOR_ID_INTEL)
|
|
return smbios_write_intel_wifi(dev, handle, current);
|
|
|
|
return 0;
|
|
}
|
|
|
|
int smbios_write_wifi_cnvi(struct device *dev, int *handle, unsigned long *current)
|
|
{
|
|
return smbios_write_wifi_pcie(dev->bus->dev, handle, current);
|
|
}
|