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#3489 - BulletM5 ath9k wlan not detected #8527

Closed
openwrt-bot opened this issue Dec 4, 2020 · 14 comments
Closed

FS#3489 - BulletM5 ath9k wlan not detected #8527

openwrt-bot opened this issue Dec 4, 2020 · 14 comments
Labels

Comments

@openwrt-bot
Copy link

acoul:

  • Device problem occurs: All the time

  • Software version: OpenWrt SNAPSHOT, r15129-d346beb08c

  • Steps to reproduce: flash openwrt-ath79-generic-ubnt_bullet-m-ar7240-squashfs-factory.bin onto the device

Greetings,

I just flashed today's openwrt-snapshot on my BulletM5. everything works fine with the exception of the detection of the atheros wireless chip

@openwrt-bot
Copy link
Author

acoul:

same behavior with ath79 OpenWrt 19.07.4, r11208-ce6496d796 ath79 with the addition of the ethernet not working probably due to [[https://bugs.openwrt.org/index.php?do=details&task_id=296|this bug]]

with ar71xx OpenWrt 19.07.4, r11208-ce6496d796 atheros wifi is detected and loded just fine. ethernet is also working just fine

/sys/firmware

is empty (no wlan calibration data)

@openwrt-bot
Copy link
Author

russell:

It was working for me as of r15104-451c1eb8c2

Also works for me as of r15139-33c27ccf4a

@openwrt-bot
Copy link
Author

acoul:

Hi Russell,

can you post a dmesg from your working device ? do you have wlan calibration data under the /sys/firmware directory ?

is your device an AR7240 or an AR7241 & what ubiquiti firmware version you had prior to flashing openwrt on your device ?

about the calibration data on this device, I found [[https://community.ui.com/questions/Bullet-M5-Board-is-not-CALIBRATED/56f08eda-42e2-49f3-8ca1-ff5e8040803b|this information]]

@openwrt-bot
Copy link
Author

acoul:

I flashed openwrt-18.06.9-ar71xx-generic-ubnt-bullet-m-squashfs-factory.bin and everything worked fine

I then flashed XM.v5.5.10.24241.141001.1649.bin & then openwrt-ath79-generic-ubnt_bullet-m-ar7240-squashfs-factory.bin (OpenWrt SNAPSHOT, r15139-33c27ccf4a), but still, ath9k does not detect the Qualcomm Atheros AR5008 Wireless chip

I wonder if this issue has to do with [[https://cateee.net/lkddb/web-lkddb/ATH9K_PCI_NO_EEPROM.html|this option]] which is currently disabled

I traced the origins of this behavior on initial Gabor Juhos [[https://frickel.cloud/firmware/openwrt/-/commit/b445943cdf967696f5c61b4e19aa3b984c8ffb15|pci ath9k fiup]] works.

@openwrt-bot
Copy link
Author

russell:

I don't know what you'd expect under /sys/firmware. All I see is some references to the device tree. The calibration data is in the art partition, afaik. I see data when I do this:

dd if=/dev/mtd8 | hexdump -C

I flashed this so long ago, I don't recall what version of Ubiquiti's software was on it, but it would have been 5.5.something. Here's the hash of my u-boot:

# dd if=/dev/mtd0 bs=64k | sha256sum
4+0 records in
4+0 records out
4371527ea4d5ff526884ed387fbc084c73722b76488a0d3dc02a55c297e658e8 -

Here's my bootlog (note, this is a custom build, it has batman-adv installed).

U-Boot 1.1.4.2 (Jul 13 2010 - 20:06:30)

Board: Ubiquiti Networks XM board (rev 0.0 e205)
DRAM: 32 MB
Flash: 8 MB
Net: eth0, eth1
Hit any key to stop autoboot: 0

Booting image at 9f050000 ...

Image Name: MIPS OpenWrt Linux-5.4.81
Created: 2020-12-05 9:26:39 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1988520 Bytes = 1.9 MB
Load Address: 80060000
Entry Point: 80060000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK

Starting kernel ...

[ 0.000000] Linux version 5.4.81 (openwrt@hawg) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r15142-0efbfef4f6)) #0 Sat Dec 5 09:26:39 2020
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[ 0.000000] MIPS: machine is Ubiquiti Bullet M (XM AR7240)
[ 0.000000] SoC: Atheros AR7240 rev 2
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000001ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000001ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[ 0.000000] On node 0 totalpages: 8192
[ 0.000000] Normal zone: 72 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 8192 pages, LIFO batch:0
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=132768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 8120
[ 0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 24960K/32768K available (4751K kernel code, 181K rwdata, 1096K rodata, 1196K init, 195K bss, 7808K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 51
[ 0.000000] random: get_random_bytes called from start_kernel+0x32c/0x518 with crng_init=0
[ 0.000000] CPU clock: 390.000 MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9801335621 ns
[ 0.000012] sched_clock: 32 bits at 195MHz, resolution 5ns, wraps every 11012737021ns
[ 0.007887] Calibrating delay loop... 259.58 BogoMIPS (lpj=519168)
[ 0.046048] pid_max: default: 32768 minimum: 301
[ 0.050892] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.058187] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.072312] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.082068] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.089019] pinctrl core: initialized pinctrl subsystem
[ 0.095663] NET: Registered protocol family 16
[ 0.142525] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[ 0.157052] clocksource: Switched to clocksource MIPS
[ 0.163935] NET: Registered protocol family 2
[ 0.169620] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.178032] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.185685] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.192728] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.199295] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.205876] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.213310] NET: Registered protocol family 1
[ 0.217719] PCI: CLS 0 bytes, default 32
[ 0.227143] workingset: timestamp_bits=14 max_order=13 bucket_order=0
[ 0.245125] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.250940] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.282576] pinctrl-single 18040028.pinmux: 64 pins, size 8
[ 0.289665] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[ 0.297170] printk: console [ttyS0] disabled
[ 0.301518] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 12187500) is a 16550A
[ 0.310207] printk: console [ttyS0] enabled
[ 0.318604] printk: bootconsole [early0] disabled
[ 0.338068] spi-nor spi0.0: mx25l6405d (8192 Kbytes)
[ 0.343196] 6 fixed-partitions partitions found on MTD device spi0.0
[ 0.349591] Creating 6 MTD partitions on "spi0.0":
[ 0.354443] 0x000000000000-0x000000040000 : "u-boot"
[ 0.360890] 0x000000040000-0x000000050000 : "u-boot-env"
[ 0.367675] 0x000000050000-0x0000007a0000 : "firmware"
[ 0.379190] 2 uimage-fw partitions found on MTD device firmware
[ 0.385208] Creating 2 MTD partitions on "firmware":
[ 0.390219] 0x000000000000-0x0000001f0000 : "kernel"
[ 0.396536] 0x0000001f0000-0x000000750000 : "rootfs"
[ 0.402945] mtd: device 4 (rootfs) set to be root filesystem
[ 0.411384] 1 squashfs-split partitions found on MTD device rootfs
[ 0.417698] 0x000000590000-0x000000750000 : "rootfs_data"
[ 0.424555] 0x0000007a0000-0x0000007b0000 : "board_config"
[ 0.431563] 0x0000007b0000-0x0000007f0000 : "cfg"
[ 0.437853] 0x0000007f0000-0x000000800000 : "art"
[ 0.447096] libphy: Fixed MDIO Bus: probed
[ 0.799191] libphy: ag71xx_mdio: probed
[ 0.804145] libphy: ar8xxx-mdio: probed
[ 0.811514] switch0: Atheros AR724X/AR933X built-in rev. 2 switch registered on mdio.0
[ 0.851248] ag71xx 19000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[ 0.861366] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: mii
[ 0.867711] i2c /dev entries driver
[ 0.874570] NET: Registered protocol family 10
[ 0.887018] Segment Routing with IPv6
[ 0.890965] NET: Registered protocol family 17
[ 0.895537] 8021q: 802.1Q VLAN Support v1.8
[ 0.900992] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[ 0.907577] MEM 0x0000000010000000..0x0000000013ffffff
[ 0.912850] IO 0x0000000000000000..0x0000000000000000
[ 0.918384] PCI host bridge to bus 0000:00
[ 0.922562] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[ 0.929481] pci_bus 0000:00: root bus resource [io 0x0000]
[ 0.935102] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[ 0.941934] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 0.949947] pci 0000:00:00.0: [168c:002a] type 00 class 0x028000
[ 0.956069] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x0000ffff 64bit]
[ 0.963075] pci 0000:00:00.0: supports D1
[ 0.967124] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[ 0.974477] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[ 0.981194] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
[ 1.003297] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[ 1.020442] Freeing unused kernel memory: 1196K
[ 1.025035] This architecture does not have kernel memory protection.
[ 1.031504] Run /sbin/init as init process
[ 1.145066] random: fast init done
[ 2.257914] init: Console is alive
[ 2.261815] init: - watchdog -
[ 3.840862] kmodloader: loading kernel modules from /etc/modules-boot.d/

