Qualcomm Atheros QCA6174

From Gentoo Wiki
Jump to:navigation Jump to:search
The information in this article is representative of former times and has been archived. It can be used for reference, but is most likely not appropriate for current usage. Generally, archived articles should not be edited.

The Qualcomm Atheros QCA6174 is a 802.11ac Wireless Network Adapter which is used in some laptops.

To make it work it needs the kernel driver and firmware.

Kernel

Precondition

Activate at least cfg80211 (CONFIG_CFG80211) and mac80211 (CONFIG_MAC80211).

KERNEL linux-4.19 example
[*] Networking support  --->
    [*] Wireless  --->
        <M>   cfg80211 - wireless configuration API
        [ ]     nl80211 testmode command
        [ ]     enable developer warnings
        [ ]     cfg80211 certification onus
        [*]     enable powersave by default
        [ ]     cfg80211 DebugFS entries
        [ ]     support CRDA
        [ ]     cfg80211 wireless extensions compatibility
        <M>   Generic IEEE 802.11 Networking Stack (mac80211)
        [*]   Minstrel
        [*]     Minstrel 802.11n support
        [ ]       Minstrel 802.11ac support
              Default rate control algorithm (Minstrel)  --->
        [ ]   Enable mac80211 mesh networking (pre-802.11s) support
        -*-   Enable LED triggers
        [ ]   Export mac80211 internals in DebugFS
        [ ]   Trace all mac80211 debug messages
        [ ]   Select mac80211 debugging features  ----

Minstrel and its 802.11n support is a rate control algorithm. Some wireless drivers might require it enabled.

Important
In case the wireless configuration API (CONFIG_CFG80211) is built into the kernel (<*>) instead as a module (<M>), the driver won't be able to load regulatory.db from /lib/firmware resulting in broken regulatory domain support. Please set CONFIG_CFG80211=m or add regulatory.db and regulatory.db.p7s (from net-wireless/wireless-regdb) to CONFIG_EXTRA_FIRMWARE.

Kernel driver

Enable Atheros 802.11ac wireless cards support (CONFIG_ATH10K) and Atheros ath10k PCI support (CONFIG_ATH10K_PCI) as modules <M>:

KERNEL Wireless configuration, linux-4.8
Device Drivers  --->
    [*] Network device support  --->
        [*]   Wireless LAN  --->
            [*]   Atheros/Qualcomm devices
            <M>     Atheros 802.11ac wireless cards support
            <M>       Atheros ath10k PCI support

Set it as a module <M> as shown here. After changes on kernel configuration do not forget to rebuild the kernel.

After rebuilding the kernel and reboot the selected options could be verified (needs Kernel/IKCONFIG support) like

user $zgrep 'ATH10K' /proc/config.gz

lspci should then display the adapter like:

root #lspci -nnkv
02:00.0 Network controller [0280]: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter [168c:003e] (rev 32)
        Subsystem: Bigfoot Networks, Inc. QCA6174 802.11ac Wireless Network Adapter [1a56:1535]
        Flags: bus master, fast devsel, latency 0, IRQ 141
        Memory at ed200000 (64-bit, non-prefetchable) [size=2M]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable+ Count=8/8 Maskable+ 64bit-
        Capabilities: [70] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [148] Virtual Channel
        Capabilities: [168] Device Serial Number 00-00-00-00-00-00-00-00
        Capabilities: [178] Latency Tolerance Reporting
        Capabilities: [180] L1 PM Substates
        Kernel driver in use: ath10k_pci
        Kernel modules: ath10k_pci 
Important
In case the driver is built into the kernel (<*>) instead of as a module (<M>), then the firmware needs to be built into the kernel as well.
Do not forget to rebuild the kernel after changing its configuration.

Firmware

The Qualcomm Atheros Killer N1525 Wireless-AC requires Linux firmware files.

root #emerge sys-kernel/linux-firmware

Find out more on GitHub kvalo/ath10k-firmware.

Network interface name (optional)

Warning
This section is obsolete. See Udev#Optional: Disable_or_override_predictable_network_interface_naming for updated instructions.

Network device names such as eth0 or wlan0 as provided by the kernel are normally changed on system boot (see dmesg) by the /lib/udev/rules.d/80-net-name-slot.rules udev rule.

To keep the classic naming this rule can be overwritten with an equally named empty file in the /etc/udev/rules.d directory:

root #touch /etc/udev/rules.d/80-net-name-slot.rules


Testing

After a reboot with the new kernel or after loading the modules, the device can be checked for availability by using following methods:

/sys file system

Get the device name by listing the /sys/class/net directory contents using ls -al or the tree command (provided by the app-text/tree package):

user $tree /sys/class/net
/sys/class/net/
├── enp2s14 -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:0e.0/net/enp2s14
├── lo -> ../../devices/virtual/net/lo
├── sit0 -> ../../devices/virtual/net/sit0
└── wlp8s0 -> ../../devices/pci0000:00/0000:00:1c.0/0000:08:00.0/net/wlp8s0

ip command

To obtain the device name and verify that the wireless card is detected, execute the following ip command:

user $ip addr
3: wlan0:   ...

ifconfig command

The ifconfig command is provided through the sys-apps/net-tools package. Use ifconfig -a to list all detected network cards, even those that are not enabled/active yet:

user $ifconfig -a
wlan0     ...

A network card can be activated as follows:

root #ifconfig -v wlan0 up
SIOCSIFFLAGS: Operation not possible due to RF-kill
WARNING: at least one error occurred. (-1)

In this example, enabling the wireless card failed as a radio frequency kill state is set (usually to keep power consumption at bay and not connect by accident to a wireless network).

iw command

If the wireless network card driver supports the nl80211 stack, then the iw command as offered by the net-wireless/iw package can show the detected wireless cards:

root #iw dev
   phy#0
	Interface wlan0
		ifindex 4
		type managed

See also

  • Wi-Fi — describes the setup of a Wi-Fi (wireless) network device.

External resources