Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1792 - wifi stick based on atheros AR9271 doesn't work with 18.06-rc2 #8511

Closed
openwrt-bot opened this issue Aug 18, 2018 · 3 comments
Closed
Labels

Comments

@openwrt-bot
Copy link

olivluca:

  • Device problem occurs on

Astoria Networks ARV7518PW

  • Software versions of OpenWrt/LEDE release, packages, etc.

OpenWrt 18.06.0-rc2 r7141-e4d0ee5af5

My wifi stick based on the AR9271 that worked with openwrt 17.01.05 doesn't work with this new rc (I cannot test it on development snapshots due to [[https://bugs.openwrt.org/index.php?do=details&task_id=1634|bug #1634]]).

dmesg show this

[ 244.724712] usb 1-1: new high-speed USB device number 3 using dwc2 [ 244.740095] dwc2 1e101000.ifxhcd: Mode Mismatch Interrupt: currently in Host mode [ 244.746127] dwc2 1e101000.ifxhcd: Mode Mismatch Interrupt: currently in Host mode [ 244.972976] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested [ 245.279016] usb 1-1: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008 [ 245.532487] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits [ 245.965179] ath: phy2: Mac Chip Rev 0x0f.3 is not supported by this driver [ 245.970678] ath: phy2: Unable to initialize hardware; initialization status: -122 [ 245.978013] ath: phy2: Unable to initialize hardware; initialization status: -122 [ 245.985233] ath9k_htc: Failed to initialize the device [ 246.093496] usb 1-1: ath9k_htc: USB layer deinitialized

