aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/wifi/generic/generic.c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2020-10-27 15:28:21 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-11-02 06:12:57 +0000
commit507a98b689975561b54e5e156d624f7dcad6d393 (patch)
tree6bb91c1bb2812522e8319836de6ea87b2a48ba4d /src/drivers/wifi/generic/generic.c
parent2b5be8857bf90b8136558279f36d86371d303095 (diff)
drivers/wifi/generic: Move SMBIOS functions to a separate file
This change reorganizes the WiFi generic driver to move the SMBIOS functions to a separate file. This change is done to reduce the noise in generic.c file and improve readability of the file. Change-Id: I38ed46f5ae1594945d2078b00e8315d9234f36d7 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46859 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'src/drivers/wifi/generic/generic.c')
-rw-r--r--src/drivers/wifi/generic/generic.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/src/drivers/wifi/generic/generic.c b/src/drivers/wifi/generic/generic.c
index 6ffa7f1f85..56944e61da 100644
--- a/src/drivers/wifi/generic/generic.c
+++ b/src/drivers/wifi/generic/generic.c
@@ -9,10 +9,9 @@
#include <device/pci_ids.h>
#include <elog.h>
#include <sar.h>
-#include <smbios.h>
-#include <string.h>
#include <wrdd.h>
#include "chip.h"
+#include "wifi_private.h"
/* WRDS Spec Revision */
#define WRDS_REVISION 0x0
@@ -243,42 +242,6 @@ static void wifi_pci_dev_init(struct device *dev)
elog_add_event_wake(ELOG_WAKE_SOURCE_PME_WIFI, 0);
}
-#if CONFIG(GENERATE_SMBIOS_TABLES)
-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;
- u8 str;
- u8 eos[2];
- } __packed;
-
- struct smbios_type_intel_wifi *t = (struct smbios_type_intel_wifi *)*current;
- int len = sizeof(struct smbios_type_intel_wifi);
-
- memset(t, 0, sizeof(struct smbios_type_intel_wifi));
- t->type = 0x85;
- t->length = len - 2;
- t->handle = *handle;
- /* Intel wifi driver expects this string to be in the table 0x85. */
- t->str = smbios_add_string(t->eos, "KHOIHGIUCCHHII");
-
- len = t->length + smbios_string_table_len(t->eos);
- *current += len;
- *handle += 1;
- return len;
-}
-
-static int smbios_write_wifi(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;
-}
-#endif
-
struct device_operations wifi_generic_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,