zxystd / AppleIntelWifiAdapter

苹果IO80211Controller调用
189 stars 20 forks source link

Intel 9462 #17

Open lgariv opened 4 years ago

lgariv commented 4 years ago

I just saw that you got 9560 to work. I've gone through the code, and couldn't understand what is needed to get each device to work exactly (I don't have a lot of experience with that)... but as far as I know, there are many similarities between the 9462 (the one I have) and 9560.

so I did a little search and found some PCI device IDs here (there are 55 of them for 9462).

I used this commit, as the latest one freezes my Hackbook as soon as I load it.

I thought that I'd try to add it to AppleIntelWifiAdapter/device/IWLDeviceList.h (knowing that it is probably not enough) and see what I can make out of it.

Then, I also added the following into AppleIntelWifiAdapter/device/IWLDevice9000.h at line 138 :

#define IWL_DEVICE_9462         \
    .trans.xtal_latency = 5000, \
    .trans.integrated = true,   \
    IWL_DEVICE_9000

#define IWL_DEVICE_9462_SHARED_CLK                      \
    .trans.xtal_latency = 5000,                         \
    .trans.integrated = true,                           \
    .trans.extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK, \
    IWL_DEVICE_9000

const struct iwl_cfg iwl9462_cfg = {
    IWL_DEVICE_9462
};

const struct iwl_cfg iwl9462_shared_clk_cfg = {
    IWL_DEVICE_9462_SHARED_CLK,
};

as well as the following in the same file at line 200 :

const struct iwl_cfg iwl9462_2ac_cfg_soc = {
    .fw_name_pre = IWL9000_FW_PRE,
    IWL_DEVICE_9462
};

I did this as I saw in a linux driver (closed that tab, I'll add a link if I find it) that 9560 and 9462 has the same latency, and same fw (I don't know if what I'm saying makes much sense).

I don't think that is enough to get it to work, so if I'm missing something please let me know and I'll do my best to improve that.

Anyway, I compiled it and loaded it, and my Hackbook sees a new "ethernet" device in System Information for some reason, with the MAC address (not functional yet, obviously).

I don't know how big of an achievement that really is, but I thought I might share that in case that it helps in any way and also if anyone can direct towards how to proceed from here.