From owner-freebsd-wireless@FreeBSD.ORG Mon Dec 22 22:57:54 2014 Return-Path: Delivered-To: wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CB0FA94 for ; Mon, 22 Dec 2014 22:57:54 +0000 (UTC) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A454645CF for ; Mon, 22 Dec 2014 22:57:54 +0000 (UTC) Received: by mail-wi0-f177.google.com with SMTP id l15so9298802wiw.16 for ; Mon, 22 Dec 2014 14:57:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=5dGdd/H9C+Z7+Vy5NrtbnihW1F635C1HqCnirrnsd7g=; b=xzBXiaHi6DgghkmjaIKhwEq5kGVM6luvljFO5P/ppAzwo1vMhHBLrHzwiy00qnPNeT /DrZ7ktK+GhbNtAVg0OGPpUf55Y818nwHHo0eNfJDeTTBKM7A6lt/KXykURlZIWTLrAv 3GVQUNZyxVR3IKpm6i/qrVwhSumd2HXorPOf5a6yn8cPEbcTdYJA5eEW939Wds85XvfY 3Ara5QIjoleUPlthJiB9a2y1ysqWOHu0a5B6K7/dHrl36IaKdaMTATrBQW2gMwncrT66 9AuPXZ+FtlLhc5sFJXvzhkrmuB5gM5DFm7LoixH+QT4nGVlwHWt3pVn1NtiVrTlcsnzY ZWUA== MIME-Version: 1.0 X-Received: by 10.180.80.163 with SMTP id s3mr34617852wix.59.1419289072450; Mon, 22 Dec 2014 14:57:52 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.195 with HTTP; Mon, 22 Dec 2014 14:57:52 -0800 (PST) In-Reply-To: <5498944C.4040706@yahoo.com> References: <433678684.160603.1419257025708.JavaMail.yahoo@jws10658.mail.bf1.yahoo.com> <54987366.6060803@yahoo.com> <5498780B.90704@yahoo.com> <5498944C.4040706@yahoo.com> Date: Mon, 22 Dec 2014 14:57:52 -0800 X-Google-Sender-Auth: cg_eOr3KKN2JgrM0pZLDyrlmyoU Message-ID: Subject: Re: Atheros AR9565 detected, not working From: Adrian Chadd To: Anthony Jenkins Content-Type: text/plain; charset=UTF-8 Cc: "wireless@freebsd.org" X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.18-1 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, 22 Dec 2014 22:57:54 -0000 On 22 December 2014 at 13:59, Anthony Jenkins wrote: > On 12/22/2014 15:22, Adrian Chadd wrote: >> On 22 December 2014 at 11:59, Anthony Jenkins wrote: >>> I'll have to re-add the printf()s, but I'm pretty sure I saw 0x0B (of course it could have been 0x08 I saw, but neither of those would make it through the function - both 0x0B and 0x08 are blocked). >> Please do. I'd like to fix up the HAL and driver to use the EEPROM >> provided LED and RFKILL GPIO fields if they're populated and valid. > Here's the chunk of boot messages for ath(4) on my laptop; it was 0x0B as I originally thought: > > Dec 22 16:47:59 ajenkins-hplaptop kernel: pcib2: allocated memory range (0xf0100000-0xf017ffff) for rid 10 of pci0:2:0:0 > Dec 22 16:47:59 ajenkins-hplaptop kernel: pcib2: matched entry for 2.0.INTA > Dec 22 16:47:59 ajenkins-hplaptop kernel: pcib2: slot 0 INTA hardwired to IRQ 17 > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: mem 0xf0100000-0xf017ffff irq 17 at device 0.0 on pci2 > Dec 22 16:47:59 ajenkins-hplaptop kernel: ioapic0: routing intpin 17 (PCI IRQ 17) to lapic 16 vector 53 > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: WB335 1-ANT card detected > Dec 22 16:47:59 ajenkins-hplaptop kernel: ar9300_attach: calling ar9300_hw_attach > Dec 22 16:47:59 ajenkins-hplaptop kernel: ar9300_hw_attach: calling ar9300_eeprom_attach > Dec 22 16:47:59 ajenkins-hplaptop kernel: ar9300_flash_map: unimplemented for now > Dec 22 16:47:59 ajenkins-hplaptop kernel: Restoring Cal data from DRAM > Dec 22 16:47:59 ajenkins-hplaptop kernel: Restoring Cal data from EEPROM > Dec 22 16:47:59 ajenkins-hplaptop kernel: Restoring Cal data from Flash > Dec 22 16:47:59 ajenkins-hplaptop kernel: Restoring Cal data from Flash > Dec 22 16:47:59 ajenkins-hplaptop kernel: Restoring Cal data from OTP > Dec 22 16:47:59 ajenkins-hplaptop kernel: ar9300_hw_attach: ar9300_eeprom_attach returned 0 > Dec 22 16:47:59 ajenkins-hplaptop kernel: ar9300_fill_capability_info: ah_rfsilent=0x2d > Dec 22 16:47:59 ajenkins-hplaptop kernel: ar9300_fill_capability_info: ah_gpio_select=0x0b > Dec 22 16:47:59 ajenkins-hplaptop kernel: ar9300_fill_capability_info: ah_polarity=0x00 > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: RX status length: 48 > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: RX buffer size: 4096 > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: TX descriptor length: 128 > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: TX status length: 36 > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: TX buffers per descriptor: 4 > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: ath_edma_setup_rxfifo: type=0, FIFO depth = 16 entries > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: ath_edma_setup_rxfifo: type=1, FIFO depth = 128 entries > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: [HT] enabling HT modes > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: [HT] enabling short-GI in 20MHz mode > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: [HT] 1 stream STBC receive enabled > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: [HT] 1 RX streams; 1 TX streams > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 1T1R > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 11ng MCS 20MHz > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: MCS 0-7: 6.5Mbps - 65Mbps > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 11ng MCS 20MHz SGI > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: MCS 0-7: 7Mbps - 72Mbps > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 11ng MCS 40MHz: > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: MCS 0-7: 13.5Mbps - 135Mbps > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 11ng MCS 40MHz SGI: > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: MCS 0-7: 15Mbps - 150Mbps > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: AR9565 mac 704.0 RF5110 phy 1638.6 > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 2GHz radio: 0x0000; 5GHz radio: 0x0000 > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: Use hw queue 1 for WME_AC_BE traffic > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: Use hw queue 0 for WME_AC_BK traffic > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: Use hw queue 2 for WME_AC_VI traffic > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: Use hw queue 3 for WME_AC_VO traffic > Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: Use hw queue 8 for CAB traffic > > Here's the printf()s in the code: > > /* > * Fill all software cached or static hardware state information. > * Return failure if capabilities are to come from EEPROM and > * cannot be read. > */ > HAL_BOOL > ar9300_fill_capability_info(struct ath_hal *ah) > { > ... > ahpriv->ah_rfsilent = ar9300_eeprom_get(ahp, EEP_RF_SILENT); > ath_hal_printf(ah, "%s: ah_rfsilent=0x%02x\n", __func__, ahpriv->ah_rfsilent); > if (ahpriv->ah_rfsilent & EEP_RFSILENT_ENABLED) { > ahp->ah_gpio_select = MS(ahpriv->ah_rfsilent, EEP_RFSILENT_GPIO_SEL); > ath_hal_printf(ah, "%s: ah_gpio_select=0x%02x\n", __func__, ahp->ah_gpio_select); > ahp->ah_polarity = MS(ahpriv->ah_rfsilent, EEP_RFSILENT_POLARITY); > ath_hal_printf(ah, "%s: ah_polarity=0x%02x\n", __func__, ahp->ah_polarity); > > ath_hal_enable_rfkill(ah, AH_TRUE); > ar9300_enable_rf_kill(ah); > p_cap->halRfSilentSupport = AH_TRUE; > } > Oh, man, good catch! It's coming out of a different EEPROM configuration area. Ok, let me go see what's going on. -adrian