Wifi AR922x not detected after upgrade 18.06

"iw dev" showing nothing

oot@OpenWrt:/etc/init.d# lspci -vvv
00:01.0 Ethernet controller: Qualcomm Atheros AR922x Wireless Network Adapter (rev 01)
             Subsystem: Qualcomm Atheros AR9220-AC1A [AVM Fritz!Box FON WLAN 7270 v3]\
             Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- 
             FastB2B- DisINTx-
             Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- 
             >SERR- <PERR- INTx-
             Interrupt: pin A routed to IRQ 0
             Region 0: Memory at 30000000 (32-bit, non-prefetchable) [size=64K]
             Capabilities: [40] Capability ID 0x80 [0000]
             Capabilities: [80] Null 
             lspci: Unable to load libkmod resources: error -12

Absolute the same here on my device (ARV8539PW22 - Speedport W 504V Typ A). Any help?

Some more details:

root@OpenWrt:/# lspci
00:0e.0 Ethernet controller: Qualcomm Atheros AR922x Wireless Network Adapter (rev 01)
root@OpenWrt:/# dmesg | grep 00:0e.0
[    0.295396] pci 0000:00:0e.0: [168c:ff1d] type 00 class 0x020000
[    0.295494] pci 0000:00:0e.0: reg 0x10: [mem 0x00000000-0x0000ffff]
[    0.296227] pci 0000:00:0e.0: BAR 0: assigned [mem 0x18000000-0x1800ffff]
[   48.273781] PCI: Enabling device 0000:00:0e.0 (0000 -> 0002)
[   48.279702] owl-loader 0000:00:0e.0: Direct firmware load for ath9k-eeprom-pci-0000:00:0e.0.bin failed with error -2
[   48.288646] owl-loader 0000:00:0e.0: Falling back to user helper
[   84.893423] owl-loader 0000:00:0e.0: invalid calibration data

Perhups the "owl-loader 0000:00:0e.0: Direct firmware load for ath9k-eeprom-pci-0000:00:0e.0.bin failed with error -2" is the Problem?

Run wifi command.

Running the wifi config command does nothing except of creating an empty /etc/config/wireless file

If it helps, heres the complete dmesg

