aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mac80211_hwsim.c
diff options
context:
space:
mode:
authorJavier Cardona <javier@cozybit.com>2012-05-01 06:01:28 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-05-15 17:27:27 -0400
commit2a4ffa4c8934bd9a36c8354a4b87a529114baf62 (patch)
tree724e8428852ee7296c3747b619bf050914d664a0 /drivers/net/wireless/mac80211_hwsim.c
parent341352d13dae752610342923c53ebe461624ee2c (diff)
mac80211_hwsim: Fix rate control by correctly reporting transmission counts
Drivers need to report the number of transmission attempts for each rate as well as to terminate the rate array with -1. The in-kernel datapath of hwsim simulates a perfect medium, therefore the driver only needs to report that the first transmission attempt was sucessfully completed at the most favorable rate. Rate control is working again for this driver. Tested mesh mode with minstrel. Signed-off-by: Javier Cardona <javier@cozybit.com> 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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 03c0c6b1372c..fb787df01666 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -746,6 +746,11 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
746 hwsim_check_sta_magic(txi->control.sta); 746 hwsim_check_sta_magic(txi->control.sta);
747 747
748 ieee80211_tx_info_clear_status(txi); 748 ieee80211_tx_info_clear_status(txi);
749
750 /* frame was transmitted at most favorable rate at first attempt */
751 txi->control.rates[0].count = 1;
752 txi->control.rates[1].idx = -1;
753
749 if (!(txi->flags & IEEE80211_TX_CTL_NO_ACK) && ack) 754 if (!(txi->flags & IEEE80211_TX_CTL_NO_ACK) && ack)
750 txi->flags |= IEEE80211_TX_STAT_ACK; 755 txi->flags |= IEEE80211_TX_STAT_ACK;
751 ieee80211_tx_status_irqsafe(hw, skb); 756 ieee80211_tx_status_irqsafe(hw, skb);