diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-tx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index c2a5c85542bf..c402bfc83f36 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -566,11 +566,11 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
566 | 566 | ||
567 | hdr_len = ieee80211_hdrlen(fc); | 567 | hdr_len = ieee80211_hdrlen(fc); |
568 | 568 | ||
569 | /* Find (or create) index into station table for destination station */ | 569 | /* Find index into station table for destination station */ |
570 | if (info->flags & IEEE80211_TX_CTL_INJECTED) | 570 | if (!info->control.sta) |
571 | sta_id = priv->hw_params.bcast_sta_id; | 571 | sta_id = priv->hw_params.bcast_sta_id; |
572 | else | 572 | else |
573 | sta_id = iwl_get_sta_id(priv, hdr); | 573 | sta_id = iwl_sta_id(info->control.sta); |
574 | if (sta_id == IWL_INVALID_STATION) { | 574 | if (sta_id == IWL_INVALID_STATION) { |
575 | IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", | 575 | IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", |
576 | hdr->addr1); | 576 | hdr->addr1); |
@@ -961,7 +961,8 @@ static int iwlagn_txq_ctx_activate_free(struct iwl_priv *priv) | |||
961 | return -1; | 961 | return -1; |
962 | } | 962 | } |
963 | 963 | ||
964 | int iwlagn_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn) | 964 | int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif, |
965 | struct ieee80211_sta *sta, u16 tid, u16 *ssn) | ||
965 | { | 966 | { |
966 | int sta_id; | 967 | int sta_id; |
967 | int tx_fifo; | 968 | int tx_fifo; |
@@ -975,9 +976,9 @@ int iwlagn_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn) | |||
975 | return tx_fifo; | 976 | return tx_fifo; |
976 | 977 | ||
977 | IWL_WARN(priv, "%s on ra = %pM tid = %d\n", | 978 | IWL_WARN(priv, "%s on ra = %pM tid = %d\n", |
978 | __func__, ra, tid); | 979 | __func__, sta->addr, tid); |
979 | 980 | ||
980 | sta_id = iwl_find_station(priv, ra); | 981 | sta_id = iwl_sta_id(sta); |
981 | if (sta_id == IWL_INVALID_STATION) { | 982 | if (sta_id == IWL_INVALID_STATION) { |
982 | IWL_ERR(priv, "Start AGG on invalid station\n"); | 983 | IWL_ERR(priv, "Start AGG on invalid station\n"); |
983 | return -ENXIO; | 984 | return -ENXIO; |
@@ -1011,7 +1012,7 @@ int iwlagn_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn) | |||
1011 | if (tid_data->tfds_in_queue == 0) { | 1012 | if (tid_data->tfds_in_queue == 0) { |
1012 | IWL_DEBUG_HT(priv, "HW queue is empty\n"); | 1013 | IWL_DEBUG_HT(priv, "HW queue is empty\n"); |
1013 | tid_data->agg.state = IWL_AGG_ON; | 1014 | tid_data->agg.state = IWL_AGG_ON; |
1014 | ieee80211_start_tx_ba_cb_irqsafe(priv->vif, ra, tid); | 1015 | ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid); |
1015 | } else { | 1016 | } else { |
1016 | IWL_DEBUG_HT(priv, "HW queue is NOT empty: %d packets in HW queue\n", | 1017 | IWL_DEBUG_HT(priv, "HW queue is NOT empty: %d packets in HW queue\n", |
1017 | tid_data->tfds_in_queue); | 1018 | tid_data->tfds_in_queue); |
@@ -1020,23 +1021,19 @@ int iwlagn_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn) | |||
1020 | return ret; | 1021 | return ret; |
1021 | } | 1022 | } |
1022 | 1023 | ||
1023 | int iwlagn_tx_agg_stop(struct iwl_priv *priv , const u8 *ra, u16 tid) | 1024 | int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif, |
1025 | struct ieee80211_sta *sta, u16 tid) | ||
1024 | { | 1026 | { |
1025 | int tx_fifo_id, txq_id, sta_id, ssn = -1; | 1027 | int tx_fifo_id, txq_id, sta_id, ssn = -1; |
1026 | struct iwl_tid_data *tid_data; | 1028 | struct iwl_tid_data *tid_data; |
1027 | int write_ptr, read_ptr; | 1029 | int write_ptr, read_ptr; |
1028 | unsigned long flags; | 1030 | unsigned long flags; |
1029 | 1031 | ||
1030 | if (!ra) { | ||
1031 | IWL_ERR(priv, "ra = NULL\n"); | ||
1032 | return -EINVAL; | ||
1033 | } | ||
1034 | |||
1035 | tx_fifo_id = get_fifo_from_tid(tid); | 1032 | tx_fifo_id = get_fifo_from_tid(tid); |
1036 | if (unlikely(tx_fifo_id < 0)) | 1033 | if (unlikely(tx_fifo_id < 0)) |
1037 | return tx_fifo_id; | 1034 | return tx_fifo_id; |
1038 | 1035 | ||
1039 | sta_id = iwl_find_station(priv, ra); | 1036 | sta_id = iwl_sta_id(sta); |
1040 | 1037 | ||
1041 | if (sta_id == IWL_INVALID_STATION) { | 1038 | if (sta_id == IWL_INVALID_STATION) { |
1042 | IWL_ERR(priv, "Invalid station for AGG tid %d\n", tid); | 1039 | IWL_ERR(priv, "Invalid station for AGG tid %d\n", tid); |
@@ -1046,7 +1043,7 @@ int iwlagn_tx_agg_stop(struct iwl_priv *priv , const u8 *ra, u16 tid) | |||
1046 | if (priv->stations[sta_id].tid[tid].agg.state == | 1043 | if (priv->stations[sta_id].tid[tid].agg.state == |
1047 | IWL_EMPTYING_HW_QUEUE_ADDBA) { | 1044 | IWL_EMPTYING_HW_QUEUE_ADDBA) { |
1048 | IWL_DEBUG_HT(priv, "AGG stop before setup done\n"); | 1045 | IWL_DEBUG_HT(priv, "AGG stop before setup done\n"); |
1049 | ieee80211_stop_tx_ba_cb_irqsafe(priv->vif, ra, tid); | 1046 | ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); |
1050 | priv->stations[sta_id].tid[tid].agg.state = IWL_AGG_OFF; | 1047 | priv->stations[sta_id].tid[tid].agg.state = IWL_AGG_OFF; |
1051 | return 0; | 1048 | return 0; |
1052 | } | 1049 | } |
@@ -1083,7 +1080,7 @@ int iwlagn_tx_agg_stop(struct iwl_priv *priv , const u8 *ra, u16 tid) | |||
1083 | tx_fifo_id); | 1080 | tx_fifo_id); |
1084 | spin_unlock_irqrestore(&priv->lock, flags); | 1081 | spin_unlock_irqrestore(&priv->lock, flags); |
1085 | 1082 | ||
1086 | ieee80211_stop_tx_ba_cb_irqsafe(priv->vif, ra, tid); | 1083 | ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); |
1087 | 1084 | ||
1088 | return 0; | 1085 | return 0; |
1089 | } | 1086 | } |