diff options
author | Angel Pons <th3fanbus@gmail.com> | 2021-06-28 16:06:28 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-07-01 07:37:04 +0000 |
commit | ca01baa065e25242945bdfa8631694a6e903f17f (patch) | |
tree | c23517071dfffc3ebacef30f970fc245db32bec7 /src/drivers/wifi/generic | |
parent | 631cd29efbcd030d8c3fe3ce3c9d98562b306007 (diff) |
SMBIOS: Introduce struct for SMBIOS table header
All SMBIOS `type X` tables start with the same 4-byte header. Add a
struct definition for it, and use it where applicable. The union is
temporary and allows doing the necessary changes in smaller commits.
Change-Id: Ibd9a80010f83fd7ebefc014b981d430f5723808c
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55906
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/drivers/wifi/generic')
-rw-r--r-- | src/drivers/wifi/generic/smbios.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/drivers/wifi/generic/smbios.c b/src/drivers/wifi/generic/smbios.c index b8191161bb..96b11d3051 100644 --- a/src/drivers/wifi/generic/smbios.c +++ b/src/drivers/wifi/generic/smbios.c @@ -10,9 +10,14 @@ static int smbios_write_intel_wifi(struct device *dev, int *handle, unsigned long *current) { struct smbios_type_intel_wifi { - u8 type; - u8 length; - u16 handle; + union { + struct { + u8 type; + u8 length; + u16 handle; + }; + struct smbios_header header; + }; u8 str; u8 eos[2]; } __packed; |