aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965-rs.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-rs.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index 2adc2281c77..7993a1d8302 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -862,7 +862,7 @@ static void rs_tx_status(void *priv_rate, struct net_device *dev,
862 if (priv->band == IEEE80211_BAND_5GHZ) 862 if (priv->band == IEEE80211_BAND_5GHZ)
863 rs_index -= IWL_FIRST_OFDM_RATE; 863 rs_index -= IWL_FIRST_OFDM_RATE;
864 864
865 if ((tx_resp->control.tx_rate == NULL) || 865 if ((tx_resp->control.tx_rate_idx < 0) ||
866 (tbl_type.is_SGI ^ 866 (tbl_type.is_SGI ^
867 !!(tx_resp->control.flags & IEEE80211_TXCTL_SHORT_GI)) || 867 !!(tx_resp->control.flags & IEEE80211_TXCTL_SHORT_GI)) ||
868 (tbl_type.is_fat ^ 868 (tbl_type.is_fat ^
@@ -875,7 +875,7 @@ static void rs_tx_status(void *priv_rate, struct net_device *dev,
875 (!!(tx_rate & RATE_MCS_GF_MSK) ^ 875 (!!(tx_rate & RATE_MCS_GF_MSK) ^
876 !!(tx_resp->control.flags & IEEE80211_TXCTL_GREEN_FIELD)) || 876 !!(tx_resp->control.flags & IEEE80211_TXCTL_GREEN_FIELD)) ||
877 (hw->wiphy->bands[priv->band]->bitrates[rs_index].bitrate != 877 (hw->wiphy->bands[priv->band]->bitrates[rs_index].bitrate !=
878 tx_resp->control.tx_rate->bitrate)) { 878 hw->wiphy->bands[tx_resp->control.band]->bitrates[tx_resp->control.tx_rate_idx].bitrate)) {
879 IWL_DEBUG_RATE("initial rate does not match 0x%x\n", tx_rate); 879 IWL_DEBUG_RATE("initial rate does not match 0x%x\n", tx_rate);
880 goto out; 880 goto out;
881 } 881 }
@@ -2154,7 +2154,7 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
2154 fc = le16_to_cpu(hdr->frame_control); 2154 fc = le16_to_cpu(hdr->frame_control);
2155 if (!ieee80211_is_data(fc) || is_multicast_ether_addr(hdr->addr1) || 2155 if (!ieee80211_is_data(fc) || is_multicast_ether_addr(hdr->addr1) ||
2156 !sta || !sta->rate_ctrl_priv) { 2156 !sta || !sta->rate_ctrl_priv) {
2157 sel->rate = rate_lowest(local, sband, sta); 2157 sel->rate_idx = rate_lowest_index(local, sband, sta);
2158 goto out; 2158 goto out;
2159 } 2159 }
2160 2160
@@ -2184,11 +2184,13 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
2184 2184
2185done: 2185done:
2186 if ((i < 0) || (i > IWL_RATE_COUNT)) { 2186 if ((i < 0) || (i > IWL_RATE_COUNT)) {
2187 sel->rate = rate_lowest(local, sband, sta); 2187 sel->rate_idx = rate_lowest_index(local, sband, sta);
2188 goto out; 2188 goto out;
2189 } 2189 }
2190 2190
2191 sel->rate = &priv->ieee_rates[i]; 2191 if (sband->band == IEEE80211_BAND_5GHZ)
2192 i -= IWL_FIRST_OFDM_RATE;
2193 sel->rate_idx = i;
2192out: 2194out:
2193 rcu_read_unlock(); 2195 rcu_read_unlock();
2194} 2196}