# Writing Wireless network drivers



## Unee0x (Mar 20, 2018)

Will someone please point me in the right direction towards learning to understand and write a driver for wireless network adapter?
I’m currently going through “FreeBSD Device drivers by Joseph Kong”
I don’t see a section based on writing wireless network device drivers.
My goal is to write drivers for USB wifi adapters and internal wireless network cards.
Thank you  in advance for any and all resources.


----------



## Oko (Mar 20, 2018)

If the devices you are trying to write drivers for were documented somebody would have already written a driver. They are likely closed hardware. Short of you getting a PhD in reverse engineering you have no chance to write a driver even if you had know-how which you obviously don't have based on you question. Most Linux drivers for such devices are binary blobs written by the manufacturer.

To get an idea what you are getting yourself into start here

https://www.netbsd.org/docs/kernel/ddwg.html


----------



## tobik@ (Mar 20, 2018)

Unee0x said:


> Will someone please point me in the right direction towards learning to understand and write a driver for wireless network adapter?
> I’m currently going through “FreeBSD Device drivers by Joseph Kong”
> I don’t see a section based on writing wireless network device drivers.
> My goal is to write drivers for USB wifi adapters and internal wireless network cards.
> Thank you  in advance for any and all resources.


I think you should ask this on the freebsd-wireless and/or freebsd-hackers mailing lists, because here you'll only get answers like the one from Oko about topics like this...


----------



## ralphbsz (Mar 21, 2018)

In addition to learning the requires skills (802.11 is very complicated!), you need documentation for the device itself.  Try the following experiment: Contact the manufacturer of the wireless adapter, and ask for a complete set of interface documentation.  Tell them you need it in enough detail to write a driver for the card.  As Oko already hinted at: most likely they will laugh at you.  Or require you to sign an NDA (which probably prevents you from then releasing the driver you wrote to anyone, making it useless).


----------



## fnoyanisi (Mar 25, 2018)

You might have already looked into these, but in case you have not

https://svnweb.freebsd.org/base/head/sys/dev/iwm/

https://svnweb.freebsd.org/base/head/sys/dev/iwn/
https://svnweb.freebsd.org/base/head/sys/dev/iwi/
https://svnweb.freebsd.org/base/head/sys/dev/iwi/

The iwm(4) is fairly more complicated compares with iwn(4) and iwi(4).


----------

