From: Vasanthakumar Thiagarajan Date: Thu, 26 Apr 2012 14:56:13 +0000 (+0530) Subject: ath6kl: Update netstats for some of the tx failrues in ath6kl_data_tx() X-Git-Tag: v3.6-rc1~125^2~57^2~287^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1881ced5963520154aebb616ad7b2ff9c2c7f012;p=platform%2Fkernel%2Flinux-exynos.git ath6kl: Update netstats for some of the tx failrues in ath6kl_data_tx() There are few cases where the tx skb is dropped but netstats is not updated, fix this. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index 82f2f5c..67206ae 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c @@ -362,15 +362,11 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev) skb, skb->data, skb->len); /* If target is not associated */ - if (!test_bit(CONNECTED, &vif->flags)) { - dev_kfree_skb(skb); - return 0; - } + if (!test_bit(CONNECTED, &vif->flags)) + goto fail_tx; - if (WARN_ON_ONCE(ar->state != ATH6KL_STATE_ON)) { - dev_kfree_skb(skb); - return 0; - } + if (WARN_ON_ONCE(ar->state != ATH6KL_STATE_ON)) + goto fail_tx; if (!test_bit(WMI_READY, &ar->flag)) goto fail_tx;