Commit d703e29a authored by Michael Wu's avatar Michael Wu Committed by David S. Miller
Browse files

[PATCH] adm8211: Pass all TXed frames to tx_status_irqsafe



ieee80211_tx_status_irqsafe can handle the freeing of all TXed frames.

Also, set excessive_retries for failed frames.
Signed-off-by: default avatarMichael Wu <flamingice@sourmilk.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f6ac0adf
...@@ -299,6 +299,7 @@ static void adm8211_interrupt_tci(struct ieee80211_hw *dev) ...@@ -299,6 +299,7 @@ static void adm8211_interrupt_tci(struct ieee80211_hw *dev)
for (dirty_tx = priv->dirty_tx; priv->cur_tx - dirty_tx; dirty_tx++) { for (dirty_tx = priv->dirty_tx; priv->cur_tx - dirty_tx; dirty_tx++) {
unsigned int entry = dirty_tx % priv->tx_ring_size; unsigned int entry = dirty_tx % priv->tx_ring_size;
u32 status = le32_to_cpu(priv->tx_ring[entry].status); u32 status = le32_to_cpu(priv->tx_ring[entry].status);
struct ieee80211_tx_status tx_status;
struct adm8211_tx_ring_info *info; struct adm8211_tx_ring_info *info;
struct sk_buff *skb; struct sk_buff *skb;
...@@ -314,21 +315,19 @@ static void adm8211_interrupt_tci(struct ieee80211_hw *dev) ...@@ -314,21 +315,19 @@ static void adm8211_interrupt_tci(struct ieee80211_hw *dev)
pci_unmap_single(priv->pdev, info->mapping, pci_unmap_single(priv->pdev, info->mapping,
info->skb->len, PCI_DMA_TODEVICE); info->skb->len, PCI_DMA_TODEVICE);
if (info->tx_control.flags & IEEE80211_TXCTL_REQ_TX_STATUS) { memset(&tx_status, 0, sizeof(tx_status));
struct ieee80211_tx_status tx_status = {{0}}; skb_pull(skb, sizeof(struct adm8211_tx_hdr));
struct ieee80211_hdr *hdr; memcpy(skb_push(skb, info->hdrlen), skb->cb, info->hdrlen);
size_t hdrlen = info->hdrlen; memcpy(&tx_status.control, &info->tx_control,
sizeof(tx_status.control));
skb_pull(skb, sizeof(struct adm8211_tx_hdr)); if (!(tx_status.control.flags & IEEE80211_TXCTL_NO_ACK)) {
hdr = (struct ieee80211_hdr *)skb_push(skb, hdrlen); if (status & TDES0_STATUS_ES)
memcpy(hdr, skb->cb, hdrlen); tx_status.excessive_retries = 1;
memcpy(&tx_status.control, &info->tx_control, else
sizeof(tx_status.control));
if (!(status & TDES0_STATUS_ES))
tx_status.flags |= IEEE80211_TX_STATUS_ACK; tx_status.flags |= IEEE80211_TX_STATUS_ACK;
ieee80211_tx_status_irqsafe(dev, skb, &tx_status); }
} else ieee80211_tx_status_irqsafe(dev, skb, &tx_status);
dev_kfree_skb_irq(skb);
info->skb = NULL; info->skb = NULL;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment