diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-04-29 07:43:07 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-05-10 18:08:59 -0400 |
commit | 832f47e333c7d0db632b57e9f07956ae40dd481d (patch) | |
tree | c1415c848a916e4a5b5e104d821152e4b22881ec | |
parent | 1dda6d28377bec52f96767e8d4a59aa95102b9dd (diff) |
iwlagn: use virtual interface in TX aggregation handling
Most of the TX aggregation handling can be passed
the virtual interface directly instead of having
to rely on priv->vif.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.h | 5 |
3 files changed, 14 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index c2a5c85542bf..6a306e849584 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -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 | const u8 *ra, u16 tid, u16 *ssn) | ||
965 | { | 966 | { |
966 | int sta_id; | 967 | int sta_id; |
967 | int tx_fifo; | 968 | int tx_fifo; |
@@ -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, ra, 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,7 +1021,8 @@ 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 | const u8 *ra, 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; |
@@ -1046,7 +1048,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 == | 1048 | if (priv->stations[sta_id].tid[tid].agg.state == |
1047 | IWL_EMPTYING_HW_QUEUE_ADDBA) { | 1049 | IWL_EMPTYING_HW_QUEUE_ADDBA) { |
1048 | IWL_DEBUG_HT(priv, "AGG stop before setup done\n"); | 1050 | IWL_DEBUG_HT(priv, "AGG stop before setup done\n"); |
1049 | ieee80211_stop_tx_ba_cb_irqsafe(priv->vif, ra, tid); | 1051 | ieee80211_stop_tx_ba_cb_irqsafe(vif, ra, tid); |
1050 | priv->stations[sta_id].tid[tid].agg.state = IWL_AGG_OFF; | 1052 | priv->stations[sta_id].tid[tid].agg.state = IWL_AGG_OFF; |
1051 | return 0; | 1053 | return 0; |
1052 | } | 1054 | } |
@@ -1083,7 +1085,7 @@ int iwlagn_tx_agg_stop(struct iwl_priv *priv , const u8 *ra, u16 tid) | |||
1083 | tx_fifo_id); | 1085 | tx_fifo_id); |
1084 | spin_unlock_irqrestore(&priv->lock, flags); | 1086 | spin_unlock_irqrestore(&priv->lock, flags); |
1085 | 1087 | ||
1086 | ieee80211_stop_tx_ba_cb_irqsafe(priv->vif, ra, tid); | 1088 | ieee80211_stop_tx_ba_cb_irqsafe(vif, ra, tid); |
1087 | 1089 | ||
1088 | return 0; | 1090 | return 0; |
1089 | } | 1091 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 270635edb63c..85e045baf5ae 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3130,8 +3130,8 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
3130 | 3130 | ||
3131 | static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, | 3131 | static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, |
3132 | struct ieee80211_vif *vif, | 3132 | struct ieee80211_vif *vif, |
3133 | enum ieee80211_ampdu_mlme_action action, | 3133 | enum ieee80211_ampdu_mlme_action action, |
3134 | struct ieee80211_sta *sta, u16 tid, u16 *ssn) | 3134 | struct ieee80211_sta *sta, u16 tid, u16 *ssn) |
3135 | { | 3135 | { |
3136 | struct iwl_priv *priv = hw->priv; | 3136 | struct iwl_priv *priv = hw->priv; |
3137 | int ret; | 3137 | int ret; |
@@ -3155,7 +3155,7 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, | |||
3155 | return ret; | 3155 | return ret; |
3156 | case IEEE80211_AMPDU_TX_START: | 3156 | case IEEE80211_AMPDU_TX_START: |
3157 | IWL_DEBUG_HT(priv, "start Tx\n"); | 3157 | IWL_DEBUG_HT(priv, "start Tx\n"); |
3158 | ret = iwlagn_tx_agg_start(priv, sta->addr, tid, ssn); | 3158 | ret = iwlagn_tx_agg_start(priv, vif, sta->addr, tid, ssn); |
3159 | if (ret == 0) { | 3159 | if (ret == 0) { |
3160 | priv->_agn.agg_tids_count++; | 3160 | priv->_agn.agg_tids_count++; |
3161 | IWL_DEBUG_HT(priv, "priv->_agn.agg_tids_count = %u\n", | 3161 | IWL_DEBUG_HT(priv, "priv->_agn.agg_tids_count = %u\n", |
@@ -3164,7 +3164,7 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, | |||
3164 | return ret; | 3164 | return ret; |
3165 | case IEEE80211_AMPDU_TX_STOP: | 3165 | case IEEE80211_AMPDU_TX_STOP: |
3166 | IWL_DEBUG_HT(priv, "stop Tx\n"); | 3166 | IWL_DEBUG_HT(priv, "stop Tx\n"); |
3167 | ret = iwlagn_tx_agg_stop(priv, sta->addr, tid); | 3167 | ret = iwlagn_tx_agg_stop(priv, vif, sta->addr, tid); |
3168 | if ((ret == 0) && (priv->_agn.agg_tids_count > 0)) { | 3168 | if ((ret == 0) && (priv->_agn.agg_tids_count > 0)) { |
3169 | priv->_agn.agg_tids_count--; | 3169 | priv->_agn.agg_tids_count--; |
3170 | IWL_DEBUG_HT(priv, "priv->_agn.agg_tids_count = %u\n", | 3170 | IWL_DEBUG_HT(priv, "priv->_agn.agg_tids_count = %u\n", |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h index f52bedb8c8b3..c4417739a64c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn.h | |||
@@ -135,9 +135,10 @@ void iwlagn_rx_reply_rx_phy(struct iwl_priv *priv, | |||
135 | void iwlagn_hwrate_to_tx_control(struct iwl_priv *priv, u32 rate_n_flags, | 135 | void iwlagn_hwrate_to_tx_control(struct iwl_priv *priv, u32 rate_n_flags, |
136 | struct ieee80211_tx_info *info); | 136 | struct ieee80211_tx_info *info); |
137 | int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb); | 137 | int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb); |
138 | int iwlagn_tx_agg_start(struct iwl_priv *priv, | 138 | int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif, |
139 | const u8 *ra, u16 tid, u16 *ssn); | 139 | const u8 *ra, u16 tid, u16 *ssn); |
140 | int iwlagn_tx_agg_stop(struct iwl_priv *priv , const u8 *ra, u16 tid); | 140 | int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif, |
141 | const u8 *ra, u16 tid); | ||
141 | int iwlagn_txq_check_empty(struct iwl_priv *priv, | 142 | int iwlagn_txq_check_empty(struct iwl_priv *priv, |
142 | int sta_id, u8 tid, int txq_id); | 143 | int sta_id, u8 tid, int txq_id); |
143 | void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv, | 144 | void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv, |