From owner-svn-src-head@freebsd.org Sun Jun 5 07:55:22 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 EA5F4B68F3E; Sun, 5 Jun 2016 07:55:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 A25151DA8; Sun, 5 Jun 2016 07:55:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u557tLtV081535; Sun, 5 Jun 2016 07:55:21 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u557tL6s081534; Sun, 5 Jun 2016 07:55:21 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201606050755.u557tL6s081534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 5 Jun 2016 07:55:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301434 - head/sys/dev/bwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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:55:23 -0000 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 &&