Contribute
Register

Intel WiFi Driver Effort

Joined
Feb 21, 2013
Messages
38
Motherboard
Samsung RC530-S01
CPU
Core i7 2630QM
Graphics
Intel HD Graphics 3000
Mobile Phone
iOS
Hi guys,

Unfortunately, I didn't have enough time to work on this driver lately. I decided to switch the job so I had a lot of interviews and preparations for them. Hope to return to driver development shortly.

Those of you who's interested in development and guidance - I'll provide some links with useful information about drivers development and also will write post about setting up vim+gnu global for navigation in linux kernel source.

And what about it?

do these help? --- https://developer.apple.com/documentation and https://developer.apple.com/documentation/network and https://developer.apple.com/documentation/corewlan and https://www.google.com/url?sa=t&source=web&rct=j&url=http://dec8.info/Apple/macos8pdfs/CD_MacOS_8_9_X_4D_Omnis/Apple/Kernel/KEXTutorials.pdf&ved=2ahUKEwj325bz2KfcAhVEVH0KHdTJAXAQFjADegQIBhAB&usg=AOvVaw3XbgGlj2n01JCXjMurj9yx . in your githb you said that you don't know how the connecting to a network part works.. the links seems to say something related to that

and what Rehabman said in another topic (https://www.tonymacx86.com/threads/create-kext-for-qca9377.214444/) related to that: "Writing a WiFi kext would be a huge amount of work. Apple does not document the interfaces in IO80211Family.kext, which means that not only must you create the low level driver code to deal with the hardware itself, you must also create the WiFi user interface code (for dealing with connecting, storing passwords, etc)."

so i guess what you need to create is a WIFI user interface code? that makes connections, etc?

(edit 7-22-18) after reading a little bit about porting a linux network driver to osx, i was wrong to initially say that the code needs to be in user interface code...because according to what i have read thus far, a network driver in osx runs in kernel space... so the code needs to be in kernel space, i think. And I also found a book. Maybe you can read faster than me.
Thanks for the book. I already have it and often refer to this book.

Regarding "interface code" and driver development in general - there are 2 big parts:
1) Part that works with hardware
2) Part that works with network stack of OS

First part is basically the part that's taken from linux kernel source. There are routines for hardware initialisation, firmware loading, microcode upload, buffers allocation, etc.
Second part is not directly related with the driver itself. If you look through linux intel module source, you won't find there implementation of the things like parsing of network frames, DHCP and other stuff that's related with network. Main problem about MacOS is that you don't have headers for 80211 network stack, so everything becomes complicated since you have no idea on how to communicate with it. Only reverse-engineering and trying to resemble headers is possible.
 
Joined
Feb 21, 2013
Messages
38
Motherboard
Samsung RC530-S01
CPU
Core i7 2630QM
Graphics
Intel HD Graphics 3000
Mobile Phone
iOS
Hi guys,

Small update. I finally figured out what was the problem with vtable and built IntelWifi kext that uses IO80211Controller. You can find it in attachment. Also this kext have better matching for PCI devices so it checks whether PCI device is the one that driver knows. Firmwares for all DVM cards also shipped together with kext.

I would like to ask everyone who has DVM card try to load this kext and check whether it loads fine and correctly fills MAC address and Model of device.

Steps to do:
1. Download attached archive with kext and extract it somewhere (home folder is fine).
2. Open network preferences and remove all WiFi adapters if you have any. Push "Apply" button.
3. Open terminal and execute following commands:
Code:
sudo chown -R root:wheel <path to kext>
sudo kextutil <path to kext>
Instead "<path to kext>" placeholder put real path where you extracted the kext.
4. In network preferences add WiFi adapter back and click "Apply".
5. Execute following command in terminal:
Code:
ioreg -p IO80211Plane -n IntelWifi
and check what you have in "IOMACAddress" and "IOModel" values. You should see there model of your device and MAC address of your device. Mine result attached as screenshot.

Thanks!

P.S. Kext will work only under High Sierra (10.13). Sierra (10.12) is incompatible.

