aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/rc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/rc.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index 11968843c773..ac34a055c713 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -668,7 +668,7 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
668 struct ieee80211_tx_rate *rates = tx_info->control.rates; 668 struct ieee80211_tx_rate *rates = tx_info->control.rates;
669 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 669 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
670 __le16 fc = hdr->frame_control; 670 __le16 fc = hdr->frame_control;
671 u8 try_per_rate, i = 0, rix, nrix; 671 u8 try_per_rate, i = 0, rix;
672 int is_probe = 0; 672 int is_probe = 0;
673 673
674 if (rate_control_send_low(sta, priv_sta, txrc)) 674 if (rate_control_send_low(sta, priv_sta, txrc))
@@ -688,26 +688,25 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
688 688
689 rate_table = sc->cur_rate_table; 689 rate_table = sc->cur_rate_table;
690 rix = ath_rc_get_highest_rix(sc, ath_rc_priv, rate_table, &is_probe); 690 rix = ath_rc_get_highest_rix(sc, ath_rc_priv, rate_table, &is_probe);
691 nrix = rix;
692 691
693 if (is_probe) { 692 if (is_probe) {
694 /* set one try for probe rates. For the 693 /* set one try for probe rates. For the
695 * probes don't enable rts */ 694 * probes don't enable rts */
696 ath_rc_rate_set_series(rate_table, &rates[i++], txrc, 695 ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
697 1, nrix, 0); 696 1, rix, 0);
698 697
699 /* Get the next tried/allowed rate. No RTS for the next series 698 /* Get the next tried/allowed rate. No RTS for the next series
700 * after the probe rate 699 * after the probe rate
701 */ 700 */
702 ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &nrix); 701 ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &rix);
703 ath_rc_rate_set_series(rate_table, &rates[i++], txrc, 702 ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
704 try_per_rate, nrix, 0); 703 try_per_rate, rix, 0);
705 704
706 tx_info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE; 705 tx_info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
707 } else { 706 } else {
708 /* Set the choosen rate. No RTS for first series entry. */ 707 /* Set the choosen rate. No RTS for first series entry. */
709 ath_rc_rate_set_series(rate_table, &rates[i++], txrc, 708 ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
710 try_per_rate, nrix, 0); 709 try_per_rate, rix, 0);
711 } 710 }
712 711
713 /* Fill in the other rates for multirate retry */ 712 /* Fill in the other rates for multirate retry */
@@ -716,10 +715,10 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
716 if (i + 1 == 4) 715 if (i + 1 == 4)
717 try_per_rate = 8; 716 try_per_rate = 8;
718 717
719 ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &nrix); 718 ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &rix);
720 /* All other rates in the series have RTS enabled */ 719 /* All other rates in the series have RTS enabled */
721 ath_rc_rate_set_series(rate_table, &rates[i], txrc, 720 ath_rc_rate_set_series(rate_table, &rates[i], txrc,
722 try_per_rate, nrix, 1); 721 try_per_rate, rix, 1);
723 } 722 }
724 723
725 /* 724 /*