From 15f3f679cb406eb7b1439b2dd0bed631cd445d94 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 25 Feb 2012 15:38:46 +0100 Subject: [PATCH] atheroswifi: try at fixing #8351 * ath introduced an inconsistency between driver module name and driver_t name which the compat layer uses to lookup driver symbol * we now use ath_pci instead of ath as driver_t name member. * trace a message when a symbol can't be found during driver module search. --- .../drivers/network/wlan/atheroswifi/dev/ath/if_ath_pci.c | 4 ++++ src/libs/compat/freebsd_network/compat.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath/if_ath_pci.c b/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath/if_ath_pci.c index c9b7eecbc1..e0428d780c 100644 --- a/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath/if_ath_pci.c +++ b/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath/if_ath_pci.c @@ -245,7 +245,11 @@ static device_method_t ath_pci_methods[] = { { 0,0 } }; static driver_t ath_pci_driver = { +#ifdef __HAIKU__ + "ath_pci", +#else "ath", +#endif ath_pci_methods, sizeof (struct ath_pci_softc) }; diff --git a/src/libs/compat/freebsd_network/compat.c b/src/libs/compat/freebsd_network/compat.c index de2c046612..caa8c0ecf1 100644 --- a/src/libs/compat/freebsd_network/compat.c +++ b/src/libs/compat/freebsd_network/compat.c @@ -323,8 +323,10 @@ device_add_child(device_t parent, const char *name, int unit) snprintf(symbol, sizeof(symbol), "__fbsd_%s_%s", name, parent->driver->name); if (get_image_symbol(find_own_image(), symbol, B_SYMBOL_TYPE_DATA, - (void **)&driver) == B_OK) + (void **)&driver) == B_OK) { child = new_device(*driver); + } else + device_printf(parent, "couldn't find symbol %s\n", symbol); } } else child = new_device(NULL);