diff options
Diffstat (limited to 'drivers/net/wireless/adm8211.c')
-rw-r--r-- | drivers/net/wireless/adm8211.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c index 9a1e0c514c08..b96ebfe4ef3e 100644 --- a/drivers/net/wireless/adm8211.c +++ b/drivers/net/wireless/adm8211.c | |||
@@ -341,15 +341,14 @@ static void adm8211_interrupt_tci(struct ieee80211_hw *dev) | |||
341 | pci_unmap_single(priv->pdev, info->mapping, | 341 | pci_unmap_single(priv->pdev, info->mapping, |
342 | info->skb->len, PCI_DMA_TODEVICE); | 342 | info->skb->len, PCI_DMA_TODEVICE); |
343 | 343 | ||
344 | memset(&txi->status, 0, sizeof(txi->status)); | 344 | ieee80211_tx_info_clear_status(txi); |
345 | |||
345 | skb_pull(skb, sizeof(struct adm8211_tx_hdr)); | 346 | skb_pull(skb, sizeof(struct adm8211_tx_hdr)); |
346 | memcpy(skb_push(skb, info->hdrlen), skb->cb, info->hdrlen); | 347 | memcpy(skb_push(skb, info->hdrlen), skb->cb, info->hdrlen); |
347 | if (!(txi->flags & IEEE80211_TX_CTL_NO_ACK)) { | 348 | if (!(txi->flags & IEEE80211_TX_CTL_NO_ACK) && |
348 | if (status & TDES0_STATUS_ES) | 349 | !(status & TDES0_STATUS_ES)) |
349 | txi->status.excessive_retries = 1; | 350 | txi->flags |= IEEE80211_TX_STAT_ACK; |
350 | else | 351 | |
351 | txi->flags |= IEEE80211_TX_STAT_ACK; | ||
352 | } | ||
353 | ieee80211_tx_status_irqsafe(dev, skb); | 352 | ieee80211_tx_status_irqsafe(dev, skb); |
354 | 353 | ||
355 | info->skb = NULL; | 354 | info->skb = NULL; |
@@ -1691,8 +1690,10 @@ static int adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
1691 | struct ieee80211_hdr *hdr; | 1690 | struct ieee80211_hdr *hdr; |
1692 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 1691 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
1693 | struct ieee80211_rate *txrate = ieee80211_get_tx_rate(dev, info); | 1692 | struct ieee80211_rate *txrate = ieee80211_get_tx_rate(dev, info); |
1693 | u8 rc_flags; | ||
1694 | 1694 | ||
1695 | short_preamble = !!(txrate->flags & IEEE80211_TX_CTL_SHORT_PREAMBLE); | 1695 | rc_flags = info->control.rates[0].flags; |
1696 | short_preamble = !!(rc_flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE); | ||
1696 | plcp_signal = txrate->bitrate; | 1697 | plcp_signal = txrate->bitrate; |
1697 | 1698 | ||
1698 | hdr = (struct ieee80211_hdr *)skb->data; | 1699 | hdr = (struct ieee80211_hdr *)skb->data; |
@@ -1724,10 +1725,10 @@ static int adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
1724 | if (short_preamble) | 1725 | if (short_preamble) |
1725 | txhdr->header_control |= cpu_to_le16(ADM8211_TXHDRCTL_SHORT_PREAMBLE); | 1726 | txhdr->header_control |= cpu_to_le16(ADM8211_TXHDRCTL_SHORT_PREAMBLE); |
1726 | 1727 | ||
1727 | if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) | 1728 | if (rc_flags & IEEE80211_TX_RC_USE_RTS_CTS) |
1728 | txhdr->header_control |= cpu_to_le16(ADM8211_TXHDRCTL_ENABLE_RTS); | 1729 | txhdr->header_control |= cpu_to_le16(ADM8211_TXHDRCTL_ENABLE_RTS); |
1729 | 1730 | ||
1730 | txhdr->retry_limit = info->control.retry_limit; | 1731 | txhdr->retry_limit = info->control.rates[0].count; |
1731 | 1732 | ||
1732 | adm8211_tx_raw(dev, skb, plcp_signal, hdrlen); | 1733 | adm8211_tx_raw(dev, skb, plcp_signal, hdrlen); |
1733 | 1734 | ||