Contribute
Register

Intel WiFi Driver Effort

Status
Not open for further replies.
@ydeng, @RehabMan, guys, do you know how does kxld work internally?

My problem is that I get the error
Code:
(kernel) kxld[net.rpeshkov.IntelWifi]: The super class vtable '__ZTV17IO80211Controller' for vtable '__ZTV9IntelWifi' is out of date. Make sure your kext has been built against the correct headers.
when I try to use IO80211Controller in IntelWifi. I use absolutely the same headers that I used in black80211. All necessary methods are implemented. black80211 loads fine, IntelWifi - doesn't load because of errors.

First I thought that the problem is related with my IwlTransOps interface that I implement in IntelWifi, but if I do the same in black80211 - it works, but IntelWifi doesn't work.

I've also tried to cleanup IntelWifi so that it will contain identical overrides of methods that I override in black80211 - still no joy.

I've digged a bit into kxld sources in xnu and found where the error occurs: https://github.com/clemensg/xnu/blo...5f642613f2da7/libkern/kxld/kxld_vtable.c#L548

Comment is the following:
Code:
/* 4) If the parent vtable entry is a pad slot, and the child does not
         * match it, then the child was built against a newer version of the
         * libraries, so it is binary-incompatible.
         */

While I understand how the error is defined, I don't get why I get error in first case (IntelWifi) and don't get it in second (black80211) having identical system, headers and dependencies in Info.plist.
 
No multiple inheritance in iokit. You have to embed IwlTransOps in IntelWifi.

>> Hi Hagen,
>>
>> IOKit uses a restricted subset of C++ (based on Embedded C++) as its
>> programming language.
>> The following features of C++ are not allowed in this subset:
>>
>> - exceptions
>> - multiple inheritance (!!!)
>> - templates
>> - RTTI (use OSDynamicCast macro instead)
>>
>> Regards,
>> - Alexander

https://lists.apple.com/archives/darwin-drivers/2010/Jun/msg00020.html
 
No multiple inheritance in iokit. You have to embed IwlTransOps in IntelWifi.

>> Hi Hagen,
>>
>> IOKit uses a restricted subset of C++ (based on Embedded C++) as its
>> programming language.
>> The following features of C++ are not allowed in this subset:
>>
>> - exceptions
>> - multiple inheritance (!!!)
>> - templates
>> - RTTI (use OSDynamicCast macro instead)
>>
>> Regards,
>> - Alexander

https://lists.apple.com/archives/darwin-drivers/2010/Jun/msg00020.html
Hum, that's interesting... I've tried to use multiple inheritance in black80211, because I thought that it was the reason, but black80211 kext was loaded successfully even with multiple inheritance. Ok, I'll try to switch to aggregation.
 
Hey mate! I just wanted to say great work so far. I have got DVM based Ultimate 6300N and willing to help test anything! Hope this goes well :headbang:
 
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&sou...FjADegQIBhAB&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.
 
Status
Not open for further replies.
Back
Top