From owner-svn-src-head@freebsd.org Mon May 23 04:17:28 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 BA410B44C72; Mon, 23 May 2016 04:17:28 +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 8C67416A2; Mon, 23 May 2016 04:17:28 +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 u4N4HRoL065936; Mon, 23 May 2016 04:17:27 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4N4HRKl065935; Mon, 23 May 2016 04:17:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201605230417.u4N4HRKl065935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 23 May 2016 04:17:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300448 - head/sys/gnu/dev/bwn/phy_n 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: Mon, 23 May 2016 04:17:28 -0000 Author: adrian Date: Mon May 23 04:17:27 2016 New Revision: 300448 URL: https://svnweb.freebsd.org/changeset/base/300448 Log: [bwn] convert another PHY-N workaround to the freebsd bwn format. These were hidden behind an #ifdef that we weren't setting. I don't have the hardware in question to check. Modified: head/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_core.c Modified: head/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_core.c ============================================================================== --- head/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_core.c Mon May 23 04:07:41 2016 (r300447) +++ head/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_core.c Mon May 23 04:17:27 2016 (r300448) @@ -6635,16 +6635,12 @@ bwn_nphy_op_prepare_structs(struct bwn_m if (mac->mac_phy.rev >= 2 && (siba_sprom_get_bf2_lo(sc->sc_dev) & BWN_BFL2_TXPWRCTRL_EN)) { nphy->txpwrctrl = true; -#ifdef CONFIG_BWN_SSB - if (dev->dev->bus_type == BWN_BUS_SSB && - dev->dev->sdev->bus->bustype == SSB_BUSTYPE_PCI) { - struct pci_dev *pdev = - dev->dev->sdev->bus->host_pci; - if (pdev->device == 0x4328 || - pdev->device == 0x432a) + if (bwn_is_bus_siba(mac) && + (siba_get_type(sc->sc_dev) == SIBA_TYPE_PCI)) { + if ((siba_get_pci_device(sc->sc_dev) == 0x4328) || + (siba_get_pci_device(sc->sc_dev) == 0x432a)) nphy->pwg_gain_5ghz = true; } -#endif } else if (siba_sprom_get_bf2_lo(sc->sc_dev) & BWN_BFL2_5G_PWRGAIN) { nphy->pwg_gain_5ghz = true; }