From owner-svn-src-head@freebsd.org Sun Jun 5 07:59:25 2016 Return-Path: Delivered-To: svn-src-head@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 6EFF7B6A052; Sun, 5 Jun 2016 07:59:25 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B0A410F2; Sun, 5 Jun 2016 07:59:25 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x241.google.com with SMTP id l9so15766983ioe.1; Sun, 05 Jun 2016 00:59:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=sx02eMG9VOcNCr01f7fXLardfvUY00yrJlhMPLBP+h4=; b=F+E9FbrpCjTKDLTAqXPafB45yrfS5rea6z8qSJdYvgvtuyGUCYWzyACukpdpt3ydM+ DgPBcuG/jQ8SuAfdCWQ0lMlITuvbapcFTfakSdA9ylcesxobXp2PKfpd/aga579PLCn7 zeq7EEDk3khQk7nWmb64M5DEzwNIF6lC575A5ZB2Yf6y0SI2o5yn38/chM1kbWW0+y8d G3N6LeeZSCU89mVL3FDoQjCNFpZZiE2sNsJ8Z0BBfA6gcwfMK2MI+f18rQTfopE8exr0 SiehnKDN/NKFeP2ZRQ0jYA5+P5tnxTAOXlk3ee8UCnStC4shh4QTaE16Etgj3VgAOxDF HaZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=sx02eMG9VOcNCr01f7fXLardfvUY00yrJlhMPLBP+h4=; b=Qe8QudLP9Rt5phxDlHYy+blmmVf19fgcSVlqbfH2pV8Mga6/25QEs+W3KOZHNJKJT1 Nvd2m0APCplNQmA2/DUN/jteo4UiOZmWj1o4zcqbrSs+XeXqMCuTrvAyW+BdMwh5IOKi P2i6LZC6rP+Je2KSP4h5fhSnUXusWijWijGbcLgBYtmgkyQI65jAOs/Ge7734C+PtwjM 75Qa1sbzQ9scoNmojd9HQhRcinylHL2V6om/f/QtP87+5ANn+qp7XIcXhiNxrzEfEFzu PvaIoBDi2iV9oJgxttclcaePmjxKQrt5Ugvj0Blf26J0/zBrcgp7XK+dN+YeO2GhA3qc vYlw== X-Gm-Message-State: ALyK8tJQF/Ogivw/TC5G72dwppB+l5h5ZEM/6KdCRP7lxXrQEfDPTUQDoLiZshdHRlpdwhrKzbHaZYYwQfAFOg== X-Received: by 10.107.144.67 with SMTP id s64mr13825640iod.165.1465113564586; Sun, 05 Jun 2016 00:59:24 -0700 (PDT) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.36.113.3 with HTTP; Sun, 5 Jun 2016 00:59:23 -0700 (PDT) In-Reply-To: <201606050755.u557tL6s081534@repo.freebsd.org> References: <201606050755.u557tL6s081534@repo.freebsd.org> From: Adrian Chadd Date: Sun, 5 Jun 2016 00:59:23 -0700 X-Google-Sender-Auth: RsQHV1FZNumbMB5GBNN0JCHkfvc Message-ID: Subject: Re: svn commit: r301434 - head/sys/dev/bwn To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jun 2016 07:59:25 -0000 note: this works on RX only; TX seems to fail right now and I'm not yet sure why. I'll dig into it. Thanks, -adrian On 5 June 2016 at 00:55, Adrian Chadd wrote: > Author: adrian > Date: Sun Jun 5 07:55:21 2016 > New Revision: 301434 > URL: https://svnweb.freebsd.org/changeset/base/301434 > > Log: > [bwn] Enable PHY-LP 5GHz support for the one NIC I have tested it on so far. > > After perusing the PHY-LP code (don't ask why; honest) I discovered that > it /has/ 5GHz support - but it's not ever used. I found one NIC - a > BCM4312 w/ pci id 0x4315 - which advertised dual-band PHY-LP support. > > Turns out it works. > > Whilst here, move up the support bit logging code so I can use it > to debug this. > > Tested: > > * BCM4312 (pci id 0x4315); 5GHz STA operation > > Modified: > head/sys/dev/bwn/if_bwn.c > > Modified: head/sys/dev/bwn/if_bwn.c > ============================================================================== > --- head/sys/dev/bwn/if_bwn.c Sun Jun 5 07:51:36 2016 (r301433) > +++ head/sys/dev/bwn/if_bwn.c Sun Jun 5 07:55:21 2016 (r301434) > @@ -1163,6 +1163,16 @@ bwn_attach_core(struct bwn_mac *mac) > have_bg = 1; > have_a = 1; > } > +#if 0 > + device_printf(sc->sc_dev, "%s: high=0x%08x, have_a=%d, have_bg=%d," > + " deviceid=0x%04x, siba_deviceid=0x%04x\n", > + __func__, > + high, > + have_a, > + have_bg, > + siba_get_pci_device(sc->sc_dev), > + siba_get_chipid(sc->sc_dev)); > +#endif > } else { > device_printf(sc->sc_dev, "%s: not siba; bailing\n", __func__); > error = ENXIO; > @@ -1183,18 +1193,12 @@ bwn_attach_core(struct bwn_mac *mac) > if (error) > goto fail; > > -#if 0 > - device_printf(sc->sc_dev, "%s: high=0x%08x, have_a=%d, have_bg=%d," > - " deviceid=0x%04x, siba_deviceid=0x%04x\n", > - __func__, > - high, > - have_a, > - have_bg, > - siba_get_pci_device(sc->sc_dev), > - siba_get_chipid(sc->sc_dev)); > -#endif > - > + /* > + * This is the whitelist of devices which we "believe" > + * the SPROM PHY config from. The rest are "guessed". > + */ > if (siba_get_pci_device(sc->sc_dev) != 0x4312 && > + siba_get_pci_device(sc->sc_dev) != 0x4315 && > siba_get_pci_device(sc->sc_dev) != 0x4319 && > siba_get_pci_device(sc->sc_dev) != 0x4324 && > siba_get_pci_device(sc->sc_dev) != 0x4328 && >