Bug 227044 - Add support for Intel 9260 and 5165 (iwm) wireless devices
Summary: Add support for Intel 9260 and 5165 (iwm) wireless devices
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: wireless (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-wireless mailing list
Keywords: feature, needs-patch
Depends on:
Reported: 2018-03-28 18:14 UTC by Hanno Meyer-Thurow (geki)
Modified: 2019-10-16 15:55 UTC (History)
20 users (show)

See Also:

tar includes sources, firmware, etc. (428.50 KB, application/x-tar)
2019-03-08 21:55 UTC, Nils Johannsen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hanno Meyer-Thurow (geki) 2018-03-28 18:14:28 UTC
Well, the notebook[0] I am going to buy, as soon as my current one breaks down, is with an Intel 9260 chipset. And I would really like to run TrueOS, which is based on FreeBSD.

Looking at the Linux support, it seems to be mostly about configuration parameter sets for these chipsets. Added links[1-9] below to see the changes of Linux. And two more links[10-11] to the current configuration parameter set files.

If anyone is interested to look at this on how to integrate, or if there is more to it than just configuration.

[0] https://www.mysn.de/slim-laptops/schenker-slim14-l17

[1] https://github.com/torvalds/linux/commit/89374fe60bfb481a81b941adaa5e834ace2cc9df
[2] https://github.com/torvalds/linux/commit/aea2a5f0d84745f34eb37bc5eada9ecced40fa88
[3] https://github.com/torvalds/linux/commit/de766142e3a5fcb67096e24ca4233a7f60999468
[4] https://github.com/torvalds/linux/commit/6c7bb7ebb58c0e17b11aebf928ffc5c295959a01
[5] https://github.com/torvalds/linux/commit/558f479f687aca6a336e13309424a7c3afd32721
[6] https://github.com/torvalds/linux/commit/d7a5b3e9e42ee95190742fef0d617bbde4f74d80
[7] https://github.com/torvalds/linux/commit/c2c48ddfc8b03b9ecb51d2832b586497b37531bc
[8] https://github.com/torvalds/linux/commit/dbc89253a7e15f8f031fb1eeb956de91204655e3
[9] https://github.com/torvalds/linux/commit/567deca8e72df3ceb6c07c63f8541a4928f64d3b

[10] https://github.com/torvalds/linux/blob/master/drivers/net/wireless/intel/iwlwifi/cfg/9000.c
[11] https://github.com/torvalds/linux/blob/master/drivers/net/wireless/intel/iwlwifi/cfg/5000.c
Comment 1 Nils Johannsen 2019-03-08 21:55:25 UTC
Created attachment 202728 [details]
tar includes sources, firmware, etc.

I'm still new to FreeBSD, especially developing drivers is new for me... nevertheless I like to get the "Intel Wireless AC 9260" on my "ThinkPad E490" running in FreeBSD and tried to follow these changesets in the iwm whose already solved a similar task for another chipsets:
[Add support for Intel 8265 WiFi](https://github.com/freebsd/freebsd/commit/a06e5178adcde2036444b756a2e996513ec570bd)
[Add support for iwm 3168 cards](https://github.com/freebsd/freebsd/commit/5237c88c1abcac87b47cc12cee1dff7de106d4d0)

But I still stock at the firmware whose I've downloaded and uuencoded but seems to be not compatible... could anybody follow up this issue? 
My changes, sources, firmware you will find attached, as well as some results.

# dmesg > dmesg-2.txt
iwm0: <Intel(R) Dual Band Wireless AC 9260> mem 0xa1200000-0xa1203fff at device 0.0 on pci3
iwm0: api index=0, flags=0xdd9afffb
iwm0: api index=1, flags=0x00000087
iwm0: api flags index 1 larger than supported by driver
iwm0: iwm_mvm_load_ucode_wait_alive: Loaded ucode is not valid
iwm0: Failed to start INIT ucode: 5

# pciconf -lbcev > pciconf-1.txt
iwm0@pci0:5:0:0:	class=0x028000 card=0x00148086 chip=0x25268086 rev=0x29 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Wireless-AC 9260'
    class      = network
    bar   [10] = type Memory, range 64, base rxa1200000, size 16384, enabled
    cap 01[c8] = powerspec 3  supports D0 D3  current D0
    cap 05[d0] = MSI supports 1 message, 64 bit 
    cap 10[40] = PCI-Express 2 endpoint max data 128(128) FLR RO NS
                 link x1(x1) speed 5.0(5.0) ASPM L1(L1)
    cap 11[80] = MSI-X supports 16 messages
                 Table in map 0x10[0x2000], PBA in map 0x10[0x3000]
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 0 corrected
    ecap 0018[14c] = LTR 1
    ecap 001e[154] = unknown 1

# vi /usr/src/sys/conf/files
# vi /usr/src/sys/dev/iwm/if_iwm.c
# vi /usr/src/sys/dev/iwm/if_iwm_8000.c
# vi /usr/src/sys/dev/iwm/if_iwm_config.h
# vi /usr/src/sys/modules/iwmfw/Makefile
# vi /usr/src/sys/modules/iwmfw/iwm9260fw/Makefile
# grep '9260' /usr/src/sys/dev/iwm > grep-iwm-1.txt

Download: [Intel® Wireless-AC 9260](iwlwifi-9260-th-b0-jf-b0-34.618819.0.tgz]

# tar -xf iwlwifi-9260-*.tgz
# cd ./iwlwifi-9260*/
# b64encode -o iwm-9260-34.fw.uu iwlwifi-9260-*.ucode iwm-9260-34.fw.uu
# mv iwm-9260-34.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9260-34.fw.uu

# cd /usr/src/sys/modules/iwmfw/iwm9260fw
# make clean all install
==> /boot/modules/iwm9260fw.ko

# cd /usr/src/sys/modules/iwm
# make install
==> /boot/modules/if_iwm.ko

# kldload /boot/modules/iwm9260fw.ko
# kldload /boot/modules/if_iwm.ko
# service netif restart
# dmesg > dmesg-2.txt

Thanks and regards, Nils
Comment 2 wjguo 2019-03-18 13:46:42 UTC
Hi, I and lwhsu did a similar thing a month ago. We added the code for Intel 9560. But, we encountered an issue that it is failed to start the firmware. We referred to iwl driver in a running linux, but did not find the difference that can bring up the firmware. For your reference, the work is on https://github.com/wjguo/freebsd/pull/1
Comment 3 Johannes Lundberg freebsd_committer 2019-05-01 20:43:14 UTC
Any success yet with 9560?
Comment 4 Conrad Meyer freebsd_committer 2019-06-11 04:45:03 UTC
I'm interested in AC 9260
Comment 5 Smog 2019-06-24 06:33:41 UTC
I need driver to.
Comment 6 Braden Gammon 2019-07-24 20:28:15 UTC
Hi, I have a HP laptop with the 9260 chip as well. I have some free time I could contribute, but I am completely new to both FreeBSD and device driver development.