iwlagn: upper layer stores iwl_rxon_context in skb's CB
This removes the need for iwl_tx_info.
Each tx queue holds an array of skbs, the transport layer doesn't
need to know anything about the context in which a specific skb is
sent.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
index 8c18a75..cc518af 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
@@ -215,15 +215,15 @@
DMA_TO_DEVICE);
/* free SKB */
- if (txq->txb) {
+ if (txq->skbs) {
struct sk_buff *skb;
- skb = txq->txb[index].skb;
+ skb = txq->skbs[index];
/* can be called from irqs-disabled context */
if (skb) {
dev_kfree_skb_any(skb);
- txq->txb[index].skb = NULL;
+ txq->skbs[index] = NULL;
}
}
}
@@ -1056,8 +1056,6 @@
{
struct iwl_tx_queue *txq = &priv(trans)->txq[txq_id];
struct iwl_queue *q = &txq->q;
- struct iwl_tx_info *tx_info;
- struct ieee80211_tx_info *info;
int last_to_free;
/*Since we free until index _not_ inclusive, the one before index is
@@ -1083,17 +1081,12 @@
q->read_ptr != index;
q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) {
- tx_info = &txq->txb[txq->q.read_ptr];
-
- if (WARN_ON_ONCE(tx_info->skb == NULL))
+ if (WARN_ON_ONCE(txq->skbs[txq->q.read_ptr] == NULL))
continue;
- info = IEEE80211_SKB_CB(tx_info->skb);
- info->driver_data[0] = tx_info->ctx;
+ __skb_queue_tail(skbs, txq->skbs[txq->q.read_ptr]);
- __skb_queue_tail(skbs, tx_info->skb);
-
- tx_info->skb = NULL;
+ txq->skbs[txq->q.read_ptr] = NULL;
iwlagn_txq_inval_byte_cnt_tbl(trans, txq);