Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>

authored by

Vasanthakumar Thiagarajan and committed by
Kalle Valo
1881ced5 096797ab

+4 -8
+4 -8
drivers/net/wireless/ath/ath6kl/txrx.c
··· 362 362 skb, skb->data, skb->len); 363 363 364 364 /* If target is not associated */ 365 - if (!test_bit(CONNECTED, &vif->flags)) { 366 - dev_kfree_skb(skb); 367 - return 0; 368 - } 365 + if (!test_bit(CONNECTED, &vif->flags)) 366 + goto fail_tx; 369 367 370 - if (WARN_ON_ONCE(ar->state != ATH6KL_STATE_ON)) { 371 - dev_kfree_skb(skb); 372 - return 0; 373 - } 368 + if (WARN_ON_ONCE(ar->state != ATH6KL_STATE_ON)) 369 + goto fail_tx; 374 370 375 371 if (!test_bit(WMI_READY, &ar->flag)) 376 372 goto fail_tx;