From f3ad4664e97b37427ce9d2aa611fc640a4935121 Mon Sep 17 00:00:00 2001 From: Sujith Manoharan Date: Mon, 21 Jul 2008 21:26:23 -0800 Subject: [PATCH] move chainmask selection to ath_vap_up() HT capabilities of the BSS we are joining is not known until association is complete, so move chainmask selection to ath_vap_up(). Signed-off-by: Sujith --- drivers/net/wireless/ath9k/core.c | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/net/wireless/ath9k/core.c b/drivers/net/wireless/ath9k/core.c index 2fd5244..1eadb1f 100644 --- a/drivers/net/wireless/ath9k/core.c +++ b/drivers/net/wireless/ath9k/core.c @@ -678,20 +678,6 @@ int ath_vap_join(struct ath_softc *sc, int if_id, __func__, rfilt, print_mac(mac, sc->sc_curbssid), sc->sc_curaid); - /* - * Update tx/rx chainmask. For legacy association, - * hard code chainmask to 1x1, for 11n association, use - * the chainmask configuration. - */ - sc->sc_update_chainmask = 1; - if (flags & ATH_IF_HT) { - sc->sc_tx_chainmask = ah->ah_caps.halTxChainMask; - sc->sc_rx_chainmask = ah->ah_caps.halRxChainMask; - } else { - sc->sc_tx_chainmask = 1; - sc->sc_rx_chainmask = 1; - } - /* Enable rx chain mask detection if configured to do so */ sc->sc_rx_chainmask_detect = 0; @@ -823,6 +809,20 @@ int ath_vap_up(struct ath_softc *sc, sc->sc_halstats.ns_avgtxrssi = ATH_RSSI_DUMMY_MARKER; sc->sc_halstats.ns_avgtxrate = ATH_RATE_DUMMY_MARKER; } + + /* + * Update tx/rx chainmask. For legacy association, + * hard code chainmask to 1x1, for 11n association, use + * the chainmask configuration. + */ + sc->sc_update_chainmask = 1; + if (flags & ATH_IF_HT) { + sc->sc_tx_chainmask = ah->ah_caps.halTxChainMask; + sc->sc_rx_chainmask = ah->ah_caps.halRxChainMask; + } else { + sc->sc_tx_chainmask = 1; + sc->sc_rx_chainmask = 1; + } bad: return error; } -- 1.5.4.3