Score:2

ath9k_htc driver fails to load with modprobe for AWUS036NHA (chipset AR9271) on Ubuntu 21.10

pk flag

I have the AWUS036NHA long-range adapter (with the AR9271 chipset) and am trying to connect using Ubuntu 21.10.

lsusb shows the device:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 001 Device 006: ID 0cf3:9271 Qualcomm Atheros Communications AR9271 802.11n
Bus 001 Device 004: ID 0c45:6717 Microdia Integrated_Webcam_HD
Bus 001 Device 002: ID 413c:301c Dell Computer Corp. Dell Universal Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lshw -C network does not show the device, but I see that it is connected when I run lshw and look for the USB devices:

...    
      *-usb
             description: USB controller
             product: 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller
             vendor: Intel Corporation
             physical id: 14
             bus info: pci@0000:00:14.0
             version: 31
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi xhci bus_master cap_list
             configuration: driver=xhci_hcd latency=0
             resources: irq:127 memory:ed430000-ed43ffff
           *-usbhost:0
                product: xHCI Host Controller
                vendor: Linux 5.13.0-28-generic xhci-hcd
                physical id: 0
                bus info: usb@1
                logical name: usb1
                version: 5.13
                capabilities: usb-2.00
                configuration: driver=hub slots=16 speed=480Mbit/s
              *-usb:0
                   ...
              *-usb:1 UNCLAIMED
                   description: Generic USB device
                   product: UB91C
                   vendor: ATHEROS
                   physical id: 3
                   bus info: usb@1:3
                   version: 1.08
                   serial: 12345
                   capabilities: usb-2.00
                   configuration: maxpower=500mA speed=480Mbit/s
              *-usb:2
                   ...
              *-usb:3
                   ...

When I plug in the USB cable and run sudo dmesg I get

[  984.770279] usb 1-3: new high-speed USB device number 7 using xhci_hcd
[  984.935348] usb 1-3: New USB device found, idVendor=0cf3, idProduct=9271, bcdDevice= 1.08
[  984.935360] usb 1-3: New USB device strings: Mfr=16, Product=32, SerialNumber=48
[  984.935365] usb 1-3: Product: UB91C
[  984.935369] usb 1-3: Manufacturer: ATHEROS
[  984.935372] usb 1-3: SerialNumber: 12345
[  984.959693] ath: disagrees about version of symbol ieee80211_get_channel_khz
[  984.959696] ath: Unknown symbol ieee80211_get_channel_khz (err -22)
[  984.959704] ath: disagrees about version of symbol wiphy_apply_custom_regulatory
[  984.959705] ath: Unknown symbol wiphy_apply_custom_regulatory (err -22)
[  984.959717] ath: disagrees about version of symbol freq_reg_info
[  984.959718] ath: Unknown symbol freq_reg_info (err -22)

I followed the instructions here: https://unix.stackexchange.com/questions/326462/how-do-i-install-atheros-ar9271-wifi-drivers-on-debian and installed the Atheros firmware with sudo apt install firmware-atheros. I believe I need the ath9k_htc driver and it seems that I already have it installed:

$ ls /lib/firmware/ath9k_htc 
htc_7010-1.4.0.fw  htc_7010-1.dev.0.fw  htc_9271-1.4.0.fw  htc_9271-1.dev.0.fw

