From: Sujith Manoharan Date: Wed, 14 Aug 2013 03:41:17 +0000 (+0530) Subject: ath9k: Fix RX packet counter X-Git-Tag: upstream/snapshot3+hdmi~4422^2~84^2^2~79 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5525d9c8246cad653858044ccfd8a16143e84f6;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ath9k: Fix RX packet counter Handle chained descriptors and increment the RX counter only for valid packets. Since this is used only by MCI, use CONFIG_ATH9K_BTCOEX_SUPPORT. Signed-off-by: Sujith Manoharan Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 2d0017c..823b411 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -1119,6 +1119,13 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc, rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL; sc->rx.discard_next = false; + +#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT + if (ieee80211_is_data_present(hdr->frame_control) && + !ieee80211_is_qos_nullfunc(hdr->frame_control)) + sc->rx.num_pkts++; +#endif + return 0; } @@ -1267,10 +1274,6 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) hdr = (struct ieee80211_hdr *) (hdr_skb->data + ah->caps.rx_status_len); - if (ieee80211_is_data_present(hdr->frame_control) && - !ieee80211_is_qos_nullfunc(hdr->frame_control)) - sc->rx.num_pkts++; - rxs = IEEE80211_SKB_RXCB(hdr_skb); memset(rxs, 0, sizeof(struct ieee80211_rx_status));