diff options
author | Mohammed Shafi Shajakhan <mshajakhan@atheros.com> | 2010-12-31 10:19:00 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-04 14:46:13 -0500 |
commit | 2ae79d52cdac733037490486792a53de9fb8d6b6 (patch) | |
tree | 3a1bc9416c7f62b0b04dc6a013161fa080937a66 /drivers/net/wireless/ath | |
parent | 707e634326448190bfe2d937c44ec05c8dea63c4 (diff) |
ath9k : few rate control clean ups
Remove some obvious looking dead code and rename few functions
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.h | 3 |
2 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 896d12986b1e..e45147820eae 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
@@ -400,7 +400,7 @@ static void ath_rc_sort_validrates(const struct ath_rate_table *rate_table, | |||
400 | } | 400 | } |
401 | } | 401 | } |
402 | 402 | ||
403 | static void ath_rc_init_valid_txmask(struct ath_rate_priv *ath_rc_priv) | 403 | static void ath_rc_init_valid_rate_idx(struct ath_rate_priv *ath_rc_priv) |
404 | { | 404 | { |
405 | u8 i; | 405 | u8 i; |
406 | 406 | ||
@@ -408,7 +408,7 @@ static void ath_rc_init_valid_txmask(struct ath_rate_priv *ath_rc_priv) | |||
408 | ath_rc_priv->valid_rate_index[i] = 0; | 408 | ath_rc_priv->valid_rate_index[i] = 0; |
409 | } | 409 | } |
410 | 410 | ||
411 | static inline void ath_rc_set_valid_txmask(struct ath_rate_priv *ath_rc_priv, | 411 | static inline void ath_rc_set_valid_rate_idx(struct ath_rate_priv *ath_rc_priv, |
412 | u8 index, int valid_tx_rate) | 412 | u8 index, int valid_tx_rate) |
413 | { | 413 | { |
414 | BUG_ON(index > ath_rc_priv->rate_table_size); | 414 | BUG_ON(index > ath_rc_priv->rate_table_size); |
@@ -489,7 +489,7 @@ static u8 ath_rc_init_validrates(struct ath_rate_priv *ath_rc_priv, | |||
489 | 489 | ||
490 | ath_rc_priv->valid_phy_rateidx[phy][valid_rate_count] = i; | 490 | ath_rc_priv->valid_phy_rateidx[phy][valid_rate_count] = i; |
491 | ath_rc_priv->valid_phy_ratecnt[phy] += 1; | 491 | ath_rc_priv->valid_phy_ratecnt[phy] += 1; |
492 | ath_rc_set_valid_txmask(ath_rc_priv, i, 1); | 492 | ath_rc_set_valid_rate_idx(ath_rc_priv, i, 1); |
493 | hi = i; | 493 | hi = i; |
494 | } | 494 | } |
495 | } | 495 | } |
@@ -532,7 +532,7 @@ static u8 ath_rc_setvalid_rates(struct ath_rate_priv *ath_rc_priv, | |||
532 | ath_rc_priv->valid_phy_rateidx[phy] | 532 | ath_rc_priv->valid_phy_rateidx[phy] |
533 | [valid_rate_count] = j; | 533 | [valid_rate_count] = j; |
534 | ath_rc_priv->valid_phy_ratecnt[phy] += 1; | 534 | ath_rc_priv->valid_phy_ratecnt[phy] += 1; |
535 | ath_rc_set_valid_txmask(ath_rc_priv, j, 1); | 535 | ath_rc_set_valid_rate_idx(ath_rc_priv, j, 1); |
536 | hi = A_MAX(hi, j); | 536 | hi = A_MAX(hi, j); |
537 | } | 537 | } |
538 | } | 538 | } |
@@ -568,7 +568,7 @@ static u8 ath_rc_setvalid_htrates(struct ath_rate_priv *ath_rc_priv, | |||
568 | ath_rc_priv->valid_phy_rateidx[phy] | 568 | ath_rc_priv->valid_phy_rateidx[phy] |
569 | [ath_rc_priv->valid_phy_ratecnt[phy]] = j; | 569 | [ath_rc_priv->valid_phy_ratecnt[phy]] = j; |
570 | ath_rc_priv->valid_phy_ratecnt[phy] += 1; | 570 | ath_rc_priv->valid_phy_ratecnt[phy] += 1; |
571 | ath_rc_set_valid_txmask(ath_rc_priv, j, 1); | 571 | ath_rc_set_valid_rate_idx(ath_rc_priv, j, 1); |
572 | hi = A_MAX(hi, j); | 572 | hi = A_MAX(hi, j); |
573 | } | 573 | } |
574 | } | 574 | } |
@@ -1210,7 +1210,7 @@ static void ath_rc_init(struct ath_softc *sc, | |||
1210 | } | 1210 | } |
1211 | 1211 | ||
1212 | /* Determine the valid rates */ | 1212 | /* Determine the valid rates */ |
1213 | ath_rc_init_valid_txmask(ath_rc_priv); | 1213 | ath_rc_init_valid_rate_idx(ath_rc_priv); |
1214 | 1214 | ||
1215 | for (i = 0; i < WLAN_RC_PHY_MAX; i++) { | 1215 | for (i = 0; i < WLAN_RC_PHY_MAX; i++) { |
1216 | for (j = 0; j < MAX_TX_RATE_PHY; j++) | 1216 | for (j = 0; j < MAX_TX_RATE_PHY; j++) |
@@ -1321,7 +1321,7 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband, | |||
1321 | struct ath_rate_priv *ath_rc_priv = priv_sta; | 1321 | struct ath_rate_priv *ath_rc_priv = priv_sta; |
1322 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | 1322 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
1323 | struct ieee80211_hdr *hdr; | 1323 | struct ieee80211_hdr *hdr; |
1324 | int final_ts_idx = 0, tx_status = 0, is_underrun = 0; | 1324 | int final_ts_idx = 0, tx_status = 0; |
1325 | int long_retry = 0; | 1325 | int long_retry = 0; |
1326 | __le16 fc; | 1326 | __le16 fc; |
1327 | int i; | 1327 | int i; |
@@ -1358,7 +1358,7 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband, | |||
1358 | tx_status = 1; | 1358 | tx_status = 1; |
1359 | 1359 | ||
1360 | ath_rc_tx_status(sc, ath_rc_priv, tx_info, final_ts_idx, tx_status, | 1360 | ath_rc_tx_status(sc, ath_rc_priv, tx_info, final_ts_idx, tx_status, |
1361 | (is_underrun) ? sc->hw->max_rate_tries : long_retry); | 1361 | long_retry); |
1362 | 1362 | ||
1363 | /* Check if aggregation has to be enabled for this tid */ | 1363 | /* Check if aggregation has to be enabled for this tid */ |
1364 | if (conf_is_ht(&sc->hw->conf) && | 1364 | if (conf_is_ht(&sc->hw->conf) && |
diff --git a/drivers/net/wireless/ath/ath9k/rc.h b/drivers/net/wireless/ath/ath9k/rc.h index 31a004cb60ac..5d984b8acdb1 100644 --- a/drivers/net/wireless/ath/ath9k/rc.h +++ b/drivers/net/wireless/ath/ath9k/rc.h | |||
@@ -195,7 +195,6 @@ struct ath_rc_stats { | |||
195 | * @rate_max_phy: phy index for the max rate | 195 | * @rate_max_phy: phy index for the max rate |
196 | * @per: PER for every valid rate in % | 196 | * @per: PER for every valid rate in % |
197 | * @probe_interval: interval for ratectrl to probe for other rates | 197 | * @probe_interval: interval for ratectrl to probe for other rates |
198 | * @prev_data_rix: rate idx of last data frame | ||
199 | * @ht_cap: HT capabilities | 198 | * @ht_cap: HT capabilities |
200 | * @neg_rates: Negotatied rates | 199 | * @neg_rates: Negotatied rates |
201 | * @neg_ht_rates: Negotiated HT rates | 200 | * @neg_ht_rates: Negotiated HT rates |
@@ -214,10 +213,8 @@ struct ath_rate_priv { | |||
214 | u32 probe_time; | 213 | u32 probe_time; |
215 | u32 per_down_time; | 214 | u32 per_down_time; |
216 | u32 probe_interval; | 215 | u32 probe_interval; |
217 | u32 prev_data_rix; | ||
218 | struct ath_rateset neg_rates; | 216 | struct ath_rateset neg_rates; |
219 | struct ath_rateset neg_ht_rates; | 217 | struct ath_rateset neg_ht_rates; |
220 | struct ath_rate_softc *asc; | ||
221 | const struct ath_rate_table *rate_table; | 218 | const struct ath_rate_table *rate_table; |
222 | 219 | ||
223 | struct dentry *debugfs_rcstats; | 220 | struct dentry *debugfs_rcstats; |