aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-rx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index e34d3fcb6c3d..8150c5c3a16b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -962,6 +962,9 @@ void iwl_rx_reply_rx(struct iwl_priv *priv,
962 return; 962 return;
963 } 963 }
964 964
965 /* This will be used in several places later */
966 rate_n_flags = le32_to_cpu(phy_res->rate_n_flags);
967
965 /* rx_status carries information about the packet to mac80211 */ 968 /* rx_status carries information about the packet to mac80211 */
966 rx_status.mactime = le64_to_cpu(phy_res->timestamp); 969 rx_status.mactime = le64_to_cpu(phy_res->timestamp);
967 rx_status.freq = 970 rx_status.freq =
@@ -969,10 +972,7 @@ void iwl_rx_reply_rx(struct iwl_priv *priv,
969 rx_status.band = (phy_res->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? 972 rx_status.band = (phy_res->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ?
970 IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; 973 IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
971 rx_status.rate_idx = 974 rx_status.rate_idx =
972 iwl_hwrate_to_plcp_idx(le32_to_cpu(phy_res->rate_n_flags)); 975 iwl_hwrate_to_mac80211_idx(rate_n_flags, rx_status.band);
973 if (rx_status.band == IEEE80211_BAND_5GHZ)
974 rx_status.rate_idx -= IWL_FIRST_OFDM_RATE;
975
976 rx_status.flag = 0; 976 rx_status.flag = 0;
977 977
978 /* TSF isn't reliable. In order to allow smooth user experience, 978 /* TSF isn't reliable. In order to allow smooth user experience,
@@ -1034,7 +1034,6 @@ void iwl_rx_reply_rx(struct iwl_priv *priv,
1034 rx_status.flag |= RX_FLAG_SHORTPRE; 1034 rx_status.flag |= RX_FLAG_SHORTPRE;
1035 1035
1036 /* Set up the HT phy flags */ 1036 /* Set up the HT phy flags */
1037 rate_n_flags = le32_to_cpu(phy_res->rate_n_flags);
1038 if (rate_n_flags & RATE_MCS_HT_MSK) 1037 if (rate_n_flags & RATE_MCS_HT_MSK)
1039 rx_status.flag |= RX_FLAG_HT; 1038 rx_status.flag |= RX_FLAG_HT;
1040 if (rate_n_flags & RATE_MCS_HT40_MSK) 1039 if (rate_n_flags & RATE_MCS_HT40_MSK)