commit 5559d6c12b928fd46d444911a4695989f0419dac Author: Jiri Slaby Date: Sat Jun 23 15:06:57 2007 +0200 remove ath_rate_setup diff --git a/ath/if_ath_pci.c b/ath/if_ath_pci.c index 3c789bf..1246b12 100644 --- a/ath/if_ath_pci.c +++ b/ath/if_ath_pci.c @@ -428,54 +428,6 @@ err: return ret; } #if 0 -static int ath_rate_setup(struct ieee80211_hw *dev, u_int mode) -{ - struct ath_softc *sc = dev->priv; - struct ath_hw *ah = sc->ah; - const struct ath5k_rate_table *rt; -// struct ieee80211_rateset *rs; -// int i, maxrates; - - switch (mode) { - case MODE_IEEE80211A: - sc->sc_rates[mode] = ath5k_hw_get_rate_table(ah, AR5K_MODE_11A); - break; - case MODE_IEEE80211B: - sc->sc_rates[mode] = ath5k_hw_get_rate_table(ah, AR5K_MODE_11B); - break; - case MODE_IEEE80211G: - sc->sc_rates[mode] = ath5k_hw_get_rate_table(ah, AR5K_MODE_11G); - break; - case MODE_ATHEROS_TURBO: - sc->sc_rates[mode] = ath5k_hw_get_rate_table(ah, AR5K_MODE_TURBO); - break; - case MODE_ATHEROS_TURBOG: - sc->sc_rates[mode] = ath5k_hw_get_rate_table(ah, AR5K_MODE_108G); - break; - default: - DPRINTF(sc, ATH_DEBUG_ANY, "%s: invalid mode %u\n", - __func__, mode); - return 0; - } - rt = sc->sc_rates[mode]; - if (rt == NULL) - return 0; -#ifdef BLE - if (rt->rate_count > IEEE80211_RATE_MAXSIZE) { - DPRINTF(sc, ATH_DEBUG_ANY, - "%s: rate table too small (%u > %u)\n", - __func__, rt->rate_count, IEEE80211_RATE_MAXSIZE); - maxrates = IEEE80211_RATE_MAXSIZE; - } else - maxrates = rt->rate_count; - rs = &ic->ic_sup_rates[mode]; - for (i = 0; i < maxrates; i++) - rs->rs_rates[i] = rt->rates[i].dot11_rate; - rs->rs_nrates = maxrates; -#endif - return 1; -} - static void ath_setcurmode(struct ath_softc *sc, unsigned int mode) { /* NB: on/off times from the Atheros NDIS driver, w/ permission */ @@ -679,14 +631,6 @@ static int ath_attach(struct pci_dev *pdev, struct ieee80211_hw *hw) goto err; } #ifdef BLE - /* - * Setup rate tables for all potential media types. - */ - ath_rate_setup(hw, MODE_IEEE80211A); - ath_rate_setup(hw, MODE_IEEE80211B); - ath_rate_setup(hw, MODE_IEEE80211G); - ath_rate_setup(hw, MODE_ATHEROS_TURBO); - ath_rate_setup(hw, MODE_ATHEROS_TURBOG); /* NB: setup here so ath_rate_update is happy */ ath_setcurmode(sc, MODE_IEEE80211A);