Intel Wi-Fi 6 AX200

  • In this section, you are going to learn

  • How to load Intel wifi linux driver for Intel Wi-Fi 6 AX200 PCIe chipset

Diagram

Features

Hardware Interface

PCIE x 1

Colour

AX200

Compatible Devices

Laptop, Desktop

Data Link Protocol

802.11ax, WiFi 6, Bluetooth 5.2, 802.11 ac/b/g/n

Data Transfer Rate

2.4 Gigabits Per Second

Item Weight

2.9 Grams

#

Version

Ubuntu

Ubuntu 22.04 64 bit

Linux Kernel

6.9.0

Wifi chip

Intel

Chipset version

Wi-Fi 6 AX200

  • Check the wifi chipset present in your system by running the below command:

test:~$ lspci
00:00.0 Host bridge: Intel Corporation Comet Lake-U v1 4c Host Bridge/DRAM Controller (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation CometLake-U GT2 [UHD Graphics] (rev 02)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model
:12.0 Signal processing controller: Intel Corporation Comet Lake Thermal Subsytem
:14.0 USB controller: Intel Corporation Comet Lake PCH-LP USB 3.1 xHCI Host Controller
:14.2 RAM memory: Intel Corporation Comet Lake PCH-LP Shared SRAM
:15.0 Serial bus controller: Intel Corporation Serial IO I2C Host Controller
:15.2 Serial bus controller: Intel Corporation Comet Lake PCH-LP LPSS: I2C Controller #2
:16.0 Communication controller: Intel Corporation Comet Lake Management Engine Interface
:17.0 SATA controller: Intel Corporation Comet Lake SATA AHCI Controller
:1d.0 PCI bridge: Intel Corporation Comet Lake PCI Express Root Port #9 (rev f0)
:1d.1 PCI bridge: Intel Corporation Comet Lake PCI Express Root Port #10 (rev f0)
:1d.3 PCI bridge: Intel Corporation Comet Lake PCI Express Root Port #12 (rev f0)
:1f.0 ISA bridge: Intel Corporation Comet Lake PCH-LP LPC Premium Controller/eSPI Controller
:1f.3 Audio device: Intel Corporation Comet Lake PCH-LP cAVS
:1f.4 SMBus: Intel Corporation Comet Lake PCH-LP SMBus Host Controller
:1f.5 Serial bus controller: Intel Corporation Comet Lake SPI (flash) Controller
:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (10) I219-V
:00.0 Network controller: Intel Corporation Wi-Fi 6 AX200 (rev 1a)
:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader (rev 01)
  • Stop applications by running the commands below:

test:~$ pwd
/home/test

test:~$ sudo systemctl stop NetworkManager.service

test:~$ sudo killall wpa_supplicant hostapd

test:~$ ps -N | grep -i wpa_supplicant

test:~$ ps -N | grep -i hostapd
  • Run lsmod commands:

test:linux-6.9$ lsmod | grep -i wifi
iwlwifi               606208  2 iwldvm,iwlmvm
cfg80211             1318912  4 iwldvm,iwlmvm,iwlwifi,mac80211

test:linux-6.9$ lsmod | grep -i mac80211
mac80211             1691648  2 iwldvm,iwlmvm
libarc4                12288  3 lib80211_crypt_tkip,lib80211_crypt_wep,mac80211
cfg80211             1318912  4 iwldvm,iwlmvm,iwlwifi,mac80211

test:linux-6.9$ lsmod | grep -i lib80211
lib80211_crypt_tkip    24576  0
lib80211_crypt_ccmp    16384  0
lib80211_crypt_wep     12288  0
libarc4                12288  3 lib80211_crypt_tkip,lib80211_crypt_wep,mac80211
lib80211               16384  3 lib80211_crypt_tkip,lib80211_crypt_wep,lib80211_crypt_ccmp
  • Now, remove drivers by executing rmmod command as shown below:

test:~$ sudo rmmod iwlmvm
test:~$ sudo rmmod iwldvm
test:~$ sudo rmmod iwlwifi
test:~$ sudo rmmod mac80211
test:~$ sudo rmmod lib80211_crypt_tkip
test:~$ sudo rmmod lib80211_crypt_ccmp
test:~$ sudo rmmod lib80211_crypt_wep
test:~$ sudo rmmod lib80211
test:~$ sudo rmmod cfg80211
$ cd /home/test/linux-6.9
  • Compile wireless modules as shown below:

test:linux-6.9$ pwd
/home/test/linux-6.9

test:linux-6.9$ sudo make -C . M=net/wireless/
  • Observe the following output after executing above make command:

make: Entering directory "/home/test/linux-6.9"
CC [M]  net/wireless/core.o
LD [M]  net/wireless/cfg80211.o
CC [M]  net/wireless/lib80211.o
CC [M]  net/wireless/lib80211_crypt_wep.o
CC [M]  net/wireless/lib80211_crypt_ccmp.o
CC [M]  net/wireless/lib80211_crypt_tkip.o
MODPOST net/wireless/Module.symvers
LD [M]  net/wireless/cfg80211.ko
LD [M]  net/wireless/lib80211.ko
LD [M]  net/wireless/lib80211_crypt_wep.ko
LD [M]  net/wireless/lib80211_crypt_ccmp.ko
LD [M]  net/wireless/lib80211_crypt_tkip.ko
make: Leaving directory "/home/test/linux-6.9"
  • Now run the following make command:

test:linux-6.9$ sudo make -C . M=net/mac80211
make: Entering directory "/home/test/linux-6.9"
  CC [M]  net/mac80211/main.o
  LD [M]  net/mac80211/mac80211.o
  MODPOST net/mac80211/Module.symvers
  LD [M]  net/mac80211/mac80211.ko
make: Leaving directory "/home/test/linux-6.9"
  • Then, execute the below command:

test:linux-6.9$ sudo make -C . M=drivers/net/wireless/intel/iwlwifi
make: Entering directory "/home/test/linux-6.9"
  CC [M]  drivers/net/wireless/intel/iwlwifi/iwl-drv.o
  LD [M]  drivers/net/wireless/intel/iwlwifi/iwlwifi.o
  CC [M]  drivers/net/wireless/intel/iwlwifi/dvm/main.o
  LD [M]  drivers/net/wireless/intel/iwlwifi/dvm/iwldvm.o
  CC [M]  drivers/net/wireless/intel/iwlwifi/mvm/ops.o
  LD [M]  drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.o
  MODPOST drivers/net/wireless/intel/iwlwifi/Module.symvers
  LD [M]  drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
  LD [M]  drivers/net/wireless/intel/iwlwifi/dvm/iwldvm.ko
  LD [M]  drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko
make: Leaving directory "/home/test/linux-6.9"
  • Run find command to search for “.ko” files in wireless directory:

test:linux-6.9$ find ./net/wireless/ -iname "*.ko" -print
./net/wireless/lib80211_crypt_tkip.ko
./net/wireless/lib80211.ko
./net/wireless/cfg80211.ko
./net/wireless/lib80211_crypt_ccmp.ko
./net/wireless/lib80211_crypt_wep.ko
  • Run find command to search for “.ko” files in mac80211 directory:

test:linux-6.9$ find ./net/mac80211/ -iname "*.ko" -print
./net/mac80211/mac80211.ko
  • Run find command to search for “.ko” files in iwlwifi directory:

test:linux-6.9$ find ./drivers/net/wireless/intel/iwlwifi/ -iname "*.ko" -print
./drivers/net/wireless/intel/iwlwifi/dvm/iwldvm.ko
./drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko
./drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
  • Run find command to search for “.ko” files in lib/modules/6.9.0/kernel/net/wireless directory:

test:linux-6.9$ find  /lib/modules/6.9.0/kernel/net/wireless/ -iname "*.ko.zst*" -print
/lib/modules/6.9.0/kernel/net/wireless/lib80211_crypt_tkip.ko.zst
/lib/modules/6.9.0/kernel/net/wireless/lib80211.ko.zst
/lib/modules/6.9.0/kernel/net/wireless/cfg80211.ko.zst
/lib/modules/6.9.0/kernel/net/wireless/lib80211_crypt_ccmp.ko.zst
/lib/modules/6.9.0/kernel/net/wireless/lib80211_crypt_wep.ko.zst
  • Run find command to search for “.ko” files in mac80211 directory:

test:linux-6.9$ find  /lib/modules/6.9.0/kernel/net/mac80211/ -iname "*.ko.zst*" -print
/lib/modules/6.9.0/kernel/net/mac80211/mac80211.ko.zst
  • Run find command to search for “.ko” files in iwlwifi directory:

test:linux-6.9$ find  /lib/modules/6.9.0/kernel/drivers/net/wireless/intel/iwlwifi/ -iname "*.ko.zst*" -print
/lib/modules/6.9.0/kernel/drivers/net/wireless/intel/iwlwifi/dvm/iwldvm.ko.zst
/lib/modules/6.9.0/kernel/drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko.zst
/lib/modules/6.9.0/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko.zst
  • Remove the following .zst files:

test:linux-6.9$ sudo rm /lib/modules/6.9.0/kernel/net/wireless/lib80211_crypt_tkip.ko.zst
test:linux-6.9$ sudo rm /lib/modules/6.9.0/kernel/net/wireless/lib80211.ko.zst
test:linux-6.9$ sudo rm /lib/modules/6.9.0/kernel/net/wireless/cfg80211.ko.zst
test:linux-6.9$ sudo rm /lib/modules/6.9.0/kernel/net/wireless/lib80211_crypt_ccmp.ko.zst
test:linux-6.9$ sudo rm /lib/modules/6.9.0/kernel/net/wireless/lib80211_crypt_wep.ko.zst
test:linux-6.9$ sudo rm /lib/modules/6.9.0/kernel/net/mac80211/mac80211.ko.zst
test:linux-6.9$ sudo rm /lib/modules/6.9.0/kernel/drivers/net/wireless/intel/iwlwifi/dvm/iwldvm.ko.zst
test:linux-6.9$ sudo rm /lib/modules/6.9.0/kernel/drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko.zst
test:linux-6.9$ sudo rm /lib/modules/6.9.0/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko.zst
  • You may restart your system using the command below:

$ reboot
  • Repeat Step 2

$ cd /home/test/linux-6.9
  • Repeat Step 4

test:linux-6.9$ sudo dmesg -c
$ sudo insmod ./net/wireless/cfg80211.ko
$ sudo insmod ./net/wireless/lib80211.ko
$ sudo insmod ./lib/crypto/libarc4.ko
$ sudo insmod ./net/wireless/lib80211_crypt_wep.ko
$ sudo insmod ./net/wireless/lib80211_crypt_ccmp.ko
$ sudo insmod ./net/wireless/lib80211_crypt_tkip.ko
$ sudo insmod ./net/mac80211/mac80211.ko
$ sudo insmod ./drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
$ sudo insmod ./drivers/net/wireless/intel/iwlwifi/dvm/iwldvm.ko
$ sudo insmod ./drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko
test:linux-6.9$ lsmod
Module                  Size  Used by
iwlmvm                835584  0
iwldvm                352256  0
iwlwifi               606208  2 iwldvm,iwlmvm
mac80211             1691648  2 iwldvm,iwlmvm
lib80211_crypt_tkip    24576  0
lib80211_crypt_ccmp    16384  0
lib80211_crypt_wep     12288  0
libarc4                12288  3 lib80211_crypt_tkip,lib80211_crypt_wep,mac80211
lib80211               16384  3 lib80211_crypt_tkip,lib80211_crypt_wep,lib80211_crypt_ccmp
cfg80211             1318912  4 iwldvm,iwlmvm,iwlwifi,mac80211
test:linux-6.9$ iwconfig
lo        no wireless extensions.

enp0s31f6  no wireless extensions.

wlp4s0    IEEE 802.11  ESSID:off/any
  Mode:Managed  Access Point: Not-Associated
  Retry short limit:7   RTS thr:off   Fragment thr:off
  Power Management:on
  • Open below files with vim and add prints in module_init and module_exit functions:

test:linux-6.9$ pwd
/home/test/linux-6.9

./net/wireless/lib80211.c
./net/wireless/lib80211_crypt_wep.c
./net/wireless/lib80211_crypt_tkip.c
./net/wireless/core.c
./net/wireless/lib80211_crypt_ccmp.c
./net/mac80211/main.c
./drivers/net/wireless/intel/iwlwifi/dvm/main.c
./drivers/net/wireless/intel/iwlwifi/iwl-drv.c
./drivers/net/wireless/intel/iwlwifi/mvm/ops.c
  • Open nl80211.c file with vim, add prints in all .doit functions in nl80211_small_ops

test:linux-6.9/net/wireless$ vi nl80211.c
static const struct genl_small_ops nl80211_small_ops[] = {
        {
                .cmd = NL80211_CMD_SET_WIPHY,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
                .doit = nl80211_set_wiphy,
                .flags = GENL_UNS_ADMIN_PERM,
        },
        {
                .cmd = NL80211_CMD_GET_INTERFACE,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
                .doit = nl80211_get_interface,
                .dumpit = nl80211_dump_interface,
                /* can be retrieved by unprivileged users */
                .internal_flags = IFLAGS(NL80211_FLAG_NEED_WDEV),
        },
        {
                .cmd = NL80211_CMD_SET_INTERFACE,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
                .doit = nl80211_set_interface,
                .flags = GENL_UNS_ADMIN_PERM,
                .internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV |
                 NL80211_FLAG_NEED_RTNL),
        },
  • Open cfg.c file with vim, add prints in all functions in mac80211_config_ops

test:linux-6.9/net/mac80211$ vi cfg.c
const struct cfg80211_ops mac80211_config_ops = {
        .add_virtual_intf = ieee80211_add_iface,
        .del_virtual_intf = ieee80211_del_iface,
        .change_virtual_intf = ieee80211_change_iface,
        .start_p2p_device = ieee80211_start_p2p_device,
        .stop_p2p_device = ieee80211_stop_p2p_device,
  • Open mac80211.c file with vim, add prints in all functions in iwl_mvm_hw_ops

test:linux-6.9/drivers/net/wireless/intel/iwlwifi/mvm$ vi mac80211.c
const struct ieee80211_ops iwl_mvm_hw_ops = {
        .tx = iwl_mvm_mac_tx,
        .wake_tx_queue = iwl_mvm_mac_wake_tx_queue,
        .ampdu_action = iwl_mvm_mac_ampdu_action,
        .get_antenna = iwl_mvm_op_get_antenna,
        .set_antenna = iwl_mvm_op_set_antenna,
        .start = iwl_mvm_mac_start,
        .reconfig_complete = iwl_mvm_mac_reconfig_complete,
        .stop = iwl_mvm_mac_stop,
        .add_interface = iwl_mvm_mac_add_interface,
  • Open iface.c file with vim, add prints in all functions in ieee80211_dataif_ops

test:linux-6.9/net/mac80211$ vi ./iface.c
static const struct net_device_ops ieee80211_dataif_ops = {
        .ndo_open               = ieee80211_open,
        .ndo_stop               = ieee80211_stop,
        .ndo_uninit             = ieee80211_uninit,
        .ndo_start_xmit         = ieee80211_subif_start_xmit,
        .ndo_set_rx_mode        = ieee80211_set_multicast_list,
        .ndo_set_mac_address    = ieee80211_change_mac,
        .ndo_get_stats64        = ieee80211_get_stats64,
        .ndo_setup_tc           = ieee80211_netdev_setup_tc,
};