aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi
diff options
context:
space:
mode:
authorMike McCormack <mikem@ring3k.org>2011-06-06 10:12:53 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-06-10 14:26:51 -0400
commit14058adddd4fd40e45c434c801e8ed8baf09251e (patch)
tree53c1ec53eb6441ec23725fb301bb26d3ec13932a /drivers/net/wireless/rtlwifi
parent8db8ddf13dda0fc96937bcb6e10563e7b9a20387 (diff)
rtlwifi: Free skb in one place
Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi')
-rw-r--r--drivers/net/wireless/rtlwifi/pci.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index c89d6d740adc..b60c1abb1a39 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -727,11 +727,9 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
727 (rtlpriv->rtlhal.current_bandtype == BAND_ON_2_4G) && 727 (rtlpriv->rtlhal.current_bandtype == BAND_ON_2_4G) &&
728 (ieee80211_is_beacon(fc) || 728 (ieee80211_is_beacon(fc) ||
729 ieee80211_is_probe_resp(fc))) { 729 ieee80211_is_probe_resp(fc))) {
730 dev_kfree_skb_any(skb); 730 ;
731 } else { 731 } else {
732 if (unlikely(!rtl_action_proc(hw, skb, false))) { 732 if (likely(rtl_action_proc(hw, skb, false))) {
733 dev_kfree_skb_any(skb);
734 } else {
735 struct sk_buff *uskb = NULL; 733 struct sk_buff *uskb = NULL;
736 u8 *pdata; 734 u8 *pdata;
737 uskb = dev_alloc_skb(skb->len + 128); 735 uskb = dev_alloc_skb(skb->len + 128);
@@ -739,7 +737,6 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
739 &rx_status, sizeof(rx_status)); 737 &rx_status, sizeof(rx_status));
740 pdata = (u8 *)skb_put(uskb, skb->len); 738 pdata = (u8 *)skb_put(uskb, skb->len);
741 memcpy(pdata, skb->data, skb->len); 739 memcpy(pdata, skb->data, skb->len);
742 dev_kfree_skb_any(skb);
743 740
744 ieee80211_rx_irqsafe(hw, uskb); 741 ieee80211_rx_irqsafe(hw, uskb);
745 } 742 }
@@ -751,6 +748,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
751 tasklet_schedule(&rtlpriv->works.ips_leave_tasklet); 748 tasklet_schedule(&rtlpriv->works.ips_leave_tasklet);
752 } 749 }
753 750
751 dev_kfree_skb_any(skb);
754 skb = new_skb; 752 skb = new_skb;
755 753
756 rtlpci->rx_ring[rx_queue_idx].rx_buf[index] = skb; 754 rtlpci->rx_ring[rx_queue_idx].rx_buf[index] = skb;