From: Pavel Roskin <proski@gn...> - 2008-01-29 22:13:18
The latest ndiswrapper doesn't compile for the latest Fedora kernel. It
turns out the code it incorrect if CONFIG_DEBUG_SHIRQ is enabled. the
"interrupt" variable is wrongly called "kinterrupt" is some places.
Also, transparent unions are not enabled by default, and it would be
better to avoid them in any case. I don't understand why it's needed at
all. "processor_number" is not used at all. Also, using values 0 and 1
for "enabled" seems unsafe, as these could be valid processor numbers.
Anyway, the patched ndiswrapper works for me (Broadcom bcm4328, x86_64).
--- driver/winnt_types.h (revision 2540)
+++ driver/winnt_types.h (working copy)
@@ -1328,7 +1328,7 @@
+ } u;
struct nt_list list;
--- driver/ntoskernel_io.c (revision 2540)
+++ driver/ntoskernel_io.c (working copy)
@@ -525,7 +525,7 @@
- if (!kinterrupt->enabled)
+ if (!interrupt->u.enabled)
@@ -572,7 +572,7 @@
*kinterrupt = interrupt;
- kinterrupt->enabled = 1;
+ interrupt->u.enabled = 1;
@@ -581,7 +581,7 @@
(struct kinterrupt *interrupt)
- kinterrupt->enabled = 0;
+ interrupt->u.enabled = 0;
--- Pavel Roskin <proski@...> wrote:
> Also, transparent unions are not enabled by default, and it would be
> better to avoid them in any case. I don't understand why it's needed at
> all. "processor_number" is not used at all. Also, using values 0 and 1
> for "enabled" seems unsafe, as these could be valid processor numbers.
Patch applied; thanks.
processor_number is the Windows field. Drivers are not supposed to use it -
it is for Windows kernel only. Since ndiswrapper has no use for it, I
hijacked that space for 'enabled' field.
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