diff options
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 7bca8e981512..704dd3551fff 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -2976,12 +2976,11 @@ static int b43_op_tx(struct ieee80211_hw *hw, | |||
2976 | 2976 | ||
2977 | if (unlikely(skb->len < 2 + 2 + 6)) { | 2977 | if (unlikely(skb->len < 2 + 2 + 6)) { |
2978 | /* Too short, this can't be a valid frame. */ | 2978 | /* Too short, this can't be a valid frame. */ |
2979 | dev_kfree_skb_any(skb); | 2979 | goto drop_packet; |
2980 | return NETDEV_TX_OK; | ||
2981 | } | 2980 | } |
2982 | B43_WARN_ON(skb_shinfo(skb)->nr_frags); | 2981 | B43_WARN_ON(skb_shinfo(skb)->nr_frags); |
2983 | if (unlikely(!dev)) | 2982 | if (unlikely(!dev)) |
2984 | return NETDEV_TX_BUSY; | 2983 | goto drop_packet; |
2985 | 2984 | ||
2986 | /* Transmissions on seperate queues can run concurrently. */ | 2985 | /* Transmissions on seperate queues can run concurrently. */ |
2987 | read_lock_irqsave(&wl->tx_lock, flags); | 2986 | read_lock_irqsave(&wl->tx_lock, flags); |
@@ -2997,7 +2996,12 @@ static int b43_op_tx(struct ieee80211_hw *hw, | |||
2997 | read_unlock_irqrestore(&wl->tx_lock, flags); | 2996 | read_unlock_irqrestore(&wl->tx_lock, flags); |
2998 | 2997 | ||
2999 | if (unlikely(err)) | 2998 | if (unlikely(err)) |
3000 | return NETDEV_TX_BUSY; | 2999 | goto drop_packet; |
3000 | return NETDEV_TX_OK; | ||
3001 | |||
3002 | drop_packet: | ||
3003 | /* We can not transmit this packet. Drop it. */ | ||
3004 | dev_kfree_skb_any(skb); | ||
3001 | return NETDEV_TX_OK; | 3005 | return NETDEV_TX_OK; |
3002 | } | 3006 | } |
3003 | 3007 | ||