Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202876
b: refs/heads/master
c: ff0d91c
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and Reinette Chatre committed Jun 6, 2010
1 parent 93bcebf commit 5cd11f8
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 519c7c416870c6e71e9553786a529d89f55ef395
refs/heads/master: ff0d91c3eea6e25b47258349b455671f98f1b0cd
25 changes: 13 additions & 12 deletions trunk/drivers/net/wireless/iwlwifi/iwl-3945.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ static void iwl3945_tx_queue_reclaim(struct iwl_priv *priv,
q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) {

tx_info = &txq->txb[txq->q.read_ptr];
ieee80211_tx_status_irqsafe(priv->hw, tx_info->skb[0]);
tx_info->skb[0] = NULL;
ieee80211_tx_status_irqsafe(priv->hw, tx_info->skb);
tx_info->skb = NULL;
priv->cfg->ops->lib->txq_free_tfd(priv, txq);
}

Expand Down Expand Up @@ -315,7 +315,7 @@ static void iwl3945_rx_reply_tx(struct iwl_priv *priv,
return;
}

info = IEEE80211_SKB_CB(txq->txb[txq->q.read_ptr].skb[0]);
info = IEEE80211_SKB_CB(txq->txb[txq->q.read_ptr].skb);
ieee80211_tx_info_clear_status(info);

/* Fill the MRR chain with some info about on-chip retransmissions */
Expand Down Expand Up @@ -702,19 +702,20 @@ void iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)

/* unmap chunks if any */

for (i = 1; i < counter; i++) {
for (i = 1; i < counter; i++)
pci_unmap_single(dev, le32_to_cpu(tfd->tbs[i].addr),
le32_to_cpu(tfd->tbs[i].len), PCI_DMA_TODEVICE);
if (txq->txb) {
struct sk_buff *skb;

skb = txq->txb[txq->q.read_ptr].skb[i - 1];
/* free SKB */
if (txq->txb) {
struct sk_buff *skb;

/* can be called from irqs-disabled context */
if (skb) {
dev_kfree_skb_any(skb);
txq->txb[txq->q.read_ptr].skb[i - 1] = NULL;
}
skb = txq->txb[txq->q.read_ptr].skb;

/* can be called from irqs-disabled context */
if (skb) {
dev_kfree_skb_any(skb);
txq->txb[txq->q.read_ptr].skb = NULL;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-4965.c
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,7 @@ static int iwl4965_tx_status_reply_tx(struct iwl_priv *priv,
IWL_DEBUG_TX_REPLY(priv, "FrameCnt = %d, StartIdx=%d idx=%d\n",
agg->frame_count, agg->start_idx, idx);

info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb[0]);
info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb);
info->status.rates[0].count = tx_resp->failure_frame + 1;
info->flags &= ~IEEE80211_TX_CTL_AMPDU;
info->flags |= iwl_tx_status_to_mac80211(status);
Expand Down Expand Up @@ -2074,7 +2074,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
return;
}

info = IEEE80211_SKB_CB(txq->txb[txq->q.read_ptr].skb[0]);
info = IEEE80211_SKB_CB(txq->txb[txq->q.read_ptr].skb);
memset(&info->status, 0, sizeof(info->status));

hdr = iwl_tx_queue_get_hdr(priv, txq_id, index);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static int iwlagn_tx_status_reply_tx(struct iwl_priv *priv,
IWL_DEBUG_TX_REPLY(priv, "FrameCnt = %d, StartIdx=%d idx=%d\n",
agg->frame_count, agg->start_idx, idx);

info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb[0]);
info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb);
info->status.rates[0].count = tx_resp->failure_frame + 1;
info->flags &= ~IEEE80211_TX_CTL_AMPDU;
info->flags |= iwl_tx_status_to_mac80211(status);
Expand Down Expand Up @@ -194,7 +194,7 @@ static void iwlagn_rx_reply_tx(struct iwl_priv *priv,
return;
}

info = IEEE80211_SKB_CB(txq->txb[txq->q.read_ptr].skb[0]);
info = IEEE80211_SKB_CB(txq->txb[txq->q.read_ptr].skb);
memset(&info->status, 0, sizeof(info->status));

tid = (tx_resp->ra_tid & IWL50_TX_RES_TID_MSK) >> IWL50_TX_RES_TID_POS;
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)

