iwlwifi: i7260 does not load firmware properly/wifi not working

From: FreeBSD User <freebsd_at_walstatt-de.de>
Date: Mon, 21 Mar 2022 13:11:21 UTC
Subject is a notebook Lenovo E540 equipted with an Intel i7260 WiFi adaptor,

iwm0@pci0:5:0:0:        class=0x028000 rev=0x73 hdr=0x00 vendor=0x8086 device=0x08b2
subvendor=0x8086 subdevice=0x4262 vendor     = 'Intel Corporation'
    device     = 'Wireless 7260'
    class      = network
    bar   [10] = type Memory, range 64, base 0xf1c00000, size 8192, enabled
    cap 01[c8] = powerspec 3  supports D0 D3  current D0
    cap 05[d0] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 10[40] = PCI-Express 2 endpoint max data 128(128) FLR RO NS
                 max read 128
                 link x1(x1) speed 2.5(2.5) ASPM L1(L0s/L1) ClockPM enabled
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 0 corrected
    ecap 0003[140] = Serial 1 XXXXXXXXXX
    ecap 0018[14c] = LTR 1
    ecap 000b[154] = Vendor [1] ID cafe Rev 1 Length 20

Running FreeBSD 13.1-STABLE (FreeBSD 13.1-STABLE #86 stable/13-n250051-ddb842e2ad6: Sun
Mar 20 20:49:26 CET 2022 amd64), using if_iwm is a horrible mess and almost unusable
(configured both re0 and wlan0 as "lagg0").

I tried - several time since iwlwifi is available for FreeBSD 13, iwlwifi, but without
any success.
I have to load if_iwlwifi.ko via /boo/loader.conf[.local], since outoloading iwlwifi does
not work by defining 


in /etc/rc.conf. Loading iwlwifi via /boot/loader.conf.local leaves me with two problems:

first, the firmware does not load, although setting these lines in /etc/rc.conf.local:

# Intel WiFi driver for Linux
(also tried:
# Intel WiFi driver for Linux

I'm not aware but I might remember that there is a rc script issue causing this regarding
the "_" and "-" interpretation. So the weird part is, that something alway load the
if_iwm.ko module additionaly and I have no clue were this comes from.

Without manual intervention dmesg reports this error:

Intel(R) Wireless WiFi based driver for FreeBSD
iwlwifi0: <iwlwifi> mem 0xf1c00000-0xf1c01fff at device 0.0 on pci4
iwlwifi0: could not load firmware image 'iwlwifi-7260-17.ucode'
iwlwifi0: File size way too small!
iwlwifi0: no suitable firmware found!
iwlwifi0: iwlwifi-7260-17 is required
iwlwifi0: check git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

Loading the firmware manually by typing 

"kldload /boot/kernel/iwlwifi-7260-17.ucode.ko"

does finally load the firmware, but there is no wifi adpator at all ...

Kind regards,