Linux Kernel – How It Chooses Which Firmware Version to Load

14.04driverskernelwireless

I installed the latest firmware for my network card N-7260 from http://wireless.kernel.org/en/users/Drivers/iwlwifi#Firmware.
I am using Ubuntu 14.04 with kernel version 3.14.01 from the kernel's team ppa.
Here is a list of firmware I have in /lib/firmware:

$ ls /lib/firmware/*iwl*7260*
/lib/firmware/iwlwifi-7260-8.ucode  /lib/firmware/org.iwlwifi-7260-7.ucode
/lib/firmware/iwlwifi-7260-9.ucode  /lib/firmware/org.iwlwifi-7260-8.ucode

Right now it seems that version 9 does not load. If I remove version 8, I see on boot the following message:

sudo dmesg | grep iwl
[sudo] password for ozubu: 
[    6.121743] iwlwifi 0000:02:00.0: irq 62 for MSI/MSI-X
[    6.133208] iwlwifi 0000:02:00.0: Direct firmware load failed with error -2
[    6.133211] iwlwifi 0000:02:00.0: Falling back to user helper
[    6.311794] iwlwifi 0000:02:00.0: Direct firmware load failed with error -2
[    6.311799] iwlwifi 0000:02:00.0: Falling back to user helper
[    6.324940] iwlwifi 0000:02:00.0: request for firmware file 'iwlwifi-7260-7.ucode' failed.
[    6.324950] iwlwifi 0000:02:00.0: no suitable firmware found!

So, my question is:

How do I tell linux it should load iwlwifi-7260-9.ucode ?

update

Oddly enough, the firmware version loaded now is 8, at least according to dmesg:

$ sudo dmesg | grep iwl
[sudo] password for ozubu: 
[   18.970651] iwlwifi 0000:02:00.0: irq 62 for MSI/MSI-X
[   19.012648] iwlwifi 0000:02:00.0: loaded firmware version 22.24.8.0 op_mode iwlmvm
[   19.315472] iwlwifi 0000:02:00.0: Detected Intel(R) Wireless N 7260, REV=0x144
[   19.315899] iwlwifi 0000:02:00.0: L1 Disabled; Enabling L0S
[   19.316118] iwlwifi 0000:02:00.0: L1 Disabled; Enabling L0S
[   19.523132] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
[   23.100268] iwlwifi 0000:02:00.0: L1 Disabled; Enabling L0S
[   23.100484] iwlwifi 0000:02:00.0: L1 Disabled; Enabling L0S

Best Answer

The firmware version that is requested is written into the driver code. As you can see, the particular version if iwlwifi that you are using requests -7 firmware. It can't find it and ends in an error. You can see this in modinfo iwlwifi:

$ modinfo iwlwifi
filename:       /lib/modules/3.13.0-24-generic/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko
license:        GPL
author:         Copyright(c) 2003-2013 Intel Corporation <ilw@linux.intel.com>
version:        in-tree:
description:    Intel(R) Wireless WiFi driver for Linux
<snip>
firmware:       iwlwifi-7260-7.ucode

What does yours report? Have you tried re-naming the -9 firmware as -7, after backing up, of course?

I actually believe that, for 7260 devices, modinfo suggests -7 but the driver actually uses -8. I am unaware of any driver version that calls for -9. Perhaps kernel version 3.15-xx.

Related Question