[ 4.212726] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 4.231665] init: - preinit -
[ 6.615968] random: jshn: uninitialized urandom read (4 bytes read)
[ 7.083695] random: jshn: uninitialized urandom read (4 bytes read)
[ 7.229904] random: jshn: uninitialized urandom read (4 bytes read)
[ 7.638095] urandom_read: 3 callbacks suppressed
[ 7.638107] random: jshn: uninitialized urandom read (4 bytes read)
[ 8.041590] eth0: link up (100Mbps/Full duplex)
[ 8.048098] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 8.074665] random: procd: uninitialized urandom read (4 bytes read)
[ 12.457838] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[ 12.471368] urandom-seed: Seed file not found (/etc/urandom.seed)
[ 12.632908] eth0: link down
[ 12.655777] procd: - early -
[ 12.658927] procd: - watchdog -
[ 13.351570] procd: - watchdog -
[ 13.514313] procd: - ubus -
[ 13.568258] random: ubusd: uninitialized urandom read (4 bytes read)
[ 13.575371] random: ubusd: uninitialized urandom read (4 bytes read)
[ 13.583423] procd: - init -
[ 15.037949] kmodloader: loading kernel modules from /etc/modules.d/*
[ 15.389252] Loading modules backported from Linux version v5.8-0-gbcf876870b95
[ 15.396555] Backport generated by backports.git v5.8-1-0-g79400d9e
[ 15.630160] batman_adv: B.A.T.M.A.N. advanced 2020.4-openwrt-1 (compatibility version 15) loaded
[ 15.680215] ath9k 0000:00:00.0: Direct firmware load for ath9k-eeprom-pci-0000:00:00.0.bin failed with error -2
[ 15.690438] ath9k 0000:00:00.0: Falling back to sysfs fallback for: ath9k-eeprom-pci-0000:00:00.0.bin
[ 16.055260] urngd: v1.0.2 started.
[ 16.384366] ath: phy0: Ignoring endianness difference in EEPROM magic bytes.
[ 16.393042] ath: EEPROM regdomain sanitized
[ 16.393049] ath: EEPROM regdomain: 0x64
[ 16.393055] ath: EEPROM indicates we should expect a direct regpair map
[ 16.393081] ath: Country alpha2 being used: 00
[ 16.393086] ath: Regpair used: 0x64
[ 16.410269] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 16.413742] ieee80211 phy0: Atheros AR9280 Rev:2 mem=0xb0000000, irq=13
[ 16.506281] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 16.653430] random: crng init done
[ 34.125963] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[ 34.145113] jffs2_build_filesystem(): unlocking the mtd device...
[ 34.145123] done.
[ 34.153302] jffs2_build_filesystem(): erasing all blocks after the end marker...
[ 39.627668] eth0: link up (100Mbps/Full duplex)
[ 39.643261] br-pub: port 1(eth0) entered blocking state
[ 39.648591] br-pub: port 1(eth0) entered disabled state
[ 39.686951] device eth0 entered promiscuous mode
[ 39.711684] br-pub: port 1(eth0) entered blocking state
[ 39.717017] br-pub: port 1(eth0) entered forwarding state
[ 40.644449] IPv6: ADDRCONF(NETDEV_CHANGE): br-pub: link becomes ready
[ 41.592881] 8021q: adding VLAN 0 to HW filter on device bat0
[ 41.627962] br-pub: port 2(bat0) entered blocking state
[ 41.633297] br-pub: port 2(bat0) entered disabled state
[ 41.639039] device bat0 entered promiscuous mode
[ 41.643948] br-pub: port 2(bat0) entered blocking state
[ 41.649246] br-pub: port 2(bat0) entered forwarding state
[ 42.117161] batman_adv: bat0: No IGMP Querier present - multicast optimizations disabled
[ 42.125318] batman_adv: bat0: No MLD Querier present - multicast optimizations disabled
[ 42.803746] ath: EEPROM regdomain: 0x8348
[ 42.803758] ath: EEPROM indicates we should expect a country code
[ 42.803770] ath: doing EEPROM country->regdmn map search
[ 42.803780] ath: country maps to regdmn code: 0x3a
[ 42.803787] ath: Country alpha2 being used: US
[ 42.803792] ath: Regpair used: 0x3a
[ 42.803803] ath: regdomain 0x8348 dynamically updated by user
[ 46.685558] br-pub: port 3(wlan0) entered blocking state
[ 46.691095] br-pub: port 3(wlan0) entered disabled state
[ 46.696945] device wlan0 entered promiscuous mode
[ 46.742160] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 46.748834] br-pub: port 3(wlan0) entered blocking state
[ 46.754229] br-pub: port 3(wlan0) entered forwarding state
[ 48.471185] IPv6: ADDRCONF(NETDEV_CHANGE): mesh0: link becomes ready
[ 49.002802] batman_adv: bat0: Adding interface: mesh0
[ 49.007982] batman_adv: bat0: Interface activated: mesh0
[ 51.015360] done.
[ 51.017543] jffs2: notice: (1400) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[ 51.596099] overlayfs: upper fs does not support tmpfile.
[ 66.540065] device wlan0 left promiscuous mode
[ 66.544773] br-pub: port 3(wlan0) entered disabled state
[ 66.964531] batman_adv: bat0: Interface deactivated: mesh0
[ 67.516085] batman_adv: bat0: Removing interface: mesh0
[ 73.052820] br-pub: port 3(wlan0) entered blocking state
[ 73.058388] br-pub: port 3(wlan0) entered disabled state
[ 73.064266] device wlan0 entered promiscuous mode
[ 73.219758] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 73.226424] br-pub: port 3(wlan0) entered blocking state
[ 73.231819] br-pub: port 3(wlan0) entered forwarding state
[ 74.993646] IPv6: ADDRCONF(NETDEV_CHANGE): mesh0: link becomes ready
[ 75.802603] batman_adv: bat0: Adding interface: mesh0
[ 75.808045] batman_adv: bat0: Interface activated: mesh0

@openwrt-bot
Copy link
Author

acoul:

Hello Russell & thank you for the feedback

it looks like you are using a custom build on your bullet-M. is it possible to post the contents of the following:

zcat /proc/config.gz | grep ^CON

for the above to work, image has to be build with the kernel option "IKCONFIG_PROC" enabled - wish OpenWrt builds made this option a default

and/or possibly a link of your image that I may try to flash & test on my bullet-M ?

flashing today's ath79/snapshot on my bullet-M, the problem of the ath9k not loading remains

enabling CONFIG_PACKAGE_kmod-owl-loader though, resulted on a successful detection & load of ath9k

I am attaching a dmesg diff of my (trunk) dmesg against yours & also a dmesg with the CONFIG_PACKAGE_kmod-owl-loader enabled

finally, any hints, references, pointers onto how the wlan calibration data is been loaded, utilized & used would be quite welcomed

@openwrt-bot
Copy link
Author

russell:

My custom build is for a dumb-ap configuration. My diffconfig is as follows:

CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_generic=y
CONFIG_TARGET_ath79_generic_DEVICE_ubnt_bullet-m-ar7240=y
CONFIG_DEVEL=y
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_ALFRED_NEEDS_lua=y
CONFIG_BATMAN_ADV_BATMAN_V=y
CONFIG_BATMAN_ADV_BLA=y
CONFIG_BATMAN_ADV_DAT=y
CONFIG_BATMAN_ADV_MCAST=y
CONFIG_BUILD_LOG=y

CONFIG_BUSYBOX_CONFIG_BRCTL is not set

CONFIG_BUSYBOX_CONFIG_FREE is not set

CONFIG_BUSYBOX_CONFIG_MESG=y

CONFIG_BUSYBOX_CONFIG_PGREP is not set

CONFIG_BUSYBOX_CONFIG_RDATE=y

CONFIG_BUSYBOX_CONFIG_TOP is not set

CONFIG_BUSYBOX_CONFIG_UPTIME is not set

CONFIG_LIBCURL_COOKIES=y
CONFIG_LIBCURL_FILE=y
CONFIG_LIBCURL_FTP=y
CONFIG_LIBCURL_HTTP=y
CONFIG_LIBCURL_NO_SMB="!"
CONFIG_LIBCURL_PROXY=y
CONFIG_LIBCURL_WOLFSSL=y
CONFIG_PACKAGE_ALFRED_BATHOSTS=y
CONFIG_PACKAGE_ALFRED_VIS=y
CONFIG_PACKAGE_alfred=y
CONFIG_PACKAGE_batctl-default=y
CONFIG_PACKAGE_bridge=y
CONFIG_PACKAGE_curl=y
CONFIG_PACKAGE_diffutils=y

CONFIG_PACKAGE_dnsmasq is not set

CONFIG_PACKAGE_dumb-ap=y
CONFIG_PACKAGE_dumb-ap-ath9k=y

CONFIG_PACKAGE_firewall is not set

CONFIG_PACKAGE_horst=y
CONFIG_PACKAGE_iftop=y
CONFIG_PACKAGE_ip-tiny=y

CONFIG_PACKAGE_ip6tables is not set

CONFIG_PACKAGE_iptables is not set

CONFIG_PACKAGE_kmod-batman-adv=y
CONFIG_PACKAGE_kmod-crypto-crc32c=y
CONFIG_PACKAGE_kmod-crypto-hash=y

CONFIG_PACKAGE_kmod-ip6tables is not set

CONFIG_PACKAGE_kmod-ipt-conntrack is not set

CONFIG_PACKAGE_kmod-ipt-core is not set

CONFIG_PACKAGE_kmod-ipt-nat is not set

CONFIG_PACKAGE_kmod-ipt-offload is not set

CONFIG_PACKAGE_kmod-lib-crc-ccitt is not set

CONFIG_PACKAGE_kmod-lib-crc16=y
CONFIG_PACKAGE_kmod-lib-crc32c=y

CONFIG_PACKAGE_kmod-nf-conntrack is not set

CONFIG_PACKAGE_kmod-nf-conntrack6 is not set

CONFIG_PACKAGE_kmod-nf-flow is not set

CONFIG_PACKAGE_kmod-nf-ipt is not set

CONFIG_PACKAGE_kmod-nf-ipt6 is not set

CONFIG_PACKAGE_kmod-nf-nat is not set

CONFIG_PACKAGE_kmod-nf-reject is not set

CONFIG_PACKAGE_kmod-nf-reject6 is not set

CONFIG_PACKAGE_kmod-nls-base is not set

CONFIG_PACKAGE_kmod-ppp is not set

CONFIG_PACKAGE_kmod-usb-core is not set

CONFIG_PACKAGE_kmod-usb-ohci is not set

CONFIG_PACKAGE_kmod-usb2 is not set

CONFIG_PACKAGE_libcurl=y

CONFIG_PACKAGE_libip4tc is not set

CONFIG_PACKAGE_libip6tc is not set

CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_libncurses=y
CONFIG_PACKAGE_libnetsnmp=y
CONFIG_PACKAGE_libpcap=y
CONFIG_PACKAGE_libpci=y
CONFIG_PACKAGE_libpopt=y
CONFIG_PACKAGE_librt=y

CONFIG_PACKAGE_libxtables is not set

CONFIG_PACKAGE_lua=y

CONFIG_PACKAGE_odhcp6c is not set

CONFIG_PACKAGE_odhcpd-ipv6only is not set

CONFIG_PACKAGE_ppp is not set

CONFIG_PACKAGE_procps-ng=y
CONFIG_PACKAGE_procps-ng-free=y
CONFIG_PACKAGE_procps-ng-kill=y
CONFIG_PACKAGE_procps-ng-pgrep=y
CONFIG_PACKAGE_procps-ng-pkill=y
CONFIG_PACKAGE_procps-ng-pmap=y
CONFIG_PACKAGE_procps-ng-ps=y
CONFIG_PACKAGE_procps-ng-pwdx=y
CONFIG_PACKAGE_procps-ng-skill=y
CONFIG_PACKAGE_procps-ng-slabtop=y
CONFIG_PACKAGE_procps-ng-snice=y
CONFIG_PACKAGE_procps-ng-tload=y
CONFIG_PACKAGE_procps-ng-top=y
CONFIG_PACKAGE_procps-ng-uptime=y
CONFIG_PACKAGE_procps-ng-vmstat=y
CONFIG_PACKAGE_procps-ng-w=y
CONFIG_PACKAGE_procps-ng-watch=y
CONFIG_PACKAGE_rsync=y
CONFIG_PACKAGE_snmpd=y
CONFIG_PACKAGE_tcpdump=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_wpad-basic=y
CONFIG_PACKAGE_wpad-basic-wolfssl=m
CONFIG_PACKAGE_zlib=y

@openwrt-bot
Copy link
Author

acoul:

Hey Russell,

I made a diff of our Bullet-M dmesg

it looks like that our Bullet0M hw differs a bit

spi-nor spi0.0: mx25l6405d (8192 Kbytes)
spi-nor spi0.0: m25p64 (8192 Kbytes)

also on my Bullet, the following section is totally missing from all ath79/ar71xx available images:

On node 0 totalpages: 8192
Normal zone: 72 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 8192 pages, LIFO batch:0
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0

@openwrt-bot
Copy link
Author

acoul:

Greetings Russel,

from all the above, do you have any idea as to why on my device, ath9k fails to load & to why enabling CONFIG_PACKAGE_kmod-owl-loader, ath9k successfully loads ?

is it because, for some reason, ath9k can't find the art info & owl-loader works around this ? the only info I found about the owl-loader [[https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=e9401a2335cc442bd06209ff7becdd60e940c3de|is here]] but still this is not too enlightening for me.

// The calibration data is in the art partition, afaik. I see data when I do this: //

dd if=/dev/mtd8 | hexdump -C

same in my device, there is data on /dev/mtd8

here is the output of /proc/mtd

dev: size erasesize name
mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00750000 00010000 "firmware"
mtd3: 00180000 00010000 "kernel"
mtd4: 005d0000 00010000 "rootfs"
mtd5: 003b0000 00010000 "rootfs_data"
mtd6: 00010000 00010000 "board_config"
mtd7: 00040000 00010000 "cfg"
mtd8: 00010000 00010000 "art"

any suggestions as to how further debug this issue ?

thank you for the feedback

@openwrt-bot
Copy link
Author

russell:

https://forum.openwrt.org/t/openwrt-18-06-1-dont-show-wifi-wireless-network-and-dont-work/23482/26

Note your pci id matches (googling on it might lead to more insight). Ignore the sidetrack in the forum thread mentioning broadcom, that's a red herring.

@openwrt-bot
Copy link
Author

russell:

Below is a hexdump -C of what I have in my /lib/firmware/ath9k-eeprom-pci-0000:00:00.0.bin

Note the pci id at address 0x1a-0x1d (168c:002a). You might look at yours and compare. It looks like that eeprom bin is extracted from offset 0x1000 of the /dev/mtd8 partition.

# dd if=/dev/mtd8 of=/tmp/eeprom.bin bs=4k skip=1 count=1 # sha256sum /tmp/eeprom.bin /lib/firmware/ath9k-eeprom-pci-0000\:00\:00.0.bin d7bec1e148e7a80e0fceaa4b8c03e8f372cd38b07c23cc86a76150eef5d83a3c /tmp/eeprom.bin d7bec1e148e7a80e0fceaa4b8c03e8f372cd38b07c23cc86a76150eef5d83a3c /lib/firmware/ath9k-eeprom-pci-0000:00:00.0.bin

This thread implies it might have been damaged by 18.06:
[[https://forum.openwrt.org/t/wifi-ar922x-not-detected-after-upgrade-18-06/18338]]

00000000 a5 5a 00 00 00 03 60 00 16 8c 00 29 60 08 00 01 |.Z....`....)`...| 00000010 02 80 60 2c 07 77 e2 05 50 00 16 8c 00 2a 50 08 |..`,.w..P....*P.| 00000020 00 01 02 80 50 2c 07 77 e2 05 50 64 0c c0 05 04 |....P,.w..Pd....| 00000030 50 6c 38 11 00 03 40 04 07 3b 00 40 40 74 00 03 |Pl8...@..;.@@t..| 00000040 00 00 40 00 50 01 01 c2 60 34 00 44 00 00 ff ff |..@.P...`4.D....| 00000050 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000200 0c b8 60 e3 e0 16 01 01 00 00 00 1f 00 15 6d 8e |..`...........m.| 00000210 d8 69 01 01 00 00 00 00 00 00 00 09 04 00 04 01 |.i..............| 00000220 00 ff 02 00 00 01 00 00 00 00 00 00 00 00 00 00 |................| 00000230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000280 00 00 01 58 00 00 01 58 00 00 00 00 00 00 01 e0 |...X...X........| 00000290 00 00 00 2c 20 20 0b 00 00 0b e2 00 0e 0e 0e 00 |..., ..........| 000002a0 02 0e 1c ca ca ca 01 01 00 00 00 00 00 00 06 04 |................| 000002b0 04 00 00 00 0e 0e 02 15 15 00 1f 1f 00 2c 00 00 |.............,..| 000002c0 00 00 00 00 04 04 5d 09 00 00 00 00 00 00 8e 8c |......].........| 000002d0 88 8e 8c 88 80 00 00 00 00 00 00 00 00 00 00 00 |................| 000002e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000002f0 00 00 00 00 00 00 00 00 00 00 00 2d 0b 0b 0b 10 |...........-....| 000002f0 00 00 00 00 00 00 00 00 00 00 00 2d 0b 0b 0b 10 |...........-....| 00000300 10 10 e0 00 0d 0d 0d 00 02 0e 00 ff ff ff 09 01 |................| 00000310 00 00 00 00 00 00 06 02 02 01 00 00 0e 0e 02 19 |................| 00000320 19 00 1f 1f 00 2d 00 00 00 00 00 00 03 03 1d 09 |.....-..........| 00000330 00 00 00 00 00 00 92 00 00 92 00 00 80 00 00 00 |................| 00000340 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000350 50 64 78 8c a0 b4 be cd 00 00 00 00 37 4e 64 75 |Pdx.........7Ndu| 00000360 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000370 22 27 2f 42 60 00 00 00 00 00 00 00 00 00 00 00 |"'/B`...........| 00000380 00 00 00 00 3e 55 69 76 7c 00 00 00 00 00 00 00 |....>Uiv|.......| 00000390 00 00 00 00 00 00 00 00 23 2a 34 4c 60 00 00 00 |........#*4L`...| 000003a0 00 00 00 00 00 00 00 00 00 00 00 00 33 4a 60 72 |............3J`r| 000003b0 79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |y...............| 000003c0 22 26 2e 42 5d 00 00 00 00 00 00 00 00 00 00 00 |"&.B]...........| 000003d0 00 00 00 00 29 40 57 6c 77 00 00 00 00 00 00 00 |....)@Wlw.......| 000003e0 00 00 00 00 00 00 00 00 21 24 2b 38 55 00 00 00 |........!$+8U...| 000003f0 00 00 00 00 00 00 00 00 00 00 00 00 25 3b 52 68 |............%;Rh| 00000400 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |t...............| 00000410 21 25 29 36 51 00 00 00 00 00 00 00 00 00 00 00 |!%)6Q...........| 00000420 00 00 00 00 21 37 4f 65 71 00 00 00 00 00 00 00 |....!7Oeq.......| 00000430 00 00 00 00 00 00 00 00 21 23 29 36 4d 00 00 00 |........!#)6M...| 00000440 00 00 00 00 00 00 00 00 00 00 00 00 1f 36 4d 63 |.............6Mc| 00000450 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |p...............| 00000460 21 23 29 34 4a 00 00 00 00 00 00 00 00 00 00 00 |!#)4J...........| 00000470 00 00 00 00 1c 32 49 60 6d 00 00 00 00 00 00 00 |.....2I`m.......| 00000480 00 00 00 00 00 00 00 00 21 23 28 32 44 00 00 00 |........!#(2D...| 00000490 00 00 00 00 00 00 00 00 00 00 00 00 90 bf 90 bf |................| 000004a0 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |b...............| 000004b0 a8 bf a8 bf 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000004c0 00 00 00 00 88 bf 88 bf 00 00 00 00 00 00 00 00 |................| 000004d0 00 00 00 00 00 00 00 00 a0 bf a0 bf 5f 00 00 00 |............_...| 000004e0 00 00 00 00 00 00 00 00 00 00 00 00 a8 bf 78 bf |..............x.| 000004f0 68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |h...............| 00000500 98 bf 98 bf 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000510 00 00 00 00 a8 bf 78 bf 00 00 00 00 00 00 00 00 |......x.........| 00000520 00 00 00 00 00 00 00 00 a8 bf 78 bf 00 00 00 00 |..........x.....| 00000530 00 00 00 00 00 00 00 00 00 00 00 00 e8 bf e8 bf |................| 00000540 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000550 00 bf 00 bf 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........| 00000560 00 00 00 00 e0 bf e0 bf 00 00 00 00 00 00 00 00 |................| 00000570 00 00 00 00 00 00 00 00 f8 bf f8 bf 00 00 00 00 |................| 00000580 00 00 00 00 00 00 00 00 00 00 00 00 d8 bf d8 bf |................| 00000590 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000005a0 f0 bf f0 bf 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........| 000005b0 00 00 00 00 d0 bf d0 bf 00 00 00 00 00 00 00 00 |................| 000005c0 00 00 00 00 00 00 00 00 e8 bf e8 bf 75 00 00 00 |............u...| 000005d0 00 00 00 00 00 00 00 00 00 00 00 00 78 bf 78 bf |............x.x.| 000005e0 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |3...............| 000005f0 78 bf 78 bf 67 00 00 00 00 00 00 00 00 00 00 00 |x.x.g...........| 00000600 00 00 00 00 78 bf 78 bf 45 00 00 00 00 00 00 00 |....x.x.E.......| 00000610 00 00 00 00 00 00 00 00 78 bf 78 bf 70 00 00 00 |........x.x.p...| 00000620 00 00 00 00 00 00 00 00 00 00 00 00 78 bf 78 bf |............x.x.| 00000630 6f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |o...............| 00000640 78 bf 78 bf 0d 00 00 00 00 00 00 00 00 00 00 00 |x.x.............| 00000650 00 00 00 00 78 bf 78 bf 20 00 00 00 00 00 00 00 |....x.x. .......| 00000660 00 00 00 00 00 00 00 00 78 bf 78 bf 42 00 00 00 |........x.x.B...| 00000670 00 00 00 00 00 00 00 00 00 00 00 00 78 bf 78 bf |............x.x.| 00000680 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ...............| 00000690 78 bf 78 bf 20 00 00 00 00 00 00 00 00 00 00 00 |x.x. ...........| 000006a0 00 00 00 00 78 bf 78 bf 77 00 00 00 00 00 00 00 |....x.x.w.......| 000006b0 00 00 00 00 00 00 00 00 78 bf 78 bf 31 00 00 00 |........x.x.1...| 000006c0 00 00 00 00 00 00 00 00 00 00 00 00 78 bf 78 bf |............x.x.| 000006d0 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |t...............| 000006e0 78 bf 78 bf 6e 00 00 00 00 00 00 00 00 00 00 00 |x.x.n...........| 000006f0 00 00 00 00 78 bf 78 bf 43 00 00 00 00 00 00 00 |....x.x.C.......| 00000700 00 00 00 00 00 00 00 00 78 bf 78 bf 20 00 00 00 |........x.x. ...| 00000710 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000008f0 00 00 00 00 00 00 00 00 00 00 00 00 4c 26 20 1e |............L& .| 00000900 1c 68 26 20 1e 1c b4 26 20 1e 1c cd 26 20 1e 1c |.h& ...& ...& ..| 00000910 ff 00 00 00 00 ff 00 00 00 00 ff 00 00 00 00 ff |................| 00000920 00 00 00 00 4c 24 24 24 22 20 1e 1c 18 58 26 26 |....L$$$" ...X&&| 00000930 26 22 20 1e 1c 18 68 26 26 26 22 20 1e 1c 18 86 |&" ...h&&&" ....| 00000940 26 26 26 22 20 1e 1c 18 8c 26 26 26 24 22 20 1c |&&&" ....&&&$" .| 00000950 18 bd 26 26 26 24 22 20 1c 18 cd 26 26 26 24 22 |..&&&$" ...&&&$"| 00000960 20 1c 18 ff 00 00 00 00 00 00 00 00 4c 24 24 24 | ...........L$$$| 00000970 22 20 1e 1c 18 58 24 24 24 22 20 1e 1c 18 68 24 |" ...X$$$" ...h$| 00000980 24 24 22 20 1e 1c 18 86 24 24 24 22 20 1e 1c 18 |$$" ....$$$" ...| 00000990 8c 26 26 26 24 22 20 1c 18 bd 26 26 26 24 22 20 |.&&&$" ...&&&$" | 000009a0 1c 18 cd 26 26 26 24 22 20 1c 18 ff 00 00 00 00 |...&&&$" .......| 000009b0 00 00 00 00 70 20 20 20 20 b8 20 20 20 20 ff 00 |....p . ..| 000009c0 00 00 00 70 1e 1c 1a 18 89 1e 1c 1a 18 ac 1e 1c |...p............| 000009d0 1a 18 ff 00 00 00 00 70 1e 1e 1e 1e 1c 1c 14 12 |.......p........| 000009e0 89 1e 1e 1e 1e 1c 1c 14 12 ac 1e 1e 1e 1e 1c 1c |................| 000009f0 14 12 ff 00 00 00 00 00 00 00 00 70 1e 1e 1e 1e |...........p....| 00000a00 1c 1c 14 12 89 1e 1e 1e 1e 1c 1c 14 12 ac 1e 1e |................| 00000a10 1e 1e 1c 1c 14 12 ff 00 00 00 00 00 00 00 00 10 |................| 00000a20 16 18 11 12 15 17 40 46 41 42 45 30 36 38 31 32 |......@FABE06812| 00000a30 35 37 00 00 00 00 00 4c 66 50 66 68 26 8c 66 a0 |57.....LfPfh&.f.| 00000a40 66 b4 66 bd 66 cd 40 00 00 00 00 00 00 00 00 00 |f.f.f.@.........| 00000a50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000a60 00 00 00 00 00 00 00 4c 66 50 66 68 66 8c 66 a0 |.......LfPfhf.f.| 00000a70 66 b4 66 bd 66 cd 66 00 00 00 00 00 00 00 00 00 |f.f.f.f.........| 00000a80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000a90 00 00 00 00 00 00 00 4e 66 56 66 66 66 8e 66 9e |.......NfVfff.f.| 00000aa0 66 ae 66 bf 66 c7 66 00 00 00 00 00 00 00 00 00 |f.f.f.f.........| 00000ab0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000ac0 00 00 00 00 00 00 00 70 62 75 66 a2 63 00 00 00 |.......pbuf.c...| 00000ad0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000af0 00 00 00 00 00 00 00 70 5e 75 64 a2 5c 00 00 00 |.......p^ud.\...| 00000b00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000b20 00 00 00 00 00 00 00 70 5e 75 64 a2 59 00 00 00 |.......p^ud.Y...| 00000b30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000b50 00 00 00 00 00 00 00 7a 58 7f 64 93 64 98 55 00 |.......zX.d.d.U.| 00000b60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000b80 00 00 00 00 00 00 00 4a 66 50 66 5c 66 68 66 00 |.......JfPf\fhf.| 00000b90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000bb0 00 00 00 00 00 00 00 4a 66 50 66 5c 66 68 66 00 |.......JfPf\fhf.| 00000bc0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000be0 00 00 00 00 00 00 00 70 5e 75 5e ac 5e b8 5e 00 |.......p^u^.^.^.| 00000bf0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000c10 00 00 00 00 00 00 00 70 61 75 61 ac 61 00 00 00 |.......paua.a...| 00000c20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000c40 00 00 00 00 00 00 00 70 62 75 62 98 62 00 00 00 |.......pbub.b...| 00000c50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000c70 00 00 00 00 00 00 00 4c 66 5c 66 68 66 8c 66 a0 |.......Lf\fhf.f.| 00000c80 66 b4 66 bd 66 cd 66 00 00 00 00 00 00 00 00 00 |f.f.f.f.........| 00000c90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000ca0 00 00 00 00 00 00 00 4c 66 50 66 68 66 8c 66 a0 |.......LfPfhf.f.| 00000cb0 66 b4 66 bd 66 cd 66 00 00 00 00 00 00 00 00 00 |f.f.f.f.........| 00000cc0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000cd0 00 00 00 00 00 00 00 4e 66 56 66 66 66 8e 66 9e |.......NfVfff.f.| 00000ce0 66 ae 66 00 00 00 00 00 00 00 00 00 00 00 00 00 |f.f.............| 00000cf0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000d00 00 00 00 00 00 00 00 70 5c 75 5c ac 5c 00 00 00 |.......p\u\.\...| 00000d10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000d30 00 00 00 00 00 00 00 70 5c 75 5c ac 5c 00 00 00 |.......p\u\.\...| 00000d40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000d60 00 00 00 00 00 00 00 70 5c 75 5c ac 5c 00 00 00 |.......p\u\.\...| 00000d70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000d90 00 00 00 00 00 00 00 7a 5c 7f 5c 93 5c 98 5c 00 |.......z\.\.\.\.| 00000da0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000eb0 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff |................| 00000ec0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00001000

@openwrt-bot
Copy link
Author

acoul:

Hi Russel,

thank you for the feedback

//Note the pci id at address 0x1a-0x1d (168c:002a). You might look at yours and compare. It looks like that eeprom bin is extracted from offset 0x1000 of the /dev/mtd8 partition. //

dd if=/dev/mtd8 of=/tmp/eeprom.bin bs=4k skip=1 count=1

here is the result on my Bullet-M5 with owl-loader enabled

sha256sum /tmp/eeprom.bin /lib/firmware/ath9k-eeprom-pci-0000:00:00.0.bin
60503673c3ecd3e0a9d9579f2b95a614e9f79fb5e7ad601086f409d3e33dcce4 /tmp/eeprom.bin
60503673c3ecd3e0a9d9579f2b95a614e9f79fb5e7ad601086f409d3e33dcce4 /lib/firmware/ath9k-eeprom-pci-0000:00:00.0.bin

I think you really nailed the issue by referring to the //pci id address//.

BTW, is your Bullet-M a 2.4GHz version ? mine is a 5GHz

let me summarize the issue so far:

on my Bullet-M5, ar71xx is working fine. under ath79/trunk though, ath9k can't load without the [[https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=e9401a2335cc442bd06209ff7becdd60e940c3de|owl-loader helper]] which apparently does the following "magic:

dmesg | grep -i pci'|'awl'|'ath

SoC: Atheros AR7240 rev 2
PCI: CLS 0 bytes, default 32
switch0: Atheros AR724X/AR933X built-in rev. 2 switch registered on mdio.0
eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: mii
PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
pci_bus 0000:00: root bus resource [io 0x0000]
pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
pci 0000:00:00.0: [168c:ff1c] type 00 class 0x020000
pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x0000ffff 64bit]
pci 0000:00:00.0: supports D1
pci 0000:00:00.0: PME# supported from D0 D1 D3hot
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
ath9k_pci_owl_loader 0000:00:00.0: enabling device (0000 -> 0002)
ath9k_pci_owl_loader 0000:00:00.0: fixup device configuration
pci 0000:00:00.0: [168c:002a] type 00 class 0x028000
pci 0000:00:00.0: reg 0x10: [mem 0x10000000-0x1000ffff 64bit]
pci 0000:00:00.0: supports D1
pci 0000:00:00.0: PME# supported from D0 D1 D3hot
pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
ath9k 0000:00:00.0: enabling device (0000 -> 0002)
ath: phy0: Ignoring endianness difference in EEPROM magic bytes.
ath: EEPROM regdomain sanitized
ath: EEPROM regdomain: 0x64
ath: EEPROM indicates we should expect a direct regpair map
ath: Country alpha2 being used: 00
ath: Regpair used: 0x64
ieee80211 phy0: Atheros AR9280 Rev:2 mem=0xb0000000, irq=12
ath: EEPROM regdomain: 0x812c
ath: EEPROM indicates we should expect a country code
ath: doing EEPROM country->regdmn map search
ath: country maps to regdmn code: 0x37
ath: Country alpha2 being used: GR
ath: Regpair used: 0x37
ath: regdomain 0x812c dynamically updated by user

specifically the "magic" is done here:

dmesg | grep "type 00 class"

pci 0000:00:00.0: [168c:ff1c] type 00 class 0x020000
pci 0000:00:00.0: [168c:002a] type 00 class 0x028000

I don't know if this ath79 issue is related on the peculiarity [[https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=f6385f30bd2ef202e526d964c5eebcf2b04d0675|described here]] (probably not)

in my ar71xx Bullet-M5:

dmesg | grep -i pci'|'awl'|'ath
SoC: Atheros AR7240 rev 2
registering PCI controller with io_map_base unset
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
pci_bus 0000:00: root bus resource [io 0x0000]
pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
pci 0000:00:00.0: [168c:ff1c] type 00 class 0x020000
pci 0000:00:00.0: fixup device configuration
pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x0000ffff 64bit]
pci 0000:00:00.0: supports D1
pci 0000:00:00.0: PME# supported from D0 D1 D3hot
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
pci 0000:00:00.0: using irq 40 for pin 1
PCI: CLS 0 bytes, default 32
eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
ath: phy0: Ignoring endianness difference in EEPROM magic bytes.
ath: EEPROM regdomain: 0x0
ath: EEPROM indicates default country code should be used
ath: doing EEPROM country->regdmn map search
ath: country maps to regdmn code: 0x3a
ath: Country alpha2 being used: US
ath: Regpair used: 0x3a
ieee80211 phy0: Atheros AR9280 Rev:2 mem=0xb0000000, irq=40

I wonder if this is the spot where the ar71xx "magic" happens, which is possibly related to this [[https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=b445943cdf967696f5c61b4e19aa3b984c8ffb15|ancient trick:]]
pci 0000:00:00.0: [168c:ff1c] type 00 class 0x020000
pci 0000:00:00.0: fixup device configuration
PCI: Enabling device 0000:00:00.0 (0000 -> 0002)

which is similar to this ath79/owl trickery:
pci 0000:00:00.0: [168c:ff1c] type 00 class 0x020000
ath9k_pci_owl_loader 0000:00:00.0: enabling device (0000 -> 0002)
ath9k_pci_owl_loader 0000:00:00.0: fixup device configuration

cheers

@openwrt-bot
Copy link
Author

acoul:

digging further into this issue, I bumped onto [[https://patchwork.kernel.org/project/linux-wireless/patch/20190705175313.19482-1-chunkeey@gmail.com/|this patch]]

if the EEPROM content is not valid, a value of 0xFF1C returns
when read from the register". So, they will show up on the system's
pci bus. However in that state, ath9k can't load, since it relies
on having the correct pci-id, otherwise it doesn't know what chip it
actually is

this current BUG report looks like a duplicate of [[https://bugs.openwrt.org/index.php?do=details&task_id=1734|#1734 BUG]]

which states:

Please try to add the kmod-owl-loader (target/linux/generic/files/drivers/misc/owl-loader.c)
to your image. the owl-loader is supposed to do the fixup.

so I guess, if there are no objections, this BUG can shamefully {again} close as invalid ?

still Russel, the fact that your Bullet-M, under ath79, doesn't need owl-loder fixup is quite puzzling to me.

here is some [[https://ath9k-devel.ath9k.narkive.com/w7UrUj8N/rfc-v3-ath9k-add-devicetree-support-to-ath9k#post5|extra historical]] & a more [[https://linuxlists.cc/l/9/linux-wireless/t/3193913/(rfc_patch)_ath9k:_integrate_ar92xx_pci_fixup_code|recent]] reading on this topic.

@openwrt-bot
Copy link
Author

acoul:

Hey Russell,

can you post the output of the "lspci" with & without ath9k loaded on your bullet-M ?

in my case, owl-loader is a prerequisite in order for the ath9k to successfully load.

here is the "lspci" output in my case:

no ath9k:
00:00.0 Ethernet controller: Qualcomm Atheros AR5008 Wireless Network Adapter (rev 01)

owl-loader/ath9k loaded:
00:00.0 Network controller: Qualcomm Atheros AR928X Wireless Network Adapter (PCI-Express) (rev 01)

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