From 656b83311aa9855f22d671ff1d7cf4d0dba1808f Mon Sep 17 00:00:00 2001 From: Sujith Date: Tue, 18 Nov 2008 09:04:00 +0530 Subject: [PATCH] --- yaml --- r: 122303 b: refs/heads/master c: 7b4d27357aebfdaa039f365fd24f2a795af5c0bb h: refs/heads/master i: 122301: d87ad323b5e1f307955e7ecb678efd7e313fe9b9 122299: 65459103697708c14b00e56d40ccd53142c52018 122295: 11f923392269d1e1128ed45090e183c038c64e57 122287: ea870299c792dc37785db248d9f4a0d152e56313 122271: 3d9cb0dd38b532461fa05ac2d9897b096dec5493 122239: d88f660716b785f96518cf6fe8ea4e6d8486b126 v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/ath9k/rc.c | 36 ++++++++------------------- 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/[refs] b/[refs] index 0e9be2225e55..4a48a8cf35d9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fe60594a76d04b4fdea597bf93e4186a03d8d60c +refs/heads/master: 7b4d27357aebfdaa039f365fd24f2a795af5c0bb diff --git a/trunk/drivers/net/wireless/ath9k/rc.c b/trunk/drivers/net/wireless/ath9k/rc.c index 09d622ab313c..798dff6f6015 100644 --- a/trunk/drivers/net/wireless/ath9k/rc.c +++ b/trunk/drivers/net/wireless/ath9k/rc.c @@ -1755,26 +1755,6 @@ static int ath_rate_newassoc(struct ath_softc *sc, return 0; } -static void ath_setup_rates(struct ath_softc *sc, - struct ieee80211_supported_band *sband, - struct ieee80211_sta *sta, - struct ath_rate_node *rc_priv) - -{ - int i, j = 0; - - DPRINTF(sc, ATH_DBG_RATE, "%s\n", __func__); - - for (i = 0; i < sband->n_bitrates; i++) { - if (sta->supp_rates[sband->band] & BIT(i)) { - rc_priv->neg_rates.rs_rates[j] - = (sband->bitrates[i].bitrate * 2) / 10; - j++; - } - } - rc_priv->neg_rates.rs_nrates = j; -} - void ath_rc_node_update(struct ieee80211_hw *hw, struct ath_rate_node *rc_priv) { struct ath_softc *sc = hw->priv; @@ -1895,11 +1875,17 @@ static void ath_rate_init(void *priv, struct ieee80211_supported_band *sband, struct ath_rate_node *ath_rc_priv = priv_sta; int i, j = 0; - DPRINTF(sc, ATH_DBG_RATE, "%s\n", __func__); + for (i = 0; i < sband->n_bitrates; i++) { + if (sta->supp_rates[sband->band] & BIT(i)) { + ath_rc_priv->neg_rates.rs_rates[j] + = (sband->bitrates[i].bitrate * 2) / 10; + j++; + } + } + ath_rc_priv->neg_rates.rs_nrates = j; - ath_setup_rates(sc, sband, sta, ath_rc_priv); if (sta->ht_cap.ht_supported) { - for (i = 0; i < 77; i++) { + for (i = 0, j = 0; i < 77; i++) { if (sta->ht_cap.mcs.rx_mask[i/8] & (1<<(i%8))) ath_rc_priv->neg_ht_rates.rs_rates[j++] = i; if (j == ATH_RATE_MAX) @@ -1907,14 +1893,12 @@ static void ath_rate_init(void *priv, struct ieee80211_supported_band *sband, } ath_rc_priv->neg_ht_rates.rs_nrates = j; } + ath_rc_node_update(sc->hw, priv_sta); } static void *ath_rate_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir) { - struct ath_softc *sc = hw->priv; - - DPRINTF(sc, ATH_DBG_RATE, "%s\n", __func__); return hw->priv; }