summaryrefslogtreecommitdiffstats
path: root/sys/compat/ndis/kern_windrv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/ndis/kern_windrv.c')
-rw-r--r--sys/compat/ndis/kern_windrv.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/compat/ndis/kern_windrv.c b/sys/compat/ndis/kern_windrv.c
index 00d8e8d..021bea6 100644
--- a/sys/compat/ndis/kern_windrv.c
+++ b/sys/compat/ndis/kern_windrv.c
@@ -56,6 +56,9 @@ __FBSDID("$FreeBSD$");
#include <machine/segments.h>
#endif
+#include <dev/usb/usb.h>
+#include <dev/usb/usbdi.h>
+
#include <compat/ndis/pe_var.h>
#include <compat/ndis/cfg_var.h>
#include <compat/ndis/resource_var.h>
@@ -349,9 +352,11 @@ windrv_load(mod, img, len, bustype, devlist, regvals)
if (pe_patch_imports(img, "NDIS", ndis_functbl))
return(ENOEXEC);
- /* Dynamically link the HAL.dll routines -- also required. */
- if (pe_patch_imports(img, "HAL", hal_functbl))
- return(ENOEXEC);
+ /* Dynamically link the HAL.dll routines -- optional. */
+ if (pe_get_import_descriptor(img, &imp_desc, "HAL") == 0) {
+ if (pe_patch_imports(img, "HAL", hal_functbl))
+ return(ENOEXEC);
+ }
/* Dynamically link ntoskrnl.exe -- optional. */
if (pe_get_import_descriptor(img, &imp_desc, "ntoskrnl") == 0) {
OpenPOWER on IntegriCloud