However, lsmod | grep ath gives me nothing at all. So I was thinking that modprobe ath9k_htc might solve it since it the device is listed as supported (https://wiki.debian.org/ath9k_htc), but this does not work either:

modprobe: ERROR: could not insert 'ath9k_htc': Invalid argument

If you have any ideas on how to solve this or where to look for, I would appreciate a lot.

Edit:

$ sudo modprobe ath9k_htc && sudo dmesg | grep ath
modprobe: ERROR: could not insert 'ath9k_htc': Invalid argument
$ sudo dmesg | grep ath
[ 5661.611665] ath: disagrees about version of symbol ieee80211_get_channel_khz
[ 5661.611668] ath: Unknown symbol ieee80211_get_channel_khz (err -22)
[ 5661.611681] ath: disagrees about version of symbol wiphy_apply_custom_regulatory
[ 5661.611682] ath: Unknown symbol wiphy_apply_custom_regulatory (err -22)
[ 5661.611699] ath: disagrees about version of symbol freq_reg_info
[ 5661.611700] ath: Unknown symbol freq_reg_info (err -22)
[ 5676.847157] ath: disagrees about version of symbol ieee80211_get_channel_khz
[ 5676.847160] ath: Unknown symbol ieee80211_get_channel_khz (err -22)
[ 5676.847174] ath: disagrees about version of symbol wiphy_apply_custom_regulatory
[ 5676.847175] ath: Unknown symbol wiphy_apply_custom_regulatory (err -22)
[ 5676.847193] ath: disagrees about version of symbol freq_reg_info
[ 5676.847194] ath: Unknown symbol freq_reg_info (err -22)
$ ls -al /usr/lib/firmware/ath9k_htc | grep 9271
-rw-r--r--  1 root root 51008 dec  7 09:40 htc_9271-1.4.0.fw
-rw-r--r--  1 root root 51008 aug 31 10:28 htc_9271-1.dev.0.fw

Edit 2:

Could someone point me to resources to learn more about the modprobe: ERROR: could not insert 'ath9k_htc': Invalid argument error? I don't understand what this means at all.

chili555 avatar
cn flag
Please edit your question to show the result of these terminal commands: `sudo modprobe ath10k_pci && sudo dmesg | grep ath` and also: `ls -al /usr/lib/firmware/ath9k_htc | grep 9271`
wvdgoot avatar
pk flag
@chili555, I updated the question.
chili555 avatar
cn flag
Oops! Please pardon my mistake. I meant: `sudo modprobe ath9k_pci && sudo dmesg | grep ath` Also, it appers that the *dev* firmware was installed (improperly) by the Debian package. Let's rename it: `cd /usr/lib/firmware/ath9k_htc && sudo mv htc_9271-1.dev.0.fw htc_9271-1.dev.0.bak` Reboot and tell us if there is any improvement.
wvdgoot avatar
pk flag
That first command gives me `modprobe: FATAL: Module ath9k_pci not found in directory /lib/modules/5.13.0-28-generic`.
wvdgoot avatar
pk flag
I also did the renaming and after rebooting the I got the same output as before.
chili555 avatar
cn flag
Please confirm that your system is fully updated and rebooted.
wvdgoot avatar
pk flag
@chili555, confirmed. I ran `apt update`, `apt upgrade` and `apt clean`, and then rebooted. Still the same problem. I thinking that I am unable load any module using `modprobe`. Is this possible? If yes, do you have a suggestion to test this hypothesis?
chili555 avatar
cn flag
My apologies; please try: `sudo modprobe ath9k_htc` and show me the result. We hope it is blank.
wvdgoot avatar
pk flag
@chili555 nope that's the `modprobe: ERROR: could not insert 'ath9k_htc': Invalid argument` again. I don't know what it means and cannot find anything useful about it. Isn't there some documentation about `modprobe` besides the man page?
chili555 avatar
cn flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/133975/discussion-between-chili555-and-wvdgoot).
Score:1
cn flag

In your dmesg, we see:

[ 5661.611665] ath: disagrees about version of symbol ieee80211_get_channel_khz
[ 5661.611668] ath: Unknown symbol ieee80211_get_channel_khz (err -22)
[ 5661.611681] ath: disagrees about version of symbol wiphy_apply_custom_regulatory
[ 5661.611682] ath: Unknown symbol wiphy_apply_custom_regulatory (err -22)

I suspected that you installed some other driver(s) in an attempt to get the ath9k_htc device working. Some other drivers not currently in the kernel install a custom cfg80211 and/or mac80211 module that conflicts with the versions in the kernel and which ath9k_htc requires.

We checked:

sudo dkms status

We found and then removed a few extraneous drivers. Upon reboot, your wireless is now working.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.