aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/recv.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2013-08-13 23:41:17 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-08-15 16:08:04 -0400
commita5525d9c8246cad653858044ccfd8a16143e84f6 (patch)
tree1f182dd3e1fc54cdd4cddd2bc657e38588307466 /drivers/net/wireless/ath/ath9k/recv.c
parent5e85a32aca03aba3ce7e7123943b4529d2969a95 (diff)
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 <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/recv.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/recv.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 2d0017cc2ee2..823b4111e282 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,
1119 rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL; 1119 rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;
1120 1120
1121 sc->rx.discard_next = false; 1121 sc->rx.discard_next = false;
1122
1123#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
1124 if (ieee80211_is_data_present(hdr->frame_control) &&
1125 !ieee80211_is_qos_nullfunc(hdr->frame_control))
1126 sc->rx.num_pkts++;
1127#endif
1128
1122 return 0; 1129 return 0;
1123} 1130}
1124 1131
@@ -1267,10 +1274,6 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
1267 hdr = (struct ieee80211_hdr *) (hdr_skb->data + 1274 hdr = (struct ieee80211_hdr *) (hdr_skb->data +
1268 ah->caps.rx_status_len); 1275 ah->caps.rx_status_len);
1269 1276
1270 if (ieee80211_is_data_present(hdr->frame_control) &&
1271 !ieee80211_is_qos_nullfunc(hdr->frame_control))
1272 sc->rx.num_pkts++;
1273
1274 rxs = IEEE80211_SKB_RXCB(hdr_skb); 1277 rxs = IEEE80211_SKB_RXCB(hdr_skb);
1275 memset(rxs, 0, sizeof(struct ieee80211_rx_status)); 1278 memset(rxs, 0, sizeof(struct ieee80211_rx_status));
1276 1279