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.c49
1 files changed, 23 insertions, 26 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index 7993a1d8302..f28b3cc272d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -785,8 +785,7 @@ out:
785 * mac80211 sends us Tx status 785 * mac80211 sends us Tx status
786 */ 786 */
787static void rs_tx_status(void *priv_rate, struct net_device *dev, 787static void rs_tx_status(void *priv_rate, struct net_device *dev,
788 struct sk_buff *skb, 788 struct sk_buff *skb)
789 struct ieee80211_tx_status *tx_resp)
790{ 789{
791 int status; 790 int status;
792 u8 retries; 791 u8 retries;
@@ -798,6 +797,7 @@ static void rs_tx_status(void *priv_rate, struct net_device *dev,
798 struct iwl_priv *priv = (struct iwl_priv *)priv_rate; 797 struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
799 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); 798 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
800 struct ieee80211_hw *hw = local_to_hw(local); 799 struct ieee80211_hw *hw = local_to_hw(local);
800 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
801 struct iwl4965_rate_scale_data *window = NULL; 801 struct iwl4965_rate_scale_data *window = NULL;
802 struct iwl4965_rate_scale_data *search_win = NULL; 802 struct iwl4965_rate_scale_data *search_win = NULL;
803 u32 tx_rate; 803 u32 tx_rate;
@@ -813,11 +813,11 @@ static void rs_tx_status(void *priv_rate, struct net_device *dev,
813 return; 813 return;
814 814
815 /* This packet was aggregated but doesn't carry rate scale info */ 815 /* This packet was aggregated but doesn't carry rate scale info */
816 if ((tx_resp->control.flags & IEEE80211_TXCTL_AMPDU) && 816 if ((info->flags & IEEE80211_TX_CTL_AMPDU) &&
817 !(tx_resp->flags & IEEE80211_TX_STATUS_AMPDU)) 817 !(info->flags & IEEE80211_TX_STAT_AMPDU))
818 return; 818 return;
819 819
820 retries = tx_resp->retry_count; 820 retries = info->status.retry_count;
821 821
822 if (retries > 15) 822 if (retries > 15)
823 retries = 15; 823 retries = 15;
@@ -862,20 +862,20 @@ 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_idx < 0) || 865 if ((info->tx_rate_idx < 0) ||
866 (tbl_type.is_SGI ^ 866 (tbl_type.is_SGI ^
867 !!(tx_resp->control.flags & IEEE80211_TXCTL_SHORT_GI)) || 867 !!(info->flags & IEEE80211_TX_CTL_SHORT_GI)) ||
868 (tbl_type.is_fat ^ 868 (tbl_type.is_fat ^
869 !!(tx_resp->control.flags & IEEE80211_TXCTL_40_MHZ_WIDTH)) || 869 !!(info->flags & IEEE80211_TX_CTL_40_MHZ_WIDTH)) ||
870 (tbl_type.is_dup ^ 870 (tbl_type.is_dup ^
871 !!(tx_resp->control.flags & IEEE80211_TXCTL_DUP_DATA)) || 871 !!(info->flags & IEEE80211_TX_CTL_DUP_DATA)) ||
872 (tbl_type.ant_type ^ tx_resp->control.antenna_sel_tx) || 872 (tbl_type.ant_type ^ info->antenna_sel_tx) ||
873 (!!(tx_rate & RATE_MCS_HT_MSK) ^ 873 (!!(tx_rate & RATE_MCS_HT_MSK) ^
874 !!(tx_resp->control.flags & IEEE80211_TXCTL_OFDM_HT)) || 874 !!(info->flags & IEEE80211_TX_CTL_OFDM_HT)) ||
875 (!!(tx_rate & RATE_MCS_GF_MSK) ^ 875 (!!(tx_rate & RATE_MCS_GF_MSK) ^
876 !!(tx_resp->control.flags & IEEE80211_TXCTL_GREEN_FIELD)) || 876 !!(info->flags & IEEE80211_TX_CTL_GREEN_FIELD)) ||
877 (hw->wiphy->bands[priv->band]->bitrates[rs_index].bitrate != 877 (hw->wiphy->bands[priv->band]->bitrates[rs_index].bitrate !=
878 hw->wiphy->bands[tx_resp->control.band]->bitrates[tx_resp->control.tx_rate_idx].bitrate)) { 878 hw->wiphy->bands[info->band]->bitrates[info->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 }
@@ -929,10 +929,7 @@ static void rs_tx_status(void *priv_rate, struct net_device *dev,
929 rs_get_tbl_info_from_mcs(tx_rate, priv->band, &tbl_type, &rs_index); 929 rs_get_tbl_info_from_mcs(tx_rate, priv->band, &tbl_type, &rs_index);
930 930
931 /* Update frame history window with "success" if Tx got ACKed ... */ 931 /* Update frame history window with "success" if Tx got ACKed ... */
932 if (tx_resp->flags & IEEE80211_TX_STATUS_ACK) 932 status = !!(info->flags & IEEE80211_TX_STAT_ACK);
933 status = 1;
934 else
935 status = 0;
936 933
937 /* If type matches "search" table, 934 /* If type matches "search" table,
938 * add final tx status to "search" history */ 935 * add final tx status to "search" history */
@@ -943,10 +940,10 @@ static void rs_tx_status(void *priv_rate, struct net_device *dev,
943 tpt = search_tbl->expected_tpt[rs_index]; 940 tpt = search_tbl->expected_tpt[rs_index];
944 else 941 else
945 tpt = 0; 942 tpt = 0;
946 if (tx_resp->control.flags & IEEE80211_TXCTL_AMPDU) 943 if (info->flags & IEEE80211_TX_CTL_AMPDU)
947 rs_collect_tx_data(search_win, rs_index, tpt, 944 rs_collect_tx_data(search_win, rs_index, tpt,
948 tx_resp->ampdu_ack_len, 945 info->status.ampdu_ack_len,
949 tx_resp->ampdu_ack_map); 946 info->status.ampdu_ack_map);
950 else 947 else
951 rs_collect_tx_data(search_win, rs_index, tpt, 948 rs_collect_tx_data(search_win, rs_index, tpt,
952 1, status); 949 1, status);
@@ -959,10 +956,10 @@ static void rs_tx_status(void *priv_rate, struct net_device *dev,
959 tpt = curr_tbl->expected_tpt[rs_index]; 956 tpt = curr_tbl->expected_tpt[rs_index];
960 else 957 else
961 tpt = 0; 958 tpt = 0;
962 if (tx_resp->control.flags & IEEE80211_TXCTL_AMPDU) 959 if (info->flags & IEEE80211_TX_CTL_AMPDU)
963 rs_collect_tx_data(window, rs_index, tpt, 960 rs_collect_tx_data(window, rs_index, tpt,
964 tx_resp->ampdu_ack_len, 961 info->status.ampdu_ack_len,
965 tx_resp->ampdu_ack_map); 962 info->status.ampdu_ack_map);
966 else 963 else
967 rs_collect_tx_data(window, rs_index, tpt, 964 rs_collect_tx_data(window, rs_index, tpt,
968 1, status); 965 1, status);
@@ -971,10 +968,10 @@ static void rs_tx_status(void *priv_rate, struct net_device *dev,
971 /* If not searching for new mode, increment success/failed counter 968 /* If not searching for new mode, increment success/failed counter
972 * ... these help determine when to start searching again */ 969 * ... these help determine when to start searching again */
973 if (lq_sta->stay_in_tbl) { 970 if (lq_sta->stay_in_tbl) {
974 if (tx_resp->control.flags & IEEE80211_TXCTL_AMPDU) { 971 if (info->flags & IEEE80211_TX_CTL_AMPDU) {
975 lq_sta->total_success += tx_resp->ampdu_ack_map; 972 lq_sta->total_success += info->status.ampdu_ack_map;
976 lq_sta->total_failed += 973 lq_sta->total_failed +=
977 (tx_resp->ampdu_ack_len - tx_resp->ampdu_ack_map); 974 (info->status.ampdu_ack_len - info->status.ampdu_ack_map);
978 } else { 975 } else {
979 if (status) 976 if (status)
980 lq_sta->total_success++; 977 lq_sta->total_success++;