The error is Mac Chip Rev 0x0f.3 is not supported by this driver which [[https://www.google.cat/search?q=Mac+Chip+Rev+0x0f.3+is+not+supported+by+this+driver|I googled]] and found a couple of reports regarding ARM based SBC (on my laptop, x86_64, the stick works fine), with no solution though.

[[https://github.com/qca/open-ath9k-htc-firmware/issues/136|One of them]] suggests that the device works if it's plugged in while the system boots. I tried that and, while it doesn't complain about the mac chip not supported, it still doesn't work:

[ 15.833888] usb 1-1: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008 [ 16.048965] kmodloader: done loading kernel modules from /etc/modules.d/* [ 16.884889] ath9k_htc 1-1:1.0: ath9k_htc: Target is unresponsive [ 16.889498] ath9k_htc: Failed to initialize the device [ 16.929806] usb 1-1: ath9k_htc: USB layer deinitialized
@openwrt-bot
Copy link
Author

olivluca:

I also tried to use an hub with no success.

@openwrt-bot
Copy link
Author

olivluca:

I just realized there's a 18.06.1 version available. I installed it but the problem is just the same.

@openwrt-bot
Copy link
Author

schwer_vernetzt:

Hi,

I know this ticket is 1,5Years old, but I think it's the right place to put this.

I experience the same issue on openwrt-19.07 currently. I have a FritzBox3370-Router (Micron Version) for which only the 19.07.x images seem to be built regularly - though the device page (https://openwrt.org/toh/avm/fritz.box.wlan.3370) says only 18.06.8 was currently supported. But I'm fine with that as it runs the latest stable (better than the other way around I guess ;).

Anyway the router runs smoothly, was a nice adventure to me to flash that Box recently - this was also the first time I used openWRT. Now I needed a second antenna/radio(/whatever you call it) to connect to an existing WiFi-Network providing internet connection AND SIMULTANEOUSLY open an AccessPoint with the second antenna. So it's one radio in Client mode and the other radio in Master/AP mode. Typical extender/repeater thingy I'd say.

Now this is where the WiFi-USB stick comes in providing the second antenna. Bought it on ebay, there it says it's a TP-Link, but I can't find that written/labled on the stick. But does it matter?

The Device is called: PW-DN4210D (written on the case)
And the chipset is the Atheros AR9271 mentioned in this ticket. And as far as I found out the Atheros Chipsets are well supported on Linux, due to the drivers being published as open source. That's why I decided to buy this adapter.

I've installed the kernel-driver-module "kmod-ath9k-htc" on my openWRT-Router. When plugging in the stick, I can see the following messages via logread command:

Fri Mar 13 07:57:03 2020 kern.info kernel: [ 232.904666] usb 1-1: new high-speed USB device number 2 using dwc2
Fri Mar 13 07:57:04 2020 kern.info kernel: [ 233.136492] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
Fri Mar 13 07:57:04 2020 kern.info kernel: [ 233.439032] usb 1-1: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008
Fri Mar 13 07:57:04 2020 kern.info kernel: [ 233.691375] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits
Fri Mar 13 07:57:05 2020 kern.err kernel: [ 234.120662] ath: phy1: Failed to read SREV register
Fri Mar 13 07:57:05 2020 kern.err kernel: [ 234.120675] ath: phy1: Could not read hardware revisions
Fri Mar 13 07:57:05 2020 kern.err kernel: [ 234.124108] ath: phy1: Unable to initialize hardware; initialization status: -122
Fri Mar 13 07:57:05 2020 kern.err kernel: [ 234.136984] ath: phy1: Unable to initialize hardware; initialization status: -122
Fri Mar 13 07:57:05 2020 kern.err kernel: [ 234.144610] ath9k_htc: Failed to initialize the device
Fri Mar 13 07:57:05 2020 kern.info kernel: [ 234.157168] usb 1-1: ath9k_htc: USB layer deinitialized

Except the "Mac Chip Rev 0x0f.3 is not supported by this driver"-message this seems to be quite the same problem as stated in the ticket originally.

When plugging the stick into my Ubuntu (18.04 with HWE-Kernel) machine:
lsusb yields:
Bus 001 Device 005: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n

dmesg yields:

[ 2280.563931] usb 1-7: new high-speed USB device number 5 using xhci_hcd
[ 2280.828255] usb 1-7: New USB device found, idVendor=0cf3, idProduct=9271, bcdDevice= 1.08
[ 2280.828258] usb 1-7: New USB device strings: Mfr=16, Product=32, SerialNumber=48
[ 2280.828261] usb 1-7: Product: USB2.0 WLAN
[ 2280.828263] usb 1-7: Manufacturer: ATHEROS
[ 2280.828264] usb 1-7: SerialNumber: 12345
[ 2280.881404] usb 1-7: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
[ 2280.881464] usbcore: registered new interface driver ath9k_htc
[ 2281.957670] usb 1-7: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008
[ 2282.207783] ath9k_htc 1-7:1.0: ath9k_htc: HTC initialized with 33 credits
[ 2282.440182] ath9k_htc 1-7:1.0: ath9k_htc: FW Version: 1.4
[ 2282.440185] ath9k_htc 1-7:1.0: FW RMW support: On
[ 2282.440187] ath: EEPROM regdomain: 0x809c
[ 2282.440188] ath: EEPROM indicates we should expect a country code
[ 2282.440189] ath: doing EEPROM country->regdmn map search
[ 2282.440190] ath: country maps to regdmn code: 0x52
[ 2282.440191] ath: Country alpha2 being used: CN
[ 2282.440192] ath: Regpair used: 0x52
[ 2282.444140] ieee80211 phy1: Atheros AR9271 Rev:1
[ 2282.448974] ath9k_htc 1-7:1.0 wlx6cfdb9663d04: renamed from wlan0

That means to me in general the device doesn't seem to be broken or something. Even plugging it into my RaspberryPi-3B (ARM-platform) works just fine.

Now, I'm pretty sure this is an issue with the openWRT specific customizations to the Linux kernel/driver-modules. I've downloaded the linux kernel git repository just yesterday to inspect the driver code and find the location where the error message occurs. I guess I know which functions I have to inspect further to find the root cause, but I will have to setup the package-building environment for openwrt to be closer to the openwrt code, that is executed on the router, and be able to build and test stuff in the end. I'll try that during the next weeks.

I'll post updates here, once I find anything interesting. Any comments/hints/reports/... are welcome.

Cheers,
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant