diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-09-10 20:45:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-09-15 16:48:24 -0400 |
commit | 323ce79a9cdbf838ea577677b1ddace8e0b4d4c6 (patch) | |
tree | f14a67ec7927865dc1537b2c3a4fb20c0325f517 /drivers | |
parent | b7e35008815a1c39123f4dd53b430788e2e18da4 (diff) |
mac80211: share sta->supp_rates
As more preparation for a saner rate control algorithm API,
share the supported rates bitmap in the public API.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath9k/rc.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-rs.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath9k/rc.c b/drivers/net/wireless/ath9k/rc.c index 390019ed398e..226d70c73fe6 100644 --- a/drivers/net/wireless/ath9k/rc.c +++ b/drivers/net/wireless/ath9k/rc.c | |||
@@ -1825,7 +1825,7 @@ static void ath_setup_rates(struct ieee80211_local *local, struct sta_info *sta) | |||
1825 | 1825 | ||
1826 | sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; | 1826 | sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; |
1827 | for (i = 0; i < sband->n_bitrates; i++) { | 1827 | for (i = 0; i < sband->n_bitrates; i++) { |
1828 | if (sta->supp_rates[local->hw.conf.channel->band] & BIT(i)) { | 1828 | if (sta->sta.supp_rates[local->hw.conf.channel->band] & BIT(i)) { |
1829 | rc_priv->neg_rates.rs_rates[j] | 1829 | rc_priv->neg_rates.rs_rates[j] |
1830 | = (sband->bitrates[i].bitrate * 2) / 10; | 1830 | = (sband->bitrates[i].bitrate * 2) / 10; |
1831 | j++; | 1831 | j++; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c index 46b672c34585..f751b9097592 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c | |||
@@ -333,7 +333,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta, | |||
333 | * after assoc.. */ | 333 | * after assoc.. */ |
334 | 334 | ||
335 | for (i = IWL_RATE_COUNT - 1; i >= 0; i--) { | 335 | for (i = IWL_RATE_COUNT - 1; i >= 0; i--) { |
336 | if (sta->supp_rates[local->hw.conf.channel->band] & (1 << i)) { | 336 | if (sta->sta.supp_rates[local->hw.conf.channel->band] & (1 << i)) { |
337 | sta->txrate_idx = i; | 337 | sta->txrate_idx = i; |
338 | break; | 338 | break; |
339 | } | 339 | } |
@@ -680,7 +680,7 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev, | |||
680 | 680 | ||
681 | rs_sta = (void *)sta->rate_ctrl_priv; | 681 | rs_sta = (void *)sta->rate_ctrl_priv; |
682 | 682 | ||
683 | rate_mask = sta->supp_rates[sband->band]; | 683 | rate_mask = sta->sta.supp_rates[sband->band]; |
684 | index = min(rs_sta->last_txrate_idx & 0xffff, IWL_RATE_COUNT - 1); | 684 | index = min(rs_sta->last_txrate_idx & 0xffff, IWL_RATE_COUNT - 1); |
685 | 685 | ||
686 | if (sband->band == IEEE80211_BAND_5GHZ) | 686 | if (sband->band == IEEE80211_BAND_5GHZ) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 54f076bb2022..f7191a9a7fb7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -1731,7 +1731,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
1731 | return; | 1731 | return; |
1732 | 1732 | ||
1733 | lq_sta = (struct iwl_lq_sta *)sta->rate_ctrl_priv; | 1733 | lq_sta = (struct iwl_lq_sta *)sta->rate_ctrl_priv; |
1734 | lq_sta->supp_rates = sta->supp_rates[lq_sta->band]; | 1734 | lq_sta->supp_rates = sta->sta.supp_rates[lq_sta->band]; |
1735 | 1735 | ||
1736 | tid = rs_tl_add_packet(lq_sta, hdr); | 1736 | tid = rs_tl_add_packet(lq_sta, hdr); |
1737 | 1737 | ||
@@ -2233,7 +2233,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta, | |||
2233 | sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; | 2233 | sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; |
2234 | 2234 | ||
2235 | lq_sta->flush_timer = 0; | 2235 | lq_sta->flush_timer = 0; |
2236 | lq_sta->supp_rates = sta->supp_rates[sband->band]; | 2236 | lq_sta->supp_rates = sta->sta.supp_rates[sband->band]; |
2237 | sta->txrate_idx = 3; | 2237 | sta->txrate_idx = 3; |
2238 | for (j = 0; j < LQ_SIZE; j++) | 2238 | for (j = 0; j < LQ_SIZE; j++) |
2239 | for (i = 0; i < IWL_RATE_COUNT; i++) | 2239 | for (i = 0; i < IWL_RATE_COUNT; i++) |
@@ -2270,7 +2270,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta, | |||
2270 | 2270 | ||
2271 | /* Find highest tx rate supported by hardware and destination station */ | 2271 | /* Find highest tx rate supported by hardware and destination station */ |
2272 | for (i = 0; i < sband->n_bitrates; i++) | 2272 | for (i = 0; i < sband->n_bitrates; i++) |
2273 | if (sta->supp_rates[sband->band] & BIT(i)) | 2273 | if (sta->sta.supp_rates[sband->band] & BIT(i)) |
2274 | sta->txrate_idx = i; | 2274 | sta->txrate_idx = i; |
2275 | 2275 | ||
2276 | lq_sta->last_txrate_idx = sta->txrate_idx; | 2276 | lq_sta->last_txrate_idx = sta->txrate_idx; |