From 2a81b09ebe4ace48578ac3a52ce13245e90bc645 Mon Sep 17 00:00:00 2001 From: Sujith Manoharan Date: Mon, 21 Jul 2008 21:26:08 -0800 Subject: [PATCH] Use ath9k_hw_set11nmac2040 directly instead of ath_set_macmode Remove cwm_rate_updateallnodes, cwm_action_mac_change_chwidth. Signed-off-by: Sujith --- drivers/net/wireless/ath9k/core.c | 5 ---- drivers/net/wireless/ath9k/core.h | 1 - drivers/net/wireless/ath9k/main.c | 61 +---------------------------------------------------------- 3 files changed, 1 insertions(+), 66 deletions(-) diff --git a/drivers/net/wireless/ath9k/core.c b/drivers/net/wireless/ath9k/core.c index a0810ac..2fd5244 100644 --- a/drivers/net/wireless/ath9k/core.c +++ b/drivers/net/wireless/ath9k/core.c @@ -1335,11 +1335,6 @@ static void ath9k_tasklet(unsigned long data) ath9k_hw_set_interrupts(sc->sc_ah, sc->sc_imask); } -void ath_set_macmode(struct ath_softc *sc, enum hal_ht_macmode macmode) -{ - ath9k_hw_set11nmac2040(sc->sc_ah, macmode); -} - int ath_init(u_int16_t devid, struct ath_softc *sc) { struct ath_hal *ah = NULL; diff --git a/drivers/net/wireless/ath9k/core.h b/drivers/net/wireless/ath9k/core.h index 9348107..d6d1b4f 100644 --- a/drivers/net/wireless/ath9k/core.h +++ b/drivers/net/wireless/ath9k/core.h @@ -1202,7 +1202,6 @@ void ath_setup_rate(struct ath_softc *sc, /* Utility Functions */ /*********************/ -void ath_set_macmode(struct ath_softc *sc, enum hal_ht_macmode macmode); void ath_key_reset(struct ath_softc *sc, u_int16_t keyix, int freeslot); int ath_keyset(struct ath_softc *sc, u_int16_t keyix, diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 670a516..30f83c9 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c @@ -279,65 +279,6 @@ static void ath9k_rx_prepare(struct ath_softc *sc, rx_status->flag |= RX_FLAG_TSFT; } -/* - * Update all associated nodes and VAPs - * - * Called when local channel width changed. e.g. if AP mode, - * update all associated STAs when the AP's channel width changes. - */ -static void cwm_rate_updateallnodes(struct ath_softc *sc) -{ - int flags = 0, error; - struct ieee80211_vif *vif; - enum ieee80211_if_types opmode; - struct ieee80211_hw *hw = sc->hw; - - if (sc->sc_vaps[0]) { - vif = sc->sc_vaps[0]->av_if_data; - opmode = vif->type; - switch (opmode) { - case IEEE80211_IF_TYPE_STA: - /* sync with next received beacon */ - flags |= ATH_IF_BEACON_SYNC; - if (hw->conf.ht_conf.ht_supported) - flags |= ATH_IF_HT; - error = ath_vap_up(sc, 0, - /* sc->sc_vaps[i]->av_btxctl->if_id, FIX ME if_id */ - /* sc->sc_vaps[i]->bssid, FIX ME bssid */ - sc->sc_curbssid, - sc->sc_curaid, - flags); - if (error)/* FIX ME if_id */ - DPRINTF(sc, ATH_DEBUG_CWM, - "%s: Unable to up vap: " - "%d\n", __func__, 0); - else - DPRINTF(sc, ATH_DEBUG_CWM, - "%s: VAP up for id: " - "%d\n", __func__, 0); - break; - case IEEE80211_IF_TYPE_IBSS: - case IEEE80211_IF_TYPE_AP: - /* FIXME */ - break; - default: - break; - } - } -} - -/* Action: switch MAC from 40 to 20 (OR) 20 to 40 based on ch_width arg */ -static void cwm_action_mac_change_chwidth(struct ath_softc *sc, - enum hal_ht_macmode ch_width) -{ - ath_set_macmode(sc, ch_width); - - /* notify rate control of new mode (select new rate table) */ - cwm_rate_updateallnodes(sc); - - /* XXX: all virtual APs - send ch width action management frame */ -} - static u_int8_t parse_mpdudensity(u_int8_t mpdudensity) { /* @@ -741,7 +682,7 @@ static void ath9k_ht_conf(struct ath_softc *sc, else ht_info->tx_chan_width = HAL_HT_MACMODE_20; - cwm_action_mac_change_chwidth(sc, ht_info->tx_chan_width); + ath9k_hw_set11nmac2040(sc->sc_ah, ht_info->tx_chan_width); ht_info->maxampdu = 1 << (IEEE80211_HTCAP_MAXRXAMPDU_FACTOR + bss_conf->ht_conf->ampdu_factor); ht_info->mpdudensity = -- 1.5.4.3