diff options
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl-3945-rs.c')
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-3945-rs.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-3945-rs.c b/drivers/net/wireless/iwlegacy/iwl-3945-rs.c index 977bd2477c6a..164bcae821f8 100644 --- a/drivers/net/wireless/iwlegacy/iwl-3945-rs.c +++ b/drivers/net/wireless/iwlegacy/iwl-3945-rs.c | |||
@@ -822,12 +822,15 @@ static void iwl3945_rs_get_rate(void *priv_r, struct ieee80211_sta *sta, | |||
822 | 822 | ||
823 | out: | 823 | out: |
824 | 824 | ||
825 | rs_sta->last_txrate_idx = index; | 825 | if (sband->band == IEEE80211_BAND_5GHZ) { |
826 | if (sband->band == IEEE80211_BAND_5GHZ) | 826 | if (WARN_ON_ONCE(index < IWL_FIRST_OFDM_RATE)) |
827 | info->control.rates[0].idx = rs_sta->last_txrate_idx - | 827 | index = IWL_FIRST_OFDM_RATE; |
828 | IWL_FIRST_OFDM_RATE; | 828 | rs_sta->last_txrate_idx = index; |
829 | else | 829 | info->control.rates[0].idx = index - IWL_FIRST_OFDM_RATE; |
830 | } else { | ||
831 | rs_sta->last_txrate_idx = index; | ||
830 | info->control.rates[0].idx = rs_sta->last_txrate_idx; | 832 | info->control.rates[0].idx = rs_sta->last_txrate_idx; |
833 | } | ||
831 | 834 | ||
832 | IWL_DEBUG_RATE(priv, "leave: %d\n", index); | 835 | IWL_DEBUG_RATE(priv, "leave: %d\n", index); |
833 | } | 836 | } |