[Solved] Atheros AR9462 on x86 as an AP - can not get it to work at all

Hi to all,
I'm trying to setup OpenWRT (latest 18.06.2) on an older hardware with Pentium 4 EE (don't ask why and please do not concern about power requirements). The board (Gigabyte 955X Royal) has two Broadcom LAN adapters, one I want to use as WAN, second one as LAN. I inserted Gigabyte GC-WB300D in a PCIe ×16 slot (just because I want it as near to the CPU as possible and not to slow down anything on south bridge like those two LAN adapters). Both Broadcom adapters works as expected, but I'm unable to get the Gigabyte WiFi to work. It has wireless adapter that shows as Qualcomm Atheros AR9462 Wireless Network Adapter (rev 01) in lspci. It does not use any kernel module, as I can see in lspci -vvv:

01:00.0 Network controller: Qualcomm Atheros AR9462 Wireless Network Adapter (rev 01)
        Subsystem: Lite-On Communications Inc Device 6631
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 12
        Region 0: Memory at e1000000 (64-bit, non-prefetchable) [size=512K]
        [virtual] Expansion ROM at e0000000 [disabled] [size=64K]
        Capabilities: [40] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] MSI: Enable- Count=1/4 Maskable+ 64bit+
                Address: 0000000000000000  Data: 0000
                Masking: 00000000  Pending: 00000000
        Capabilities: [70] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 <64us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 10.000W
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 <64us
                        ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR-, OBFF Not Supported
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
                         AtomicOpsCtl: ReqEn-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
                        MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                HeaderLog: 00000000 00000000 00000000 00000000
        Capabilities: [140 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
                        Status: NegoPending- InProgress-
        Capabilities: [160 v1] Device Serial Number 00-00-00-00-00-00-00-00

Can you please help me to get it work? I tried to boot another linux distro on that machine and the Wi-Fi works as expected, 2.4 and also 5GHz band (as a client), so I assume the hardware is working and therefore it has to be in a software.

Thanks a lot in advance

No wifi drivers are included in x86 builds, you will have to install them. This should be an ath9k pci device.

I think that would require only kmod-ath9k (with kmod-ath9k-common as a dependency). The "htc" versions are for USB cards you will not need those.

1 Like

First of all: Thanks.

I did this

root@OpenWrt:~# opkg install kmod-ath9k
Installing kmod-ath9k (4.14.95+2017-11-01-9) to root...
Downloading http://downloads.openwrt.org/releases/18.06.2/targets/x86/generic/packages/kmod-ath9k_4.14.95%2b2017-11-01-9_i386_pentium4.ipk
Installing iw-full (4.14-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.2/packages/i386_pentium4/base/iw-full_4.14-1_i386_pentium4.ipk
Installing wireless-regdb (2017-10-20-4343d359) to root...
Downloading http://downloads.openwrt.org/releases/18.06.2/packages/i386_pentium4/base/wireless-regdb_2017-10-20-4343d359_i386_pentium4.ipk
Installing kmod-cfg80211 (4.14.95+2017-11-01-9) to root...
Downloading http://downloads.openwrt.org/releases/18.06.2/targets/x86/generic/packages/kmod-cfg80211_4.14.95%2b2017-11-01-9_i386_pentium4.ipk
Installing hostapd-common (2018-05-21-62566bc2-5) to root...
Downloading http://downloads.openwrt.org/releases/18.06.2/packages/i386_pentium4/base/hostapd-common_2018-05-21-62566bc2-5_i386_pentium4.ipk
Installing kmod-mac80211 (4.14.95+2017-11-01-9) to root...
Downloading http://downloads.openwrt.org/releases/18.06.2/targets/x86/generic/packages/kmod-mac80211_4.14.95%2b2017-11-01-9_i386_pentium4.ipk
Installing kmod-ath (4.14.95+2017-11-01-9) to root...
Downloading http://downloads.openwrt.org/releases/18.06.2/targets/x86/generic/packages/kmod-ath_4.14.95%2b2017-11-01-9_i386_pentium4.ipk
Installing kmod-ath9k-common (4.14.95+2017-11-01-9) to root...
Downloading http://downloads.openwrt.org/releases/18.06.2/targets/x86/generic/packages/kmod-ath9k-common_4.14.95%2b2017-11-01-9_i386_pentium4.ipk
Configuring iw-full.
Configuring wireless-regdb.
Configuring kmod-cfg80211.
Configuring hostapd-common.
Configuring kmod-mac80211.
Configuring kmod-ath.
Configuring kmod-ath9k-common.
Configuring kmod-ath9k.

And then rebooted. lspci still says nothing about any driver (kernel module) used for the device :disappointed_relieved:

Now it would be time to investigate the kernel log (dmesg) for hints, "lspci -knn" might also be more helpful in addition.

And here I'm at dead end due to my knowledge. I don't know whether it is a good idea to post it all, I'll do it anyway.
lspci -knn

00:00.0 Host bridge [0600]: Intel Corporation 82955X Memory Controller Hub [8086:2774] (rev 81)
        Subsystem: Gigabyte Technology Co., Ltd Device [1458:5000]
lspci: Unable to load libkmod resources: error -12
00:01.0 PCI bridge [0604]: Intel Corporation 82955X PCI Express Root Port [8086:2775] (rev 81)
        Kernel driver in use: pcieport
00:1c.0 PCI bridge [0604]: Intel Corporation NM10/ICH7 Family PCI Express Port 1 [8086:27d0] (rev 01)
        Kernel driver in use: pcieport
00:1c.2 PCI bridge [0604]: Intel Corporation NM10/ICH7 Family PCI Express Port 3 [8086:27d4] (rev 01)
        Kernel driver in use: pcieport
00:1c.3 PCI bridge [0604]: Intel Corporation NM10/ICH7 Family PCI Express Port 4 [8086:27d6] (rev 01)
        Kernel driver in use: pcieport
00:1d.0 USB controller [0c03]: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 [8086:27c8] (rev 01)
        Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD [1458:5004]
        Kernel driver in use: uhci_hcd
00:1d.1 USB controller [0c03]: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 [8086:27c9] (rev 01)
        Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD [1458:5004]
        Kernel driver in use: uhci_hcd
00:1d.2 USB controller [0c03]: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 [8086:27ca] (rev 01)
        Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD [1458:5004]
        Kernel driver in use: uhci_hcd
00:1d.3 USB controller [0c03]: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 [8086:27cb] (rev 01)
        Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD [1458:5004]
        Kernel driver in use: uhci_hcd
00:1d.7 USB controller [0c03]: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller [8086:27cc] (rev 01)
        Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD [1458:5006]
        Kernel driver in use: ehci-pci
00:1e.0 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev e1)
00:1f.0 ISA bridge [0601]: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge [8086:27b8] (rev 01)
        Subsystem: Gigabyte Technology Co., Ltd Device [1458:5001]
00:1f.1 IDE interface [0101]: Intel Corporation 82801G (ICH7 Family) IDE Controller [8086:27df] (rev 01)
        Subsystem: Gigabyte Technology Co., Ltd Device [1458:b001]
        Kernel driver in use: ata_piix
00:1f.3 SMBus [0c05]: Intel Corporation NM10/ICH7 Family SMBus Controller [8086:27da] (rev 01)
        Subsystem: Gigabyte Technology Co., Ltd GA-8I945PG-RH/GA-D525TUD Mainboard [1458:5001]
01:00.0 Network controller [0280]: Qualcomm Atheros AR9462 Wireless Network Adapter [168c:0034] (rev 01)
        Subsystem: Lite-On Communications Inc Device [11ad:6631]
03:00.0 Ethernet controller [0200]: Broadcom Limited NetXtreme BCM5751 Gigabit Ethernet PCI Express [14e4:1677] (rev 11)
        Subsystem: Gigabyte Technology Co., Ltd Device [1458:e000]
        Kernel driver in use: tg3
04:00.0 Ethernet controller [0200]: Broadcom Limited NetXtreme BCM5751 Gigabit Ethernet PCI Express [14e4:1677] (rev 11)
        Subsystem: Gigabyte Technology Co., Ltd Device [1458:e000]
        Kernel driver in use: tg3
05:00.0 VGA compatible controller [0300]: Matrox Electronics Systems Ltd. MGA 2064W [Millennium] [102b:0519] (rev 01)

Dmesg on Pastebin here (due to the message body limit).

I'll be glad to know what to search for in the dmesg.

Anyway thanks for your help, my experience levels up every your answer :wink:

This PCI ID is guarded by the ATH9K_SUPPORT_PCOEM config symbol, which is not enabled by default (in order to trim down ath9k module size for non-x86 devices). You will have to rebuild OpenWrt with it enabled - and it probably makes sense to enable it by default for the various x86 subtargets.

OK, this definitely belongs to the sort of business that I call a service man for :man_mechanic:.
But thanks anyway, I'll try to do my best and return back after several attempts to solve it :wink:.

OK, maybe I need a slight help (maybe slightly more robust help).
Please, what should I do to build an i386 OpenWRT that is exactly the same as actual 18.06.2 with the only difference that I will have the ATH9K_SUPPORT_PCOEM enabled? I was already able to install some linux (namely CentOS 7 x86_64), install necessary tools for compiling the whole thing on my own, downloaded those things like git clone https://git.openwrt.org/openwrt/openwrt.git/ and compile something successfully, that was after applying the image to my PC able to boot… but opkg downloaded packages from something like downloads.openwrt.org/snapshots/packages/i386_pentium4/… (i don't remember exactly). And of course the ath9k did not make any difference, maybe because I choose <*> instead of <M> in menuconfig (or vice versa, again I don't remember exactly). What I understand is that I created something „newer“ than 18.06.2, which I do not want to. I want exactly the same thing as is 18.06.2 when I download the image, with all default packages and ability to download from actual repository using opkg, with the only one difference in ath9k module. I think it can not be too difficult when I already passed my first compiling (to be honest: I've never done something like this before :slight_smile:).
Thanks very much.

git checkout v18.06.2

I would suggest build the ath9k kmods as modules and install them over what is otherwise a release install. You may need to force-install them since the kernel hash does not match. But the kernel version number should match exactly.'

I don't know if this is the case here but some device drivers can be forced to attach to unlisted hardware by adding the PCI or USB vendor:product to the insmod as a parameter.

The general advice would be not spending too much thought on trying to achieve an identical clone (down to matching the kernel hash), but simply to use the tagged source and including whatever you need directly into the image.

1 Like

Ahh, thanks, tagged was the key word I didn't know until now. I'll try and report back when any result achieved :slight_smile:.

Holy crab, it works! :astonished: :sparkler:

<M> kmod-ath9k.................... Atheros 802.11n PCI wireless cards support
[*]   Support chips used in PC OEM cards

After a compiling, applying image and installing the ath9k kernel module from my compiled Packages source, the iw list is showing very promissing data :sunglasses: .

root@OpenWrt:~# iw list
Wiphy phy0
        max # scan SSIDs: 4
        max scan IEs length: 2257 bytes
        max # sched scan SSIDs: 0
        max # match sets: 0
        max # scan plans: 1
        max scan plan interval: -1
        max scan plan iterations: 0
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Device supports AP-side u-APSD.
        Device supports T-DLS.
        Available Antennas: TX 0x3 RX 0x3
        Configured Antennas: TX 0x3 RX 0x3
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * mesh point
                 * P2P-client
                 * P2P-GO
                 * outside context of a BSS
        Band 1:
                Capabilities: 0x11ef
                        RX LDPC
                        HT20/HT40
                        SM Power Save disabled
                        RX HT20 SGI
                        RX HT40 SGI
                        TX STBC
                        RX STBC 1-stream
                        Max AMSDU length: 3839 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 8 usec (0x06)
                HT TX/RX MCS rate indexes supported: 0-15
                Frequencies:
                        * 2412 MHz [1] (20.0 dBm)
                        * 2417 MHz [2] (20.0 dBm)
                        * 2422 MHz [3] (20.0 dBm)
                        * 2427 MHz [4] (20.0 dBm)
                        * 2432 MHz [5] (20.0 dBm)
                        * 2437 MHz [6] (20.0 dBm)
                        * 2442 MHz [7] (20.0 dBm)
                        * 2447 MHz [8] (20.0 dBm)
                        * 2452 MHz [9] (20.0 dBm)
                        * 2457 MHz [10] (20.0 dBm)
                        * 2462 MHz [11] (20.0 dBm)
                        * 2467 MHz [12] (20.0 dBm) (no IR)
                        * 2472 MHz [13] (20.0 dBm) (no IR)
                        * 2484 MHz [14] (20.0 dBm) (no IR)
        Band 2:
                Capabilities: 0x11ef
                        RX LDPC
                        HT20/HT40
                        SM Power Save disabled
                        RX HT20 SGI
                        RX HT40 SGI
                        TX STBC
                        RX STBC 1-stream
                        Max AMSDU length: 3839 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 8 usec (0x06)
                HT TX/RX MCS rate indexes supported: 0-15
                Frequencies:
                        * 5180 MHz [36] (18.0 dBm)
                        * 5200 MHz [40] (18.0 dBm)
                        * 5220 MHz [44] (18.0 dBm)
                        * 5240 MHz [48] (18.0 dBm)
                        * 5260 MHz [52] (18.0 dBm) (no IR, radar detection)
                        * 5280 MHz [56] (18.0 dBm) (no IR, radar detection)
                        * 5300 MHz [60] (18.0 dBm) (no IR, radar detection)
                        * 5320 MHz [64] (18.0 dBm) (no IR, radar detection)
                        * 5500 MHz [100] (18.0 dBm) (no IR, radar detection)
                        * 5520 MHz [104] (18.0 dBm) (no IR, radar detection)
                        * 5540 MHz [108] (18.0 dBm) (no IR, radar detection)
                        * 5560 MHz [112] (18.0 dBm) (no IR, radar detection)
                        * 5580 MHz [116] (18.0 dBm) (no IR, radar detection)
                        * 5600 MHz [120] (18.0 dBm) (no IR, radar detection)
                        * 5620 MHz [124] (18.0 dBm) (no IR, radar detection)
                        * 5640 MHz [128] (18.0 dBm) (no IR, radar detection)
                        * 5660 MHz [132] (18.0 dBm) (no IR, radar detection)
                        * 5680 MHz [136] (18.0 dBm) (no IR, radar detection)
                        * 5700 MHz [140] (18.0 dBm) (no IR, radar detection)
                        * 5745 MHz [149] (18.0 dBm) (no IR)
                        * 5765 MHz [153] (18.0 dBm) (no IR)
                        * 5785 MHz [157] (18.0 dBm) (no IR)
                        * 5805 MHz [161] (18.0 dBm) (no IR)
                        * 5825 MHz [165] (18.0 dBm) (no IR)
        valid interface combinations:
                 * #{ managed } <= 2048, #{ AP, mesh point } <= 8, #{ P2P-client, P2P-GO } <= 1, #{ IBSS } <= 1,
                   total <= 2048, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz }

        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing
01:00.0 Network controller [0280]: Qualcomm Atheros AR9462 Wireless Network Adapter [168c:0034] (rev 01)
        Subsystem: Lite-On Communications Inc Device [11ad:6631]
        Kernel driver in use: ath9k

Thanks to all. BTW - is there a possibility someone would manage to include those chips in PC OEM cards into the module by default into x86 images in future releases?

@WIFT If your problem is solved, please consider marking this topic as [Solved]. (Click the pencil behind the topic...)

1 Like

You mean just edit the topic like it is now? Or is there any other indication of solved problem? (I'm not really used to use those things, sorry).

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.