Warning!
Do NOT! install kext into /System/Library/Extensions or by using any kext utility. This can break your system!
 

Attachments

Last edited:
Joined
Feb 1, 2016
Messages
14
Motherboard
ASRock Deskmini 110
CPU
i3-6100
Graphics
intel HD530
Mac
MacBook Pro
Mobile Phone
Android
Hi guys,

Small update. I finally figured out what was the problem with vtable and built IntelWifi kext that uses IO80211Controller. You can find it in attachment. Also this kext have better matching for PCI devices so it checks whether PCI device is the one that driver knows. Firmwares for all DVM cards also shipped together with kext.

I would like to ask everyone who has DVM card try to load this kext and check whether it loads fine and correctly fills MAC address and Model of device.

Steps to do:
1. Download attached archive with kext and extract it somewhere (home folder is fine).
2. Open network preferences and remove all WiFi adapters if you have any. Push "Apply" button.
3. Open terminal and execute following commands:
Code:
sudo chown -R root:wheel <path to kext>
sudo kextutil <path to kext>
Instead "<path to kext>" placeholder put real path where you extracted the kext.
4. In network preferences add WiFi adapter back and click "Apply".
5. Execute following command in terminal:
Code:
ioreg -p IO80211Plane -n IntelWifi
and check what you have in "IOMACAddress" and "IOModel" values. You should see there model of your device and MAC address of your device. Mine result attached as screenshot.

Thanks!

P.S. Kext will work only under High Sierra (10.13). Sierra (10.12) is incompatible.

Warning!
Do NOT! install kext into /System/Library/Extensions or by using any kext utility. This can break your system!
hi I have try it but i don't see my wifi
Code:
amjads-iMac:~ amjadmadani$ sudo chown -R root:wheel /Users/amjadmadani/Downloads/IntelWifi.kext 

Password:

amjads-iMac:~ amjadmadani$ sudo kextutil /Users/amjadmadani/Downloads/IntelWifi.kext 

Kext with invalid signatured (-67050) allowed: <OSKext 0x7fe79040ccb0 [0x7fff986fbaf0]> { URL = "file:///Users/amjadmadani/Downloads/IntelWifi.kext/", ID = "net.rpeshkov.IntelWifi" }

Code Signing Failure: code signature is invalid

Invalid signature -67050 for kext <OSKext 0x7fe79040ccb0 [0x7fff986fbaf0]> { URL = "file:///Users/amjadmadani/Downloads/IntelWifi.kext/", ID = "net.rpeshkov.IntelWifi" }

amjads-iMac:~ amjadmadani$ ioreg -p IO80211Plane -n IntelWifi

+-o Root  <class IORegistryEntry, id 0x100000100, retain 8>

amjads-iMac:~ amjadmadani$
 
Joined
Feb 21, 2013
Messages
38
Motherboard
Samsung RC530-S01
CPU
Core i7 2630QM
Graphics
Intel HD Graphics 3000
Mobile Phone
iOS
hi I have try it but i don't see my wifi
Code:
amjads-iMac:~ amjadmadani$ sudo chown -R root:wheel /Users/amjadmadani/Downloads/IntelWifi.kext

Password:

amjads-iMac:~ amjadmadani$ sudo kextutil /Users/amjadmadani/Downloads/IntelWifi.kext

Kext with invalid signatured (-67050) allowed: <OSKext 0x7fe79040ccb0 [0x7fff986fbaf0]> { URL = "file:///Users/amjadmadani/Downloads/IntelWifi.kext/", ID = "net.rpeshkov.IntelWifi" }

Code Signing Failure: code signature is invalid

Invalid signature -67050 for kext <OSKext 0x7fe79040ccb0 [0x7fff986fbaf0]> { URL = "file:///Users/amjadmadani/Downloads/IntelWifi.kext/", ID = "net.rpeshkov.IntelWifi" }

amjads-iMac:~ amjadmadani$ ioreg -p IO80211Plane -n IntelWifi

+-o Root  <class IORegistryEntry, id 0x100000100, retain 8>

amjads-iMac:~ amjadmadani$
What card do you have?
 
Top