diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-10-21 06:40:02 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:00:23 -0400 |
commit | e6a9854b05c1a6af1308fe2b8c68f35abf28a3ee (patch) | |
tree | 241f611f8194586ccabf61bacb060508773b9d05 /drivers/net/wireless/mac80211_hwsim.c | |
parent | cb121bad67a32cde37adc2729b7e18aa4fd3063e (diff) |
mac80211/drivers: rewrite the rate control API
So after the previous changes we were still unhappy with how
convoluted the API is and decided to make things simpler for
everybody. This completely changes the rate control API, now
taking into account 802.11n with MCS rates and more control,
most drivers don't support that though.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index e2aeef8de707..c57652325286 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -209,7 +209,7 @@ static bool mac80211_hwsim_tx_frame(struct ieee80211_hw *hw, | |||
209 | /* TODO: set mactime */ | 209 | /* TODO: set mactime */ |
210 | rx_status.freq = data->channel->center_freq; | 210 | rx_status.freq = data->channel->center_freq; |
211 | rx_status.band = data->channel->band; | 211 | rx_status.band = data->channel->band; |
212 | rx_status.rate_idx = info->tx_rate_idx; | 212 | rx_status.rate_idx = info->control.rates[0].idx; |
213 | /* TODO: simulate signal strength (and optional packet drop) */ | 213 | /* TODO: simulate signal strength (and optional packet drop) */ |
214 | 214 | ||
215 | /* Copy skb to all enabled radios that are on the current frequency */ | 215 | /* Copy skb to all enabled radios that are on the current frequency */ |
@@ -269,13 +269,9 @@ static int mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
269 | if (txi->control.sta) | 269 | if (txi->control.sta) |
270 | hwsim_check_sta_magic(txi->control.sta); | 270 | hwsim_check_sta_magic(txi->control.sta); |
271 | 271 | ||
272 | memset(&txi->status, 0, sizeof(txi->status)); | 272 | ieee80211_tx_info_clear_status(txi); |
273 | if (!(txi->flags & IEEE80211_TX_CTL_NO_ACK)) { | 273 | if (!(txi->flags & IEEE80211_TX_CTL_NO_ACK) && ack) |
274 | if (ack) | 274 | txi->flags |= IEEE80211_TX_STAT_ACK; |
275 | txi->flags |= IEEE80211_TX_STAT_ACK; | ||
276 | else | ||
277 | txi->status.excessive_retries = 1; | ||
278 | } | ||
279 | ieee80211_tx_status_irqsafe(hw, skb); | 275 | ieee80211_tx_status_irqsafe(hw, skb); |
280 | return NETDEV_TX_OK; | 276 | return NETDEV_TX_OK; |
281 | } | 277 | } |