/* Set up driver data for this TFD */
memset(&(txq->txb[q->write_ptr]), 0, sizeof(struct iwl_tx_info));
txq->txb[q->write_ptr].skb[0] = skb;
txq->txb[q->write_ptr].skb = skb;

/* Set up first empty entry in queue's array of Tx/cmd buffers */
out_cmd = txq->cmd[q->write_ptr];
Expand Down Expand Up @@ -1178,12 +1178,12 @@ int iwlagn_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) {

tx_info = &txq->txb[txq->q.read_ptr];
iwlagn_tx_status(priv, tx_info->skb[0]);
iwlagn_tx_status(priv, tx_info->skb);

hdr = (struct ieee80211_hdr *)tx_info->skb[0]->data;
hdr = (struct ieee80211_hdr *)tx_info->skb->data;
if (hdr && ieee80211_is_data_qos(hdr->frame_control))
nfreed++;
tx_info->skb[0] = NULL;
tx_info->skb = NULL;

if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl)
priv->cfg->ops->lib->txq_inval_byte_cnt_tbl(priv, txq);
Expand Down Expand Up @@ -1247,7 +1247,7 @@ static int iwlagn_tx_status_reply_compressed_ba(struct iwl_priv *priv,
agg->start_idx + i);
}

info = IEEE80211_SKB_CB(priv->txq[scd_flow].txb[agg->start_idx].skb[0]);
info = IEEE80211_SKB_CB(priv->txq[scd_flow].txb[agg->start_idx].skb);
memset(&info->status, 0, sizeof(info->status));
info->flags |= IEEE80211_TX_STAT_ACK;
info->flags |= IEEE80211_TX_STAT_AMPDU;
Expand Down
18 changes: 9 additions & 9 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,20 +479,20 @@ void iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)
PCI_DMA_BIDIRECTIONAL);

/* Unmap chunks, if any. */
for (i = 1; i < num_tbs; i++) {
for (i = 1; i < num_tbs; i++)
pci_unmap_single(dev, iwl_tfd_tb_get_addr(tfd, i),
iwl_tfd_tb_get_len(tfd, i), PCI_DMA_TODEVICE);

if (txq->txb) {
struct sk_buff *skb;
/* free SKB */
if (txq->txb) {
struct sk_buff *skb;

skb = txq->txb[txq->q.read_ptr].skb[i - 1];
skb = txq->txb[txq->q.read_ptr].skb;

/* can be called from irqs-disabled context */
if (skb) {
dev_kfree_skb_any(skb);
txq->txb[txq->q.read_ptr].skb[i - 1] = NULL;
}
/* can be called from irqs-disabled context */
if (skb) {
dev_kfree_skb_any(skb);
txq->txb[txq->q.read_ptr].skb = NULL;
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/iwlwifi/iwl-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ struct iwl_queue {

/* One for each TFD */
struct iwl_tx_info {
struct sk_buff *skb[IWL_NUM_OF_TBS - 1];
struct sk_buff *skb;
};

/**
Expand Down Expand Up @@ -1425,9 +1425,9 @@ static inline u32 iwl_get_debug_level(struct iwl_priv *priv)
static inline struct ieee80211_hdr *iwl_tx_queue_get_hdr(struct iwl_priv *priv,
int txq_id, int idx)
{
if (priv->txq[txq_id].txb[idx].skb[0])
if (priv->txq[txq_id].txb[idx].skb)
return (struct ieee80211_hdr *)priv->txq[txq_id].
txb[idx].skb[0]->data;
txb[idx].skb->data;
return NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)

/* Set up driver data for this TFD */
memset(&(txq->txb[q->write_ptr]), 0, sizeof(struct iwl_tx_info));
txq->txb[q->write_ptr].skb[0] = skb;
txq->txb[q->write_ptr].skb = skb;

/* Init first empty entry in queue's array of Tx/cmd buffers */
out_cmd = txq->cmd[idx];
Expand Down

0 comments on commit 5cd11f8

Please sign in to comment.