From owner-freebsd-wireless@freebsd.org Mon Jun 12 20:19:47 2017 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FB6EC7713E for ; Mon, 12 Jun 2017 20:19:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8369B7D147 for ; Mon, 12 Jun 2017 20:19:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v5CKJkTa016594 for ; Mon, 12 Jun 2017 20:19:47 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-wireless@FreeBSD.org Subject: [Bug 194336] AR9300 pci wireless card not working Date: Mon, 12 Jun 2017 20:19:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: wireless X-Bugzilla-Version: 10.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: eli@egwynn.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-wireless@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jun 2017 20:19:47 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D194336 Eli Gwynn changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eli@egwynn.com --- Comment #27 from Eli Gwynn --- I have zero experience with wlan drivers, but this thread was the key to ma= king my hardware work, so I figured I'd add my own details here in case they are helpful to someone else. My use case involves the wlan device in hostap mode bridged with my wired nic to expand the wifi coverage in my house. --- My Hardware Rosewill RNWD-N9003PCE (Ver 1.0) - WikiDevi: https://wikidevi.com/wiki/Rosewill_N900PCE - Amazon: https://www.amazon.com/gp/product/B009VKON0S FWIW, I live in the US and didn't have any inclination that I might end up = with a non-US device. The only hint that my device might be non-US (Canadian?) is that some of the packaging is doubled up in French. --- pciconf ath0@pci0:2:0:0: class=3D0x028000 card=3D0x3112168c chip=3D0x0030168= c rev=3D0x01 hdr=3D0x00 vendor =3D 'Qualcomm Atheros' device =3D 'AR93xx Wireless Network Adapter' class =3D network --- dmesg (pre-patch) Jun 11 09:51:02 zfs kernel: pcib2: irq 17 at device 2= 8.5 on pci0 Jun 11 09:51:02 zfs kernel: pci2: on pcib2 Jun 11 09:51:02 zfs kernel: ath0: mem 0xdf100000-0xdf11ffff irq 17 at device 0.0 on pci2 Jun 11 09:51:02 zfs kernel: ar9300_attach: calling ar9300_hw_attach Jun 11 09:51:02 zfs kernel: ar9300_hw_attach: calling ar9300_eeprom_attach Jun 11 09:51:02 zfs kernel: ar9300_flash_map: unimplemented for now Jun 11 09:51:02 zfs kernel: Restoring Cal data from DRAM Jun 11 09:51:02 zfs kernel: Restoring Cal data from EEPROM Jun 11 09:51:02 zfs kernel: ar9300_hw_attach: ar9300_eeprom_attach returned= 0 Jun 11 09:51:02 zfs kernel: ath0: ath_getchannels: unable to collect channel list from hal, status 12 Jun 11 09:51:02 zfs kernel: device_attach: ath0 attach returned 22 --- Steps I took 1. I ran `make buildworld` in order to get my build tools back in sync with= my sources 2. I added `options AH_DEBUG` to my kernel's conf 3. I ran `make buildkernel`, `make installkernel`, and rebooted 4. I ran `sysctl hw.ath.hal.debug=3D1` 5. I used `devctl detach pci2` and `devctl attach pci2` to trigger the malfunction again 6. I observed that my device was also showing up as > Jun 12 14:53:41 zfs kernel: isEepromValid: invalid regulatory domain/coun= try code 0x14 7. I applied both of Jung-uk Kim's attached patches (https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D165875&action=3Ddiff= and https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D165880&action=3Ddiff) 8. I ran `make buildkernel` and `make installkernel` again 9. I rebooted and then my card worked --- PS Are the solutions presented in this thread good enough to make it into the mainline driver? I'd hate to have to do this again when next I do a freebsd-update. Thanks to everyone for all the good work! --=20 You are receiving this mail because: You are the assignee for the bug.=