From 487aad6db11f1ee921680e292ac45d408bb7c2de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 16 Feb 2023 12:20:42 +0100 Subject: [PATCH] wifi: allow driver dump in error case This commit implements dummies that would otherwise trigger a 'generated dummy' call that stops the driver. --- repos/pc/src/lib/wifi/dummies.c | 9 +++++++++ repos/pc/src/lib/wifi/generated_dummies.c | 10 +--------- repos/pc/src/lib/wifi/lx_emul.c | 7 +++++++ 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/repos/pc/src/lib/wifi/dummies.c b/repos/pc/src/lib/wifi/dummies.c index 005fd51c38..18eb5f31f2 100644 --- a/repos/pc/src/lib/wifi/dummies.c +++ b/repos/pc/src/lib/wifi/dummies.c @@ -368,3 +368,12 @@ void pci_disable_device(struct pci_dev * dev) { lx_emul_trace(__func__); } + + +#include +#include <../net/mac80211/ieee80211_i.h> /* struct ieee80211_local */ + +void ieee80211_free_led_names(struct ieee80211_local * local) +{ + lx_emul_trace(__func__); +} diff --git a/repos/pc/src/lib/wifi/generated_dummies.c b/repos/pc/src/lib/wifi/generated_dummies.c index 384f9637a7..068746604a 100644 --- a/repos/pc/src/lib/wifi/generated_dummies.c +++ b/repos/pc/src/lib/wifi/generated_dummies.c @@ -1,7 +1,7 @@ /* * \brief Dummy definitions of Linux Kernel functions * \author Automatically generated file - do no edit - * \date 2022-07-29 + * \date 2023-02-28 */ #include @@ -702,14 +702,6 @@ int open_related_ns(struct ns_common * ns,struct ns_common * (* get_ns)(struct n enum reboot_mode panic_reboot_mode; -#include - -int pci_read_config_dword(const struct pci_dev * dev,int where,u32 * val) -{ - lx_emul_trace_and_stop(__func__); -} - - #include void pci_stop_and_remove_bus_device(struct pci_dev * dev) diff --git a/repos/pc/src/lib/wifi/lx_emul.c b/repos/pc/src/lib/wifi/lx_emul.c index ff54e1b507..91371d53ef 100644 --- a/repos/pc/src/lib/wifi/lx_emul.c +++ b/repos/pc/src/lib/wifi/lx_emul.c @@ -691,3 +691,10 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) return lx_emul_io_mem_map(phys_addr, size); } + + +int pci_read_config_dword(const struct pci_dev * dev,int where,u32 * val) +{ + *val = 0; + return 0; +}