root@OpenWrt:~# dmesg
[    0.000000] Linux version 4.9.120 (buildbot@builds-03.infra.lede-project.org) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7102-3f3a2c9) ) #0 Thu Aug 16 07:51:15 2018
[    0.000000] SoC: Danube rev 1.5
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019641 (MIPS 24KEc)
[    0.000000] MIPS: machine is Speedport W 504V Typ A
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 16kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 804aab44, node_mem_map 81006420
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyLTQ0,115200
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=0004a47d
[    0.000000] Readback ErrCtl register=0004a47d
[    0.000000] Memory: 58652K/65536K available (3983K kernel code, 172K rwdata, 620K rodata, 1224K init, 218K bss, 6884K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 333MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 11467562657 ns
[    0.000021] sched_clock: 32 bits at 166MHz, resolution 6ns, wraps every 12884901885ns
[    0.007966] Calibrating delay loop... 221.18 BogoMIPS (lpj=442368)
[    0.050577] pid_max: default: 32768 minimum: 301
[    0.055552] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.062094] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.078513] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.088204] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.094473] pinctrl core: initialized pinctrl subsystem
[    0.102121] NET: Registered protocol family 16
[    0.113899] pinctrl-xway 1e100b10.pinmux: Init done
[    0.120433] dma-xway 1e104100.dma: Init done - hw rev: 3, ports: 5, channels: 20
[    0.181155] Can't analyze schedule() prologue at 803e16b0
[    0.187880] PCI host bridge /fpi@10000000/pci@E105400 ranges:
[    0.193582]  MEM 0x0000000018000000..0x0000000019ffffff
[    0.198853]   IO 0x000000001ae00000..0x000000001affffff
[    0.251580] usbcore: registered new interface driver usbfs
[    0.257202] usbcore: registered new interface driver hub
[    0.262618] usbcore: registered new device driver usb
[    0.268249] PCI host bridge to bus 0000:00
[    0.272299] pci_bus 0000:00: root bus resource [mem 0x18000000-0x19ffffff]
[    0.279227] pci_bus 0000:00: root bus resource [io  0x1ae00000-0x1affffff]
[    0.286166] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.293017] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.301095] pci 0000:00:0e.0: [168c:ff1d] type 00 class 0x020000
[    0.301168] pci 0000:00:0e.0: reg 0x10: [mem 0x00000000-0x0000ffff]
[    0.301739] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.301808] pci 0000:00:0e.0: BAR 0: assigned [mem 0x18000000-0x1800ffff]
[    0.317717] clocksource: Switched to clocksource MIPS
[    0.325164] NET: Registered protocol family 2
[    0.331348] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.338309] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.344700] TCP: Hash tables configured (established 1024 bind 1024)
[    0.351292] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.357114] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.363828] NET: Registered protocol family 1
[    0.368248] PCI: CLS 0 bytes, default 32
[    0.374218] gptu: totally 6 16-bit timers/counters
[    0.379169] gptu: misc_register on minor 63
[    0.383310] gptu: succeeded to request irq 126
[    0.387809] gptu: succeeded to request irq 127
[    0.392323] gptu: succeeded to request irq 128
[    0.396836] gptu: succeeded to request irq 129
[    0.401350] gptu: succeeded to request irq 130
[    0.405867] gptu: succeeded to request irq 131
[    0.417103] lantiq,vmmc 1f103000.vmmc: requested GPIO 511
[    0.422466] lantiq,vmmc 1f103000.vmmc: reserved 1MB at 0x03a00000
[    0.430257] Crashlog allocated RAM at address 0x3f00000
[    0.438947] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.461798] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.467559] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.504686] io scheduler noop registered
[    0.508546] io scheduler deadline registered (default)
[    0.514955] 1e100c00.serial: ttyLTQ0 at MMIO 0x1e100c00 (irq = 112, base_baud = 0) is a lantiq,asc
[    0.523922] console [ttyLTQ0] enabled
[    0.531024] bootconsole [early0] disabled
[    0.540425] lantiq nor flash device: 00800000 at 10000000
[    0.544662] ltq_nor: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022cb
[    0.553682] Amd/Fujitsu Extended Query Table at 0x0040
[    0.558643]   Amd/Fujitsu Extended Query version 1.1.
[    0.563521] number of CFI chips: 1
[    0.566873] 4 fixed-partitions partitions found on MTD device ltq_nor
[    0.573062] Creating 4 MTD partitions on "ltq_nor":
[    0.577808] 0x000000000000-0x000000030000 : "uboot"
[    0.589538] 0x000000030000-0x000000040000 : "uboot"
[    0.596854] 0x000000040000-0x0000007f0000 : "firmware"
[    0.633626] 2 uimage-fw partitions found on MTD device firmware
[    0.638101] 0x000000040000-0x0000001c0782 : "kernel"
[    0.645966] 0x0000001c0782-0x0000007f0000 : "rootfs"
[    0.653196] mtd: device 4 (rootfs) set to be root filesystem
[    0.657478] 1 squashfs-split partitions found on MTD device rootfs
[    0.663398] 0x000000450000-0x0000007f0000 : "rootfs_data"
[    0.672506] 0x0000007f0000-0x000000800000 : "art"
[    0.683030] libphy: Fixed MDIO Bus: probed
[    0.697803] switch0: Atheros AR8216 rev. 1 switch registered on 1e180000.etop-ffffffff
[    0.735402] libphy: ltq_mii: probed
[    0.779092] Atheros AR8216/AR8236/AR8316 1e180000.etop-ffffffff:00: attached PHY driver [Atheros AR8216/AR8236/AR8316] (mii_bus:phy_addr=1e180000.etop-ffffffff:00, irq=-1)
[    0.794791] wdt 1f8803f0.watchdog: Init done
[    0.801639] NET: Registered protocol family 10
[    0.814453] NET: Registered protocol family 17
[    0.817474] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.830046] 8021q: 802.1Q VLAN Support v1.8
[    0.855371] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.868669] Freeing unused kernel memory: 1224K
[    0.871772] This architecture does not have kernel memory protection.
[    1.146153] random: fast init done
[    2.237870] init: Console is alive
[    2.240287] init: - watchdog -
[    4.615429] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.890263] dwc2 1e101000.ifxhcd: requested GPIO 494
[    4.929918] dwc2 1e101000.ifxhcd: DWC OTG Controller
[    4.933444] dwc2 1e101000.ifxhcd: new USB bus registered, assigned bus number 1
[    4.940617] dwc2 1e101000.ifxhcd: irq 62, io mem 0x00000000
[    4.948074] hub 1-0:1.0: USB hub found
[    4.951162] hub 1-0:1.0: 1 port detected
[    4.956658] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.966962] init: - preinit -
[    6.252177] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    6.282604] random: procd: uninitialized urandom read (4 bytes read)
[    7.270072] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    9.856574] jffs2_scan_eraseblock(): End of filesystem marker found at 0x10000
[    9.862311] jffs2_build_filesystem(): unlocking the mtd device... 
[    9.868104] done.
[    9.869954] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   44.733240] done.
[   44.733863] jffs2: notice: (397) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   44.752894] mount_root: overlay filesystem has not been fully initialized yet
[   44.772060] mount_root: switching to jffs2 overlay
[   45.586555] urandom-seed: Seed file not found (/etc/urandom.seed)
[   45.988372] procd: - early -
[   45.990115] procd: - watchdog -
[   46.741824] procd: - watchdog -
[   46.744322] procd: - ubus -
[   46.931893] random: ubusd: uninitialized urandom read (4 bytes read)
[   46.939124] random: ubusd: uninitialized urandom read (4 bytes read)
[   46.944862] random: ubusd: uninitialized urandom read (4 bytes read)
[   46.953333] procd: - init -
[   47.734646] kmodloader: loading kernel modules from /etc/modules.d/*
[   47.746420] NET: Registered protocol family 8
[   47.749274] NET: Registered protocol family 20
[   47.764177] PPP generic driver version 2.4.2
[   47.778231] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   47.798573] IFX MEI Version 5.00.00
[   47.812947] Infineon CPE API Driver version: DSL CPE API V3.24.4.4
[   47.836228] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[   47.842740] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[   47.854139] ip_tables: (C) 2000-2006 Netfilter Core Team
[   47.872272] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   47.939175] PCI: Enabling device 0000:00:0e.0 (0000 -> 0002)
[   47.945195] owl-loader 0000:00:0e.0: Direct firmware load for ath9k-eeprom-pci-0000:00:0e.0.bin failed with error -2
[   47.954137] owl-loader 0000:00:0e.0: Falling back to user helper
[   47.979280] NET: Registered protocol family 24
[   48.027188] xt_time: kernel timezone is -0000
[   48.282333] kmodloader: done loading kernel modules from /etc/modules.d/*
[   49.397642] urandom_read: 5 callbacks suppressed
[   49.397661] random: jshn: uninitialized urandom read (4 bytes read)
[   53.889881] random: crng init done
[   79.127944] owl-loader 0000:00:0e.0: invalid calibration data
[   80.608100] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   80.642366] br-lan: port 1(eth0.1) entered blocking state
[   80.646338] br-lan: port 1(eth0.1) entered disabled state
[   80.652390] device eth0.1 entered promiscuous mode
[   80.656206] device eth0 entered promiscuous mode
[   80.694813] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   81.638137] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   81.657966] br-lan: port 1(eth0.1) entered blocking state
[   81.661933] br-lan: port 1(eth0.1) entered forwarding state
[   81.713848] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

The problem is with firmware loading. Do you have a firmware file in /lib/firmware?
If not, it means that the firmware address is wrong in the script.

What is the target of this device?

I think so

root@OpenWrt:/# ls /lib/firmware
adsl.bin                           ltq-dsl-fw-b-danube.bin
ath9k-eeprom-pci-0000:00:0e.0.bin  regulatory.db
ath9k_htc

Target is

root@OpenWrt:/# cat /proc/cpuinfo 
system type             : Danube rev 1.5
machine                 : Speedport W 504V Typ A
processor               : 0
cpu model               : MIPS 24KEc V4.1
BogoMIPS                : 221.18
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

What is in the ath9k-eeprom-pci-0000:00:0e.0.bin? Do hexdump on it.

I thought ath9k does not require firmware ?
I dont see this ath9k-eeprom-pci-0000:00:0e.0.bin in my router /lib/firmware folder.

https://wiki.openwrt.org/doc/howto/wireless.overview

  • Atheros ath9k does not require firmware.

See this for details, in short, it's extracted from the system flash (ART) and patched as needed (MAC addresses, endianess, etc.) to be re-used as needed on subsequent reboots.

It does require calibration data, but on ar71xx it is loaded a different way without having this file.

Hi, I think we all are after the same bug.

Yesterday, I decided to upgrade my tdw8980 running 17.01.2 to 18.06.1, but wifi did not came up after the upgrade. In fact, it doesn't get detected anymore. I've tried development snapshot, as well as rollback to 17.01.2, but nothing helped. Fortunately, I do have 2nd tdw8980 still running 17.01.4 so I could compare the differences between running systems. And I think I might have idea what happened.

tdw8980 has AR9287 listed on PCI bus, giving in lspci:

good-one # lspci -nn
...
02:00.0 Network controller [0280]: Qualcomm Atheros AR9287 Wireless Network Adapter (PCI-Express) [168c:002e] (rev 01)
broken-one # lspci -nn
...
02:00.0 Ethernet controller [0200]: Qualcomm Atheros AR5008 Wireless Network Adapter [168c:ff1c] (rev 01)

As both devices hold nearby mac addresses for their eth phy, I believe that the hardware is of the same revision (still need to check the board though). So the broken-one should list AR9287 as well, but instead it gets broken device identifier ff1c. As this persists once broken, I believe that ath9k in 18.06.1 has somehow managed to overwrite portions of memory on wifi card it was not supposed to, effectively breaking the device.

Inspecting device nodes in sysfs, one gets:

root@broken-one:/sys/devices/pci0000:01/0000:01:00.0/0000:02:00.0# ls -aihl
   1020 drwxr-xr-x    2 root     root           0 Jan  1  1970 .
    986 drwxr-xr-x    4 root     root           0 Jan  1  1970 ..
   1038 -rw-r--r--    1 root     root        4.0K Nov 21 11:38 broken_parity_status
   1030 -r--r--r--    1 root     root        4.0K Nov 21 11:35 class
   3666 -rw-r--r--    1 root     root        4.0K Nov 21 11:35 config
   1036 -r--r--r--    1 root     root        4.0K Nov 21 11:38 consistent_dma_mask_bits
   1027 -r--r--r--    1 root     root        4.0K Nov 21 11:35 device
   1040 -r--r--r--    1 root     root        4.0K Nov 21 11:38 devspec
   1035 -r--r--r--    1 root     root        4.0K Nov 21 11:38 dma_mask_bits
   1041 -rw-r--r--    1 root     root        4.0K Nov 21 11:38 driver_override
   1037 -rw-r--r--    1 root     root        4.0K Nov 21 11:38 enable
   1031 -r--r--r--    1 root     root        4.0K Nov 21 11:35 irq
   1033 -r--r--r--    1 root     root        4.0K Nov 21 11:38 local_cpulist
   1032 -r--r--r--    1 root     root        4.0K Nov 21 11:38 local_cpus
   1034 -r--r--r--    1 root     root        4.0K Nov 21 11:38 modalias
   1039 -rw-r--r--    1 root     root        4.0K Nov 21 11:38 msi_bus
   1022 lrwxrwxrwx    1 root     root           0 Nov 21 11:38 of_node -> ../../../../firmware/devicetree/base/fpi@10000000/pcie@d900000/pcie@0/wifi@168c,002e
   1023 --w--w----    1 root     root        4.0K Nov 21 11:38 remove
   1024 --w--w----    1 root     root        4.0K Nov 21 11:38 rescan
   3668 --w-------    1 root     root        4.0K Nov 21 11:38 reset
   1025 -r--r--r--    1 root     root        4.0K Nov 21 11:35 resource
   3667 -rw-------    1 root     root       64.0K Nov 21 11:38 resource0
   1043 lrwxrwxrwx    1 root     root           0 Nov 21 11:38 subsystem -> ../../../../bus/pci
   1029 -r--r--r--    1 root     root        4.0K Nov 21 11:38 subsystem_device
   1028 -r--r--r--    1 root     root        4.0K Nov 21 11:38 subsystem_vendor
   1021 -rw-r--r--    1 root     root        4.0K Nov 21 11:38 uevent
   1026 -r--r--r--    1 root     root        4.0K Nov 21 11:35 vendor

while on working one:

root@good-one:/sys/devices/pci0000:01/0000:01:00.0/0000:02:00.0# ls -aihl
   1021 drwxr-xr-x    6 root     root           0 Nov 21 10:40 .
    986 drwxr-xr-x    4 root     root           0 Jan  1  1970 ..
   1039 -rw-r--r--    1 root     root        4.0K Nov 21 10:54 broken_parity_status
   1031 -r--r--r--    1 root     root        4.0K Nov 21 10:54 class
   3668 -rw-r--r--    1 root     root        4.0K Nov 21 10:54 config
   1037 -r--r--r--    1 root     root        4.0K Nov 21 10:54 consistent_dma_mask_bits
   1028 -r--r--r--    1 root     root        4.0K Nov 21 10:54 device
   1041 -r--r--r--    1 root     root        4.0K Nov 21 10:54 devspec
   1036 -r--r--r--    1 root     root        4.0K Nov 21 10:54 dma_mask_bits
   4746 lrwxrwxrwx    1 root     root           0 Nov 21 10:54 driver -> ../../../../bus/pci/drivers/ath9k
   1043 -rw-r--r--    1 root     root        4.0K Nov 21 10:54 driver_override
   1038 -rw-r--r--    1 root     root        4.0K Nov 21 10:54 enable
   4851 drwxr-xr-x    3 root     root           0 Nov 21 10:54 gpio
   4748 drwxr-xr-x    3 root     root           0 Nov 21 10:40 ieee80211
   1032 -r--r--r--    1 root     root        4.0K Nov 21 10:54 irq
   4860 drwxr-xr-x    3 root     root           0 Nov 21 10:54 leds
   1034 -r--r--r--    1 root     root        4.0K Nov 21 10:54 local_cpulist
   1033 -r--r--r--    1 root     root        4.0K Nov 21 10:54 local_cpus
   1035 -r--r--r--    1 root     root        4.0K Nov 21 10:54 modalias
   1040 -rw-r--r--    1 root     root        4.0K Nov 21 10:54 msi_bus
   4763 drwxr-xr-x    3 root     root           0 Nov 21 10:54 net
   1023 lrwxrwxrwx    1 root     root           0 Nov 21 10:54 of_node -> ../../../../firmware/devicetree/base/fpi@10000000/pcie@d900000/pcie@0/wifi@168c,002e
   1024 --w--w----    1 root     root        4.0K Nov 21 10:54 remove
   1025 --w--w----    1 root     root        4.0K Nov 21 10:54 rescan
   4425 --w-------    1 root     root        4.0K Nov 21 10:54 reset
   1026 -r--r--r--    1 root     root        4.0K Nov 21 10:54 resource
   4424 -rw-------    1 root     root       64.0K Nov 21 10:54 resource0
   3667 lrwxrwxrwx    1 root     root           0 Nov 21 10:54 subsystem -> ../../../../bus/pci
   1030 -r--r--r--    1 root     root        4.0K Nov 21 10:54 subsystem_device
   1029 -r--r--r--    1 root     root        4.0K Nov 21 10:54 subsystem_vendor
   1022 -rw-r--r--    1 root     root        4.0K Nov 21 10:54 uevent
   1027 -r--r--r--    1 root     root        4.0K Nov 21 10:54 vendor

As you can see, the driver does not even claim the device. Furthermore, I had checked the mtd for signs of possible corruption, however mtd stands clear from this. If you look to the posts here in the thread, it shows signs of similar behavior. I hope to get a bit more time to look into this.

Maybe @nbd has an idea about this, it being ath9k related.

1 Like

Did you reset settings to defaults?

Hi, the workflow was:

  1. backup /overlay mounted from flashdrive
  2. prepare image with default network, password, firewall, ssh configurations
  3. wipe out /overlay, have 17.01.2 boot with clean /overlay, transfer the customized 18.06.1 image to bad-one and perform sysupgrade without preserving configuration (did not explicitly check whether wireless was already proken or not, but presuming good-one started with clean /overlay and 17.01.4 created the same way, presume working)
  4. Boot into 18.06.1, no wireless. Downgrade to 17.01.6 with the same method. Then 17.01.4. Eventualy trying 17.01.2 with and without pre-installed /etc/config/wireless; without any success bringing the wifi back online.
  5. Did a couple of reboots, without any success. I eventualy decided to restore the backup /overlay, did a couple of reboots, made sure that previous configuration is working, however still without wifi.

I might have possibly narrow down the issue to (perhaps) initialization order on 17.01.2, as I managed to (hopefuly) restore the wifi couple of minutes ago by removal and reinsertion of owl-loader.ko (did that on remote, will check whether wifi works later once I get home).

Btw, /lib/firmware/ath9k-eeprom-pci-0000:02:00.0.bin is part of the backup, did not get generated in any of the rollback attempts.

Hunting ghosts here. Climbed up for the device, brought it down for testing.

  1. Did fully fresh install without any backups (18.06.1). Firmware got generated, ifaces appeared.

  2. Followed by image with only etc/dropbear + etc/config/dropbear. Firmware got generated, ifaces appeared.

  3. Followed by image with etc/config/wireless. Firmware got generated, ifaces (2x essid) missing.
    => Reproduced bug

  4. Followed by previous image, firmware generated, devices missing even though no wireless config installed. Iface has reappeared.

  5. Copied generated wireless into image, flashed, iface appeared.

  6. Set country, channel and htmode; flashed. Iface appeared.

  7. Added essid configurations; flashed. Iface appeared.

  8. Dropped option disabled from wireless config. Firmware got extracted; iface did not appear.

Furthermore, cases #5 and #8 end up with same files in /overlay, only wireless differs.

Ok, so apparently enabling wifi in default is what kills wifi. There is however one difference
against my past attempts - dmesg contains reports from ath module, which was not the previous case.
Also, wifi card is assigned correct pci device ID. lsmod reports ath9k is used by 1 userspace process.
So I believe that this behavior is different from the one observed before and I did not reproduce the original bug.

logcat:

[   10.612050] PCI: Enabling device 0000:02:00.0 (0000 -> 0002)
[   10.618348] owl-loader 0000:02:00.0: Direct firmware load for ath9k-eeprom-pci-0000:02:00.0.bin failed with error -2
[   10.628038] owl-loader 0000:02:00.0: Falling back to user helper
[   10.811551] kmodloader: done loading kernel modules from /etc/modules.d/*
[   12.459126] owl-loader 0000:02:00.0: fixup device configuration
[   12.466484] pci 0000:02:00.0: [168c:002e] type 00 class 0x028000
[   12.466587] pci 0000:02:00.0: reg 0x10: [mem 0x1c000000-0x1c00ffff 64bit]
[   12.466884] pci 0000:02:00.0: supports D1
[   12.466911] pci 0000:02:00.0: PME# supported from D0 D1 D3hot
[   12.467517] pci 0000:02:00.0: BAR 0: assigned [mem 0x1c000000-0x1c00ffff 64bit]
[   12.473796] PCI: Enabling device 0000:02:00.0 (0140 -> 0142)
[   12.487452] ath: phy0: Ignoring endianness difference in EEPROM magic bytes.
[   12.494760] ath: EEPROM regdomain: 0x0
[   12.494776] ath: EEPROM indicates default country code should be used
[   12.494782] ath: doing EEPROM country->regdmn map search
[   12.494801] ath: country maps to regdmn code: 0x3a
[   12.494811] ath: Country alpha2 being used: US
[   12.494817] ath: Regpair used: 0x3a
[   12.511373] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   12.518124] ieee80211 phy0: Atheros AR9287 Rev:2 mem=0xbc000000, irq=144

So apparently, phy was initialized. Further lreading log, I found out: daemon.notice netifd: radio0 (3442): ./mac80211.sh: eval: line 1: /usr/sbin/hostapd: not found

TL;DR:
Even though imagebuilder builds image for my device, it does not do so using corresponding profile automatically. In fact, it ommits some of the packages required. Therefore, explicit PROFILE="tplink_tdw8980" was required. This pulls in wpad-mini, satisfying the dependency.
Followed this, I restored the original broken image, figured out I was missing kmod-owl-loader (this fixed the wrong pci ID), and wpad-mini.

This (+ that) thread does not describe whether original authors used custom images or factory ones; however it did fix the issues for me. Although figuring out what is going on was somewhat...

Anyway, thanks everybody for help. Hope this will be case of the other thread as well.

meaning you got the wifi back by remove /overlay ?
First I'm upgraded with the custom 18.06 and wifi gone, then I try to restore it use the factory or downgraded it doesn't help at all.

Hi, in short, no.

/overlay has nothing to do with it - given that in my case the issues persisted even after reflashes, which cleared it. I suggest to go step by step, if we have the same problem, one of the things I did fixed it. First, can you flash to the openwrt version you had before the upgrade to 18.06 and post lspci -nn?

Hello

Same problem with ubnt ac-lite. After upgrade from 17.01.4 there is no Wi-Fi.
Is there any bug report created?

Thank you!