[haiku-development] Re: Writing a Haiku wifi driver

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 10 Jun 2014 21:06:43 +0200

Hi Stefano,

Am 10/06/2014 20:53, schrieb Stefano Ceccherini:
[...] I realized that there is NO "native" Haiku Wifi driver to
use as sample, except the Intel IPW2100, which uses some "trick" (a
custom setting file) instead of integrating with the rest of the system.
Is there a list of the ioctls which have to be handled by a wireless NIC
card ?

That depends. You have two choices:
1) Create a FreeBSD compatible ioctl interface. The ioctls are somewhat documented IIRC. 2) Define your own ioctl interface, and write a wpa_supplicant driver for it.

Moreover, I noticed that the freebsd layer has the crypto and iee80211
code needed to handle the wifi stuff, but is it meant to be used only in
the freebsd layer ?

The problem is that those layers are tightly integrated with FreeBSD internals like the driver structures. Theoretically, you should be able to abstract them further, and make real Haiku modules out of them (probably in addition rather than as a replacement for the FreeBSD compatibility layer). It's probably not even that hard to do, but testing could get tedious, as you need to touch a lot of code.

Was there a plan to be able to write "native" Haiku wifi driver?

Yes, that was Colin's original intention. He just never got that far :-)
I think it would make sense to keep the final solution BSD compatible, though (ie. solution 1. from above), so that we don't need to touch external tools like wpa_supplicant as well. Plus, it's a documented and complete interface.

Bye,
   Axel.


Other related posts: