Hacker News new | past | comments | ask | show | jobs | submit login

> I remember the first time I managed to get this one laptop's WiFi working without an external dongle and to do that I had to run Windows drivers on Linux via some wrapper-tool (not WINE). To this day I have no idea how that ever worked.

ndiswrapper. It's almost a shibboleth among people who were using Linux on laptops Way Back When.

https://en.wikipedia.org/wiki/NDISwrapper

> NDISwrapper is a free software driver wrapper that enables the use of Windows XP network device drivers (for devices such as PCI cards, USB modems, and routers) on Linux operating systems. NDISwrapper works by implementing the Windows kernel and NDIS APIs and dynamically linking Windows network drivers to this implementation. As a result, it only works on systems based on the instruction set architectures supported by Windows, namely IA-32 and x86-64.

[snip]

> When a Linux application calls a device which is registered on Linux as an NDISwrapper device, the NDISwrapper determines which Windows driver is targeted. It then converts the Linux query into Windows parlance, it calls the Windows driver, waits for the result and translates it into Linux parlance then sends the result back to the Linux application. It's possible from a Linux driver (NDISwrapper is a Linux driver) to call a Windows driver because they both execute in the same address space (the same as the Linux kernel). If the Windows driver is composed of layered drivers (for example one for Ethernet above one for USB) it's the upper layer driver which is called, and this upper layer will create new calls (IRP in Windows parlance) by calling the "mini ntoskrnl". So the "mini ntoskrnl" must know there are other drivers, it must have registered them in its internal database a priori by reading the Windows ".inf" files.

It's kind of amazing it worked as well as it did. It wasn't exactly fun setting it up, but I never had any actual problems with it as I recall.




Yeah I know what ndiswrapper is (though admittedly I had forgotten it's name). I should have been clearer in that I meant I was constantly amazed that such a tool existed in the first place and doubly amazed that it was reliable enough for day to day use.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: