Skip to contentSkip to conversation

ath10k pending patches

PATCH Superseded Sujith Manoharan 2 participants 9 messages May 1, 2013 – May 3, 2013 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

v2 cover ath10k pending patches

From: Sujith Manoharan <[email protected]>

Hi,

Pending patches, rebased over HEAD. I've dropped the txrx.c merge and mac.h removal patches, rebasing them was messy.

Sujith

Sujith Manoharan (5):
ath10k: Remove unneeded locks during HTT RX attach
ath10k: Fix mpdu spacing to 8us
ath10k: Fix TXOP handling
ath10k: Move debug structures to debug.h
ath10k: Add host statistics

 drivers/net/wireless/ath/ath10k/core.h   |  76 +--------------------
 drivers/net/wireless/ath/ath10k/debug.c  |  55 ++++++++++++++-
 drivers/net/wireless/ath/ath10k/debug.h  |  97 ++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath10k/htt_rx.c | 114 ++++++++++++++++++++++---------
 drivers/net/wireless/ath/ath10k/mac.c    |  20 +++---
 5 files changed, 242 insertions(+), 120 deletions(-)
Signature · 1 line
1.8.2.2
#1 lore raw

PATCH v2 1/5 ath10k: Remove unneeded locks during HTT RX attach

From: Sujith Manoharan <[email protected]>

Fix two issues:

* Bail out properly when RX buffer allocation fails at init time.
* Do not acquire the rx ring lock during attach() since we don't rearm the replenish timer.

---
 drivers/net/wireless/ath/ath10k/htt_rx.c | 84 ++++++++++++++++++++++----------
 1 file changed, 57 insertions(+), 27 deletions(-)
drivers/net/wireless/ath/ath10k/htt_rx.c +57 -27
index 1bd1589..cdedc5f 100644
@@ -101,30 +101,36 @@ static int ath10k_htt_rx_ring_fill_level(struct ath10k_htt *htt)
 	return size;
 }
 
