diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-06-10 14:26:12 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-10 14:26:12 -0400 |
commit | c48b1f729a75880d0895f0b23efaf551ee800a35 (patch) | |
tree | 167e974268f2979ffe7215755014d7e197fe9d02 /drivers/net/wireless/rtlwifi | |
parent | 448f2627c169092d2091a1be22feb6a7775f6201 (diff) | |
parent | 51e65257142a87fe46a1ce5c35c86c5baf012614 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
drivers/net/wireless/rtlwifi/pci.c
Diffstat (limited to 'drivers/net/wireless/rtlwifi')
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index fc44005b0d53..e502db0532e5 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -670,6 +670,19 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
670 | &rx_status, | 670 | &rx_status, |
671 | (u8 *) pdesc, skb); | 671 | (u8 *) pdesc, skb); |
672 | 672 | ||
673 | new_skb = dev_alloc_skb(rtlpci->rxbuffersize); | ||
674 | if (unlikely(!new_skb)) { | ||
675 | RT_TRACE(rtlpriv, (COMP_INTR | COMP_RECV), | ||
676 | DBG_DMESG, | ||
677 | ("can't alloc skb for rx\n")); | ||
678 | goto done; | ||
679 | } | ||
680 | |||
681 | pci_unmap_single(rtlpci->pdev, | ||
682 | *((dma_addr_t *) skb->cb), | ||
683 | rtlpci->rxbuffersize, | ||
684 | PCI_DMA_FROMDEVICE); | ||
685 | |||
673 | skb_put(skb, rtlpriv->cfg->ops->get_desc((u8 *) pdesc, | 686 | skb_put(skb, rtlpriv->cfg->ops->get_desc((u8 *) pdesc, |
674 | false, | 687 | false, |
675 | HW_DESC_RXPKT_LEN)); | 688 | HW_DESC_RXPKT_LEN)); |
@@ -686,21 +699,6 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
686 | hdr = rtl_get_hdr(skb); | 699 | hdr = rtl_get_hdr(skb); |
687 | fc = rtl_get_fc(skb); | 700 | fc = rtl_get_fc(skb); |
688 | 701 | ||
689 | /* try for new buffer - if allocation fails, drop | ||
690 | * frame and reuse old buffer | ||
691 | */ | ||
692 | new_skb = dev_alloc_skb(rtlpci->rxbuffersize); | ||
693 | if (unlikely(!new_skb)) { | ||
694 | RT_TRACE(rtlpriv, (COMP_INTR | COMP_RECV), | ||
695 | DBG_DMESG, | ||
696 | ("can't alloc skb for rx\n")); | ||
697 | goto done; | ||
698 | } | ||
699 | pci_unmap_single(rtlpci->pdev, | ||
700 | *((dma_addr_t *) skb->cb), | ||
701 | rtlpci->rxbuffersize, | ||
702 | PCI_DMA_FROMDEVICE); | ||
703 | |||
704 | if (!stats.crc && !stats.hwerror) { | 702 | if (!stats.crc && !stats.hwerror) { |
705 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, | 703 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, |
706 | sizeof(rx_status)); | 704 | sizeof(rx_status)); |