diff options
-rw-r--r-- | drivers/net/wireless/ath5k/base.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 6580df2f7443..5d57d774e466 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -2562,7 +2562,7 @@ ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
2562 | if (skb_headroom(skb) < padsize) { | 2562 | if (skb_headroom(skb) < padsize) { |
2563 | ATH5K_ERR(sc, "tx hdrlen not %%4: %d not enough" | 2563 | ATH5K_ERR(sc, "tx hdrlen not %%4: %d not enough" |
2564 | " headroom to pad %d\n", hdrlen, padsize); | 2564 | " headroom to pad %d\n", hdrlen, padsize); |
2565 | return NETDEV_TX_BUSY; | 2565 | goto drop_packet; |
2566 | } | 2566 | } |
2567 | skb_push(skb, padsize); | 2567 | skb_push(skb, padsize); |
2568 | memmove(skb->data, skb->data+padsize, hdrlen); | 2568 | memmove(skb->data, skb->data+padsize, hdrlen); |
@@ -2573,7 +2573,7 @@ ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
2573 | ATH5K_ERR(sc, "no further txbuf available, dropping packet\n"); | 2573 | ATH5K_ERR(sc, "no further txbuf available, dropping packet\n"); |
2574 | spin_unlock_irqrestore(&sc->txbuflock, flags); | 2574 | spin_unlock_irqrestore(&sc->txbuflock, flags); |
2575 | ieee80211_stop_queue(hw, skb_get_queue_mapping(skb)); | 2575 | ieee80211_stop_queue(hw, skb_get_queue_mapping(skb)); |
2576 | return NETDEV_TX_BUSY; | 2576 | goto drop_packet; |
2577 | } | 2577 | } |
2578 | bf = list_first_entry(&sc->txbuf, struct ath5k_buf, list); | 2578 | bf = list_first_entry(&sc->txbuf, struct ath5k_buf, list); |
2579 | list_del(&bf->list); | 2579 | list_del(&bf->list); |
@@ -2590,10 +2590,12 @@ ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
2590 | list_add_tail(&bf->list, &sc->txbuf); | 2590 | list_add_tail(&bf->list, &sc->txbuf); |
2591 | sc->txbuf_len++; | 2591 | sc->txbuf_len++; |
2592 | spin_unlock_irqrestore(&sc->txbuflock, flags); | 2592 | spin_unlock_irqrestore(&sc->txbuflock, flags); |
2593 | dev_kfree_skb_any(skb); | 2593 | goto drop_packet; |
2594 | return NETDEV_TX_OK; | ||
2595 | } | 2594 | } |
2595 | return NETDEV_TX_OK; | ||
2596 | 2596 | ||
2597 | drop_packet: | ||
2598 | dev_kfree_skb_any(skb); | ||
2597 | return NETDEV_TX_OK; | 2599 | return NETDEV_TX_OK; |
2598 | } | 2600 | } |
2599 | 2601 | ||