aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu/dev
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2016-05-23 04:17:27 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2016-05-23 04:17:27 +0000
commit0d1a9688768825ebcff094eeb22986cda6524550 (patch)
treedc15a70bcb80ffbbee94ff676732852abb0f63fe /sys/gnu/dev
parent957fc42533398c49d6a69bdee5389d9eee013d6e (diff)
Notes
Diffstat (limited to 'sys/gnu/dev')
-rw-r--r--sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_core.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_core.c b/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_core.c
index 11695858825c..cfc3104993e6 100644
--- a/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_core.c
+++ b/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_core.c
@@ -6635,16 +6635,12 @@ bwn_nphy_op_prepare_structs(struct bwn_mac *mac)
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;
}