aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-08-23 04:46:40 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-08-27 12:15:20 -0400
commit8bd413e611d4324f17e54a2a89b4d09216c22a37 (patch)
tree64385ef0b39d6216bc5cacab03b68a18c90b92a5 /drivers/net/wireless/iwlwifi/iwl-agn-tx.c
parentc90cbbbd78e45abbefd5e9e1c3c179d6126e3ddf (diff)
iwlwifi: move virtual interface pointer into context
iwlwifi occasionally needs to find the virtual interface pointer to give it to mac80211, but right now it only keeps one. Move it into the context so that we can keep one pointer each. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-tx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index bff593ab0944..64daddd92279 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -1120,6 +1120,9 @@ int iwlagn_txq_check_empty(struct iwl_priv *priv,
1120 struct iwl_queue *q = &priv->txq[txq_id].q; 1120 struct iwl_queue *q = &priv->txq[txq_id].q;
1121 u8 *addr = priv->stations[sta_id].sta.sta.addr; 1121 u8 *addr = priv->stations[sta_id].sta.sta.addr;
1122 struct iwl_tid_data *tid_data = &priv->stations[sta_id].tid[tid]; 1122 struct iwl_tid_data *tid_data = &priv->stations[sta_id].tid[tid];
1123 struct iwl_rxon_context *ctx;
1124
1125 ctx = &priv->contexts[priv->stations[sta_id].ctxid];
1123 1126
1124 lockdep_assert_held(&priv->sta_lock); 1127 lockdep_assert_held(&priv->sta_lock);
1125 1128
@@ -1135,7 +1138,7 @@ int iwlagn_txq_check_empty(struct iwl_priv *priv,
1135 priv->cfg->ops->lib->txq_agg_disable(priv, txq_id, 1138 priv->cfg->ops->lib->txq_agg_disable(priv, txq_id,
1136 ssn, tx_fifo); 1139 ssn, tx_fifo);
1137 tid_data->agg.state = IWL_AGG_OFF; 1140 tid_data->agg.state = IWL_AGG_OFF;
1138 ieee80211_stop_tx_ba_cb_irqsafe(priv->vif, addr, tid); 1141 ieee80211_stop_tx_ba_cb_irqsafe(ctx->vif, addr, tid);
1139 } 1142 }
1140 break; 1143 break;
1141 case IWL_EMPTYING_HW_QUEUE_ADDBA: 1144 case IWL_EMPTYING_HW_QUEUE_ADDBA:
@@ -1143,7 +1146,7 @@ int iwlagn_txq_check_empty(struct iwl_priv *priv,
1143 if (tid_data->tfds_in_queue == 0) { 1146 if (tid_data->tfds_in_queue == 0) {
1144 IWL_DEBUG_HT(priv, "HW queue empty: continue ADDBA flow\n"); 1147 IWL_DEBUG_HT(priv, "HW queue empty: continue ADDBA flow\n");
1145 tid_data->agg.state = IWL_AGG_ON; 1148 tid_data->agg.state = IWL_AGG_ON;
1146 ieee80211_start_tx_ba_cb_irqsafe(priv->vif, addr, tid); 1149 ieee80211_start_tx_ba_cb_irqsafe(ctx->vif, addr, tid);
1147 } 1150 }
1148 break; 1151 break;
1149 } 1152 }
@@ -1151,14 +1154,14 @@ int iwlagn_txq_check_empty(struct iwl_priv *priv,
1151 return 0; 1154 return 0;
1152} 1155}
1153 1156
1154static void iwlagn_tx_status(struct iwl_priv *priv, struct sk_buff *skb) 1157static void iwlagn_tx_status(struct iwl_priv *priv, struct iwl_tx_info *tx_info)
1155{ 1158{
1156 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; 1159 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx_info->skb->data;
1157 struct ieee80211_sta *sta; 1160 struct ieee80211_sta *sta;
1158 struct iwl_station_priv *sta_priv; 1161 struct iwl_station_priv *sta_priv;
1159 1162
1160 rcu_read_lock(); 1163 rcu_read_lock();
1161 sta = ieee80211_find_sta(priv->vif, hdr->addr1); 1164 sta = ieee80211_find_sta(tx_info->ctx->vif, hdr->addr1);
1162 if (sta) { 1165 if (sta) {
1163 sta_priv = (void *)sta->drv_priv; 1166 sta_priv = (void *)sta->drv_priv;
1164 /* avoid atomic ops if this isn't a client */ 1167 /* avoid atomic ops if this isn't a client */
@@ -1168,7 +1171,7 @@ static void iwlagn_tx_status(struct iwl_priv *priv, struct sk_buff *skb)
1168 } 1171 }
1169 rcu_read_unlock(); 1172 rcu_read_unlock();
1170 1173
1171 ieee80211_tx_status_irqsafe(priv->hw, skb); 1174 ieee80211_tx_status_irqsafe(priv->hw, tx_info->skb);
1172} 1175}
1173 1176
1174int iwlagn_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index) 1177int iwlagn_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
@@ -1191,7 +1194,7 @@ int iwlagn_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
1191 q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) { 1194 q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) {
1192 1195
1193 tx_info = &txq->txb[txq->q.read_ptr]; 1196 tx_info = &txq->txb[txq->q.read_ptr];
1194 iwlagn_tx_status(priv, tx_info->skb); 1197 iwlagn_tx_status(priv, tx_info);
1195 1198
1196 hdr = (struct ieee80211_hdr *)tx_info->skb->data; 1199 hdr = (struct ieee80211_hdr *)tx_info->skb->data;
1197 if (hdr && ieee80211_is_data_qos(hdr->frame_control)) 1200 if (hdr && ieee80211_is_data_qos(hdr->frame_control))