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.
This commit is contained in:
Jerome Duval 2012-02-25 15:38:46 +01:00
parent 65c85d310d
commit 15f3f679cb
2 changed files with 7 additions and 1 deletions

View File

@ -245,7 +245,11 @@ static device_method_t ath_pci_methods[] = {
{ 0,0 } { 0,0 }
}; };
static driver_t ath_pci_driver = { static driver_t ath_pci_driver = {
#ifdef __HAIKU__
"ath_pci",
#else
"ath", "ath",
#endif
ath_pci_methods, ath_pci_methods,
sizeof (struct ath_pci_softc) sizeof (struct ath_pci_softc)
}; };

View File

@ -323,8 +323,10 @@ device_add_child(device_t parent, const char *name, int unit)
snprintf(symbol, sizeof(symbol), "__fbsd_%s_%s", name, snprintf(symbol, sizeof(symbol), "__fbsd_%s_%s", name,
parent->driver->name); parent->driver->name);
if (get_image_symbol(find_own_image(), symbol, B_SYMBOL_TYPE_DATA, if (get_image_symbol(find_own_image(), symbol, B_SYMBOL_TYPE_DATA,
(void **)&driver) == B_OK) (void **)&driver) == B_OK) {
child = new_device(*driver); child = new_device(*driver);
} else
device_printf(parent, "couldn't find symbol %s\n", symbol);
} }
} else } else
child = new_device(NULL); child = new_device(NULL);