Initialise the chainmask fields regardless of whether 11n support

is compiled in or not.

This fixes issues with people running -HEAD but who build modules
without doing a "make buildkernel KERNCONF=XXX", thus picking up
opt_*.h.  The resulting module wouldn't have 11n enabled and the
chainmask configuration would just be plain wrong.
This commit is contained in:
Adrian Chadd 2013-04-19 21:49:11 +00:00
parent 2579e2d715
commit ff5b563430

View File

@ -720,6 +720,14 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
(void) ath_hal_settxchainmask(sc->sc_ah, tx_chainmask);
}
/*
* Query the TX/RX chainmask configuration.
*
* This is only relevant for 11n devices.
*/
ath_hal_getrxchainmask(ah, &sc->sc_rxchainmask);
ath_hal_gettxchainmask(ah, &sc->sc_txchainmask);
/*
* Disable MRR with protected frames by default.
* Only 802.11n series NICs can handle this.
@ -777,14 +785,6 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
*/
(void) ath_hal_getcapability(ah, HAL_CAP_STREAMS, 0, &txs);
(void) ath_hal_getcapability(ah, HAL_CAP_STREAMS, 1, &rxs);
ath_hal_getrxchainmask(ah, &sc->sc_rxchainmask);
ath_hal_gettxchainmask(ah, &sc->sc_txchainmask);
device_printf(sc->sc_dev, "Chainmasks: TX=0x%x; RX=0x%x\n",
sc->sc_txchainmask,
sc->sc_rxchainmask);
ic->ic_txstream = txs;
ic->ic_rxstream = rxs;