-static void ath10k_htt_rx_ring_fill_n(struct ath10k_htt *htt, int num)
+static void ath10k_htt_rx_ring_free(struct ath10k_htt *htt)
+{
+	struct sk_buff *skb;
+	struct ath10k_skb_cb *cb;
+	int i;
+
+	for (i = 0; i < htt->rx_ring.fill_cnt; i++) {
+		skb = htt->rx_ring.netbufs_ring[i];
+		cb = ATH10K_SKB_CB(skb);
+		dma_unmap_single(htt->ar->dev, cb->paddr,
+				 skb->len + skb_tailroom(skb),
+				 DMA_FROM_DEVICE);
+		dev_kfree_skb_any(skb);
+	}
+
+	htt->rx_ring.fill_cnt = 0;
+}
+
+static int __ath10k_htt_rx_ring_fill_n(struct ath10k_htt *htt, int num)
 {
 	struct htt_rx_desc *rx_desc;
-	unsigned long timeout;
 	struct sk_buff *skb;
 	dma_addr_t paddr;
-	int idx;
-
-	lockdep_assert_held(&htt->rx_ring.lock);
+	int ret = 0, idx;
 
 	idx = __le32_to_cpu(*(htt->rx_ring.alloc_idx.vaddr));
 	while (num > 0) {
 		skb = dev_alloc_skb(HTT_RX_BUF_SIZE + HTT_RX_DESC_ALIGN);
 		if (!skb) {
-			/*
-			 * Failed to fill it to the desired level -
-			 * we'll start a timer and try again next time.
-			 * As long as enough buffers are left in the ring for
-			 * another A-MPDU rx, no special recovery is needed.
-			 */
-			timeout = jiffies +
-				msecs_to_jiffies(HTT_RX_RING_REFILL_RETRY_MS);
-			mod_timer(&htt->rx_ring.refill_retry_timer,
-				  timeout);
+			ret = -ENOMEM;
 			goto fail;
 		}
 
@@ -143,6 +149,7 @@ static void ath10k_htt_rx_ring_fill_n(struct ath10k_htt *htt, int num)
 
 		if (unlikely(dma_mapping_error(htt->ar->dev, paddr))) {
 			dev_kfree_skb_any(skb);
+			ret = -ENOMEM;
 			goto fail;
 		}
 
@@ -158,16 +165,32 @@ static void ath10k_htt_rx_ring_fill_n(struct ath10k_htt *htt, int num)
 
 fail:
 	*(htt->rx_ring.alloc_idx.vaddr) = __cpu_to_le32(idx);
-	return;
+	return ret;
+}
+
+static int ath10k_htt_rx_ring_fill_n(struct ath10k_htt *htt, int num)
+{
+	lockdep_assert_held(&htt->rx_ring.lock);
+	return __ath10k_htt_rx_ring_fill_n(htt, num);
 }
 
 static void ath10k_htt_rx_msdu_buff_replenish(struct ath10k_htt *htt)
 {
-	int num_to_fill;
+	int ret, num_to_fill;
 
 	spin_lock_bh(&htt->rx_ring.lock);
 	num_to_fill = htt->rx_ring.fill_level - htt->rx_ring.fill_cnt;
-	ath10k_htt_rx_ring_fill_n(htt, num_to_fill);
+	ret = ath10k_htt_rx_ring_fill_n(htt, num_to_fill);
+	if (ret == -ENOMEM) {
+		/*
+		 * Failed to fill it to the desired level -
+		 * we'll start a timer and try again next time.
+		 * As long as enough buffers are left in the ring for
+		 * another A-MPDU rx, no special recovery is needed.
+		 */
+		mod_timer(&htt->rx_ring.refill_retry_timer, jiffies +
+			  msecs_to_jiffies(HTT_RX_RING_REFILL_RETRY_MS));
+	}
 	spin_unlock_bh(&htt->rx_ring.lock);
 }
 
@@ -446,13 +469,13 @@ int ath10k_htt_rx_attach(struct ath10k_htt *htt)
 		kmalloc(htt->rx_ring.size * sizeof(struct sk_buff *),
 			GFP_KERNEL);
 	if (!htt->rx_ring.netbufs_ring)
-		goto fail1;
+		goto err_netbuf;
 
 	vaddr = dma_alloc_coherent(htt->ar->dev,
 		   (htt->rx_ring.size * sizeof(htt->rx_ring.paddrs_ring)),
 		   &paddr, GFP_DMA);
 	if (!vaddr)
-		goto fail2;
+		goto err_dma_ring;
 
 	htt->rx_ring.paddrs_ring = vaddr;
 	htt->rx_ring.base_paddr = paddr;
@@ -461,7 +484,7 @@ int ath10k_htt_rx_attach(struct ath10k_htt *htt)
 				   sizeof(*htt->rx_ring.alloc_idx.vaddr),
 				   &paddr, GFP_DMA);
 	if (!vaddr)
-		goto fail3;
+		goto err_dma_idx;
 
 	htt->rx_ring.alloc_idx.vaddr = vaddr;
 	htt->rx_ring.alloc_idx.paddr = paddr;
@@ -472,23 +495,30 @@ int ath10k_htt_rx_attach(struct ath10k_htt *htt)
 	setup_timer(timer, ath10k_htt_rx_ring_refill_retry, (unsigned long)htt);
 
 	spin_lock_init(&htt->rx_ring.lock);
-	spin_lock_bh(&htt->rx_ring.lock);
+
 	htt->rx_ring.fill_cnt = 0;
-	ath10k_htt_rx_ring_fill_n(htt, htt->rx_ring.fill_level);
-	spin_unlock_bh(&htt->rx_ring.lock);
+	if (__ath10k_htt_rx_ring_fill_n(htt, htt->rx_ring.fill_level))
+		goto err_fill_ring;
 
 	ath10k_dbg(ATH10K_DBG_HTT, "HTT RX ring size: %d, fill_level: %d\n",
 		   htt->rx_ring.size, htt->rx_ring.fill_level);
 	return 0;
-fail3:
+
+err_fill_ring:
+	ath10k_htt_rx_ring_free(htt);
+	dma_free_coherent(htt->ar->dev,
+			  sizeof(*htt->rx_ring.alloc_idx.vaddr),
+			  htt->rx_ring.alloc_idx.vaddr,
+			  htt->rx_ring.alloc_idx.paddr);
+err_dma_idx:
 	dma_free_coherent(htt->ar->dev,
 			  (htt->rx_ring.size *
 			   sizeof(htt->rx_ring.paddrs_ring)),
 			  htt->rx_ring.paddrs_ring,
 			  htt->rx_ring.base_paddr);
-fail2:
+err_dma_ring:
 	kfree(htt->rx_ring.netbufs_ring);
-fail1:
+err_netbuf:
 	return -ENOMEM;
 }
 
Signature · 1 line
1.8.2.2
#2 lore raw

PATCH v2 1/5 ath10k: Remove unneeded locks during HTT RX attach

Quoted 9 lines · Sujith Manoharan

From: Sujith Manoharan <[email protected]>

Fix two issues:

* Bail out properly when RX buffer allocation fails at init time.
* Do not acquire the rx ring lock during attach() since we don't rearm the replenish timer.

AFAICS this is already applied.

Signature · 1 line
Kalle Valo
#3 lore raw

PATCH v2 2/5 ath10k: Fix mpdu spacing to 8us

In reply to Sujith Manoharan

From: Sujith Manoharan <[email protected]>

The FW doesn't fill the mpdu density field in the HT capabilities received in the service_ready event and the host driver ends up advertising 0 in its capabilities.

Fix this by hard-coding the spacing time to 8us.

---
 drivers/net/wireless/ath/ath10k/mac.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
drivers/net/wireless/ath/ath10k/mac.c +1 -10
index e654804..93fe03f 100644
@@ -2571,6 +2571,7 @@ static struct ieee80211_sta_ht_cap ath10k_get_ht_cap(struct ath10k *ar)
 
 	ht_cap.ht_supported = 1;
 	ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
+	ht_cap.ampdu_density = IEEE80211_HT_MPDU_DENSITY_8;
 	ht_cap.cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
 	ht_cap.cap |= IEEE80211_HT_CAP_DSSSCCK40;
 	ht_cap.cap |= WLAN_HT_CAP_SM_PS_STATIC << IEEE80211_HT_CAP_SM_PS_SHIFT;
@@ -2611,16 +2612,6 @@ static struct ieee80211_sta_ht_cap ath10k_get_ht_cap(struct ath10k *ar)
 	if (ar->ht_cap_info & WMI_HT_CAP_L_SIG_TXOP_PROT)
 		ht_cap.cap |= IEEE80211_HT_CAP_LSIG_TXOP_PROT;
 
-	if (ar->ht_cap_info & WMI_HT_CAP_MPDU_DENSITY) {
-		u32 density;
-
-		density   = ar->ht_cap_info;
-		density  &= WMI_HT_CAP_MPDU_DENSITY;
-		density >>= WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT;
-
-		ht_cap.ampdu_density = density;
-	}
-
 	/* max AMSDU is implicitly taken from vht_cap_info */
 	if (ar->vht_cap_info & WMI_VHT_CAP_MAX_MPDU_LEN_MASK)
 		ht_cap.cap |= IEEE80211_HT_CAP_MAX_AMSDU;
Signature · 1 line
1.8.2.2
#4 lore raw

PATCH v2 3/5 ath10k: Fix TXOP handling

In reply to Sujith Manoharan

From: Sujith Manoharan <[email protected]>

The channel time duration programmed in the HW is in absolute microseconds, while mac80211 gives the txop in units of 32 microseconds. Handle this properly.

---
 drivers/net/wireless/ath/ath10k/mac.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/mac.c +8 -1
index 93fe03f..d280463 100644
@@ -2221,7 +2221,14 @@ static int ath10k_conf_tx(struct ieee80211_hw *hw,
 	p->cwmin = params->cw_min;
 	p->cwmax = params->cw_max;
 	p->aifs = params->aifs;
-	p->txop = params->txop;
+
+	/*
+	 * The channel time duration programmed in the HW is in absolute
+	 * microseconds, while mac80211 gives the txop in units of
+	 * 32 microseconds.
+	 */
+	p->txop = params->txop * 32;
+
 	/* FIXME: can we pass the params->uapsd to the FW? */
 	/* FIXME: FW accepts wmm params per hw, not per vif */
 
Signature · 1 line
1.8.2.2
#5 lore raw

PATCH v2 4/5 ath10k: Move debug structures to debug.h

In reply to Sujith Manoharan

From: Sujith Manoharan <[email protected]>

---
 drivers/net/wireless/ath/ath10k/core.h  | 76 +--------------------------------
 drivers/net/wireless/ath/ath10k/debug.h | 75 ++++++++++++++++++++++++++++++++
 2 files changed, 76 insertions(+), 75 deletions(-)
drivers/net/wireless/ath/ath10k/core.h +1 -75
index fbf4d11..25ebe3d 100644
@@ -27,6 +27,7 @@
 #include "hw.h"
 #include "targaddrs.h"
 #include "wmi.h"
+#include "debug.h"
 #include "../ath.h"
 #include "../regd.h"
 
@@ -121,72 +122,6 @@ struct ath10k_wmi {
 	struct work_struct wmi_event_work;
 };
 
-struct ath10k_peer_stat {
-	u8 peer_macaddr[ETH_ALEN];
-	u32 peer_rssi;
-	u32 peer_tx_rate;
-};
-
-struct ath10k_target_stats {
-	/* PDEV stats */
-	s32 ch_noise_floor;
-	u32 tx_frame_count;
-	u32 rx_frame_count;
-	u32 rx_clear_count;
-	u32 cycle_count;
-	u32 phy_err_count;
-	u32 chan_tx_power;
-
-	/* PDEV TX stats */
-	s32 comp_queued;
-	s32 comp_delivered;
-	s32 msdu_enqued;
-	s32 mpdu_enqued;
-	s32 wmm_drop;
-	s32 local_enqued;
-	s32 local_freed;
-	s32 hw_queued;
-	s32 hw_reaped;
-	s32 underrun;
-	s32 tx_abort;
-	s32 mpdus_requed;
-	u32 tx_ko;
-	u32 data_rc;
-	u32 self_triggers;
-	u32 sw_retry_failure;
-	u32 illgl_rate_phy_err;
-	u32 pdev_cont_xretry;
-	u32 pdev_tx_timeout;
-	u32 pdev_resets;
-	u32 phy_underrun;
-	u32 txop_ovf;
-
-	/* PDEV RX stats */
-	s32 mid_ppdu_route_change;
-	s32 status_rcvd;
-	s32 r0_frags;
-	s32 r1_frags;
-	s32 r2_frags;
-	s32 r3_frags;
-	s32 htt_msdus;
-	s32 htt_mpdus;
-	s32 loc_msdus;
-	s32 loc_mpdus;
-	s32 oversize_amsdu;
-	s32 phy_errs;
-	s32 phy_err_drop;
-	s32 mpdu_errs;
-
-	/* VDEV STATS */
-
-	/* PEER STATS */
-	u8 peers;
-	struct ath10k_peer_stat peer_stat[TARGET_NUM_PEERS];
-
-	/* TODO: Beacon filter stats */
-
-};
-
 #define ATH10K_MAX_NUM_PEER_IDS (1 << 11) /* htt rx_desc limit */
 
 struct ath10k_peer {
@@ -240,15 +175,6 @@ struct ath10k_vif_iter {
 	struct ath10k_vif *arvif;
 };
 
-struct ath10k_debug {
-	struct dentry *debugfs_phy;
-
-	struct ath10k_target_stats target_stats;
-	u32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
-
-	struct completion event_stats_compl;
-};
-
 struct ath10k {
 	struct ath_common common;
 	struct ieee80211_hw *hw;
drivers/net/wireless/ath/ath10k/debug.h +75 -0

81 lines not on this page · raw message

Signature · 1 line
1.8.2.2
#6 lore raw

PATCH v2 5/5 ath10k: Add host statistics

In reply to Sujith Manoharan

From: Sujith Manoharan <[email protected]>

---
 drivers/net/wireless/ath/ath10k/debug.c  | 55 +++++++++++++++++++++++++++++++-
 drivers/net/wireless/ath/ath10k/debug.h  | 22 +++++++++++++
 drivers/net/wireless/ath/ath10k/htt_rx.c | 30 +++++++++++++----
 3 files changed, 100 insertions(+), 7 deletions(-)
drivers/net/wireless/ath/ath10k/debug.c +54 -1
index 040cdcd..e2f9894 100644
@@ -445,6 +445,58 @@ static const struct file_operations fops_fw_stats = {
 	.llseek = default_llseek,
 };
 
+static ssize_t ath10k_read_host_stats(struct file *file, char __user *user_buf,
+				      size_t count, loff_t *ppos)
+{
+	struct ath10k *ar = file->private_data;
+	struct ath10k_host_stats *host_stats = &ar->debug.host_stats;
+	unsigned int len = 0, buf_len = 1024;
+	char *buf;
+	ssize_t ret_cnt;
+
+	buf = kzalloc(buf_len, GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+
+	len += scnprintf(buf + len, buf_len - len, "%25s %10llu\n",
+			 "HTT RX indication :", host_stats->htt_rx_ind);
+	len += scnprintf(buf + len, buf_len - len, "%25s %10llu\n",
+			 "HTT MSDUs :", host_stats->htt_msdu);
+	len += scnprintf(buf + len, buf_len - len, "%25s %10llu\n",
+			 "HTT A-MSDUs :", host_stats->htt_amsdu);
+	len += scnprintf(buf + len, buf_len - len, "%25s %10llu\n",
+			 "HTT MSDU early :", host_stats->htt_msdu_early);
+	len += scnprintf(buf + len, buf_len - len, "%25s %10llu\n",
+			 "HTT MSDU invalid length :", host_stats->htt_msdu_len_invalid);
+	len += scnprintf(buf + len, buf_len - len, "%25s %10llu\n",
+			 "HTT MSDU zero len :", host_stats->htt_msdu_zero_len);
+	len += scnprintf(buf + len, buf_len - len, "%25s %10llu\n",
+			 "HTT MSDU chained :", host_stats->htt_msdu_chained);
+	len += scnprintf(buf + len, buf_len - len, "%25s %10llu\n",
+			 "HTT MSDU no data :", host_stats->htt_msdu_no_data);
+	len += scnprintf(buf + len, buf_len - len, "%25s %10llu\n",
+			 "HTT decrypt error :", host_stats->htt_decrypt_err);
+	len += scnprintf(buf + len, buf_len - len, "%25s %10llu\n",
+			 "HTT invalid status :", host_stats->htt_invalid_status);
+	len += scnprintf(buf + len, buf_len - len, "%25s %10llu\n",
+			 "HTT FCS error :", host_stats->htt_fcs_err);
+
+	if (len > buf_len)
+		len = buf_len;
+
+	ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len);
+
+	kfree(buf);
+	return ret_cnt;
+}
+
+static const struct file_operations fops_host_stats = {
+	.read = ath10k_read_host_stats,
+	.open = simple_open,
+	.owner = THIS_MODULE,
+	.llseek = default_llseek,
+};
+
 int ath10k_debug_create(struct ath10k *ar)
 {
 	ar->debug.debugfs_phy = debugfs_create_dir("ath10k",
@@ -457,9 +509,10 @@ int ath10k_debug_create(struct ath10k *ar)
 
 	debugfs_create_file("fw_stats", S_IRUSR, ar->debug.debugfs_phy, ar,
 			    &fops_fw_stats);
-
 	debugfs_create_file("wmi_services", S_IRUSR, ar->debug.debugfs_phy, ar,
 			    &fops_wmi_services);
+	debugfs_create_file("host_stats", S_IRUSR, ar->debug.debugfs_phy, ar,
+			    &fops_host_stats);
 
 	return 0;
 }
drivers/net/wireless/ath/ath10k/debug.h +22 -0
index b0549cd..45866ab 100644
@@ -106,9 +106,31 @@ struct ath10k_target_stats {
 
 };
 
+#ifdef CONFIG_ATH10K_DEBUGFS
+#define HOST_STAT_INC(c) ar->debug.host_stats.c++
+#else
+#define HOST_STAT_INC(c) do { } while (0)
+#endif
+
+struct ath10k_host_stats {
+	/* RX */
+	u64 htt_rx_ind;
+	u64 htt_msdu;
+	u64 htt_amsdu;
+	u64 htt_msdu_early;
+	u64 htt_msdu_len_invalid;
+	u64 htt_msdu_zero_len;
+	u64 htt_msdu_chained;
+	u64 htt_msdu_no_data;
+	u64 htt_decrypt_err;
+	u64 htt_invalid_status;
+	u64 htt_fcs_err;
+};
+
 struct ath10k_debug {
 	struct dentry *debugfs_phy;
 
+	struct ath10k_host_stats host_stats;
 	struct ath10k_target_stats target_stats;
 	u32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
 
drivers/net/wireless/ath/ath10k/htt_rx.c +24 -6
index cdedc5f..b222edf 100644
@@ -277,6 +277,7 @@ static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt,
 				   struct sk_buff **head_msdu,
 				   struct sk_buff **tail_msdu)
 {
+	struct ath10k *ar = htt->ar;
 	int msdu_len, msdu_chaining = 0;
 	struct sk_buff *msdu;
 	struct htt_rx_desc *rx_desc;
@@ -317,7 +318,8 @@ static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt,
 		 * just assert for now until we have a way to recover.
 		 */
 		if (!(__le32_to_cpu(rx_desc->attention.flags)
-				& RX_ATTENTION_FLAGS_MSDU_DONE)) {
+		      & RX_ATTENTION_FLAGS_MSDU_DONE)) {
+			HOST_STAT_INC(htt_msdu_early);
 			ath10k_htt_rx_free_msdu_chain(*head_msdu);
 			*head_msdu = NULL;
 			msdu = NULL;
@@ -369,14 +371,19 @@ static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt,
 		}
 
 		msdu_len_invalid = !!(__le32_to_cpu(rx_desc->attention.flags)
-					& (RX_ATTENTION_FLAGS_MPDU_LENGTH_ERR |
-					   RX_ATTENTION_FLAGS_MSDU_LENGTH_ERR));
+				      & (RX_ATTENTION_FLAGS_MPDU_LENGTH_ERR |
+					 RX_ATTENTION_FLAGS_MSDU_LENGTH_ERR));
 		msdu_len = MS(__le32_to_cpu(rx_desc->msdu_start.info0),
 			      RX_MSDU_START_INFO0_MSDU_LENGTH);
 		msdu_chained = rx_desc->frag_info.ring2_more_count;
 
-		if (msdu_len_invalid)
+		if (msdu_chained)
+			HOST_STAT_INC(htt_msdu_chained);
+
+		if (msdu_len_invalid) {
+			HOST_STAT_INC(htt_msdu_len_invalid);
 			msdu_len = 0;
+		}
 
 		skb_trim(msdu, 0);
 		skb_put(msdu, min(msdu_len, HTT_RX_MSDU_SIZE));
@@ -799,6 +806,7 @@ static bool ath10k_htt_rx_has_fcs_err(struct sk_buff *skb)
 static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
 				  struct htt_rx_indication *rx)
 {
+	struct ath10k *ar = htt->ar;
 	struct htt_rx_info info;
 	struct htt_rx_indication_mpdu_range *mpdu_ranges;
 	struct ieee80211_hdr *hdr;
@@ -808,6 +816,8 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
 	int i, j;
 	int ret;
 
+	HOST_STAT_INC(htt_rx_ind);
+
 	memset(&info, 0, sizeof(info));
 
 	fw_desc_len = __le16_to_cpu(rx->prefix.fw_rx_desc_bytes);
@@ -839,11 +849,13 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
 							 &msdu_tail);
 
 			if (!msdu_head) {
+				HOST_STAT_INC(htt_msdu_no_data);
 				ath10k_warn("htt rx no data!\n");
 				continue;
 			}
 
 			if (msdu_head->len == 0) {
+				HOST_STAT_INC(htt_msdu_zero_len);
 				ath10k_dbg(ATH10K_DBG_HTT,
 					   "htt rx dropping due to zero-len\n");
 				ath10k_htt_rx_free_msdu_chain(msdu_head);
@@ -851,6 +863,7 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
 			}
 
 			if (ath10k_htt_rx_has_decrypt_err(msdu_head)) {
+				HOST_STAT_INC(htt_decrypt_err);
 				ath10k_htt_rx_free_msdu_chain(msdu_head);
 				continue;
 			}
@@ -866,6 +879,7 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
 			if (status != HTT_RX_IND_MPDU_STATUS_OK &&
 			    status != HTT_RX_IND_MPDU_STATUS_TKIP_MIC_ERR &&
 			    !htt->ar->monitor_enabled) {
+				HOST_STAT_INC(htt_invalid_status);
 				ath10k_dbg(ATH10K_DBG_HTT,
 					   "htt rx ignoring frame w/ status %d\n",
 					   status);
@@ -892,12 +906,16 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
 
 			hdr = ath10k_htt_rx_skb_get_hdr(msdu_head);
 
-			if (ath10k_htt_rx_hdr_is_amsdu(hdr))
+			if (ath10k_htt_rx_hdr_is_amsdu(hdr)) {
+				HOST_STAT_INC(htt_amsdu);
 				ret = ath10k_htt_rx_amsdu(htt, &info);
-			else
+			} else {
+				HOST_STAT_INC(htt_msdu);
 				ret = ath10k_htt_rx_msdu(htt, &info);
+			}
 
 			if (ret && !info.fcs_err) {
+				HOST_STAT_INC(htt_fcs_err);
 				ath10k_warn("error processing msdus %d\n", ret);
 				dev_kfree_skb_any(info.skb);
 				continue;
Signature · 1 line
1.8.2.2
#7 lore raw

v2 cover ath10k pending patches

In reply to Sujith Manoharan
Quoted 7 lines · Sujith Manoharan

From: Sujith Manoharan <[email protected]>

Hi,

Pending patches, rebased over HEAD. I've dropped the txrx.c merge and mac.h removal patches, rebasing them was messy.

Quoted 8 lines

Sujith

Sujith Manoharan (5):
ath10k: Remove unneeded locks during HTT RX attach
ath10k: Fix mpdu spacing to 8us
ath10k: Fix TXOP handling
ath10k: Move debug structures to debug.h
ath10k: Add host statistics

Patch 2 applied. Patches 1 and 3 already applied. Patches 4 and 5 I send feedback already before.

Signature · 1 line
Kalle Valo
#8 lore raw

v2 cover ath10k pending patches

Quoted 2 lines · Kalle Valo

Patch 2 applied. Patches 1 and 3 already applied. Patches 4 and 5 I send feedback already before.

I can send an updated for patch-5, but it is on top of patch-4. I have replied to your feedback for patch-4.

Sujith