diff mbox series

[1/8] ath11k: add RX stats support for radiotap

Message ID 0101016ea36bc1e7-b9c8f0c1-9781-4920-afa0-45684e8754cc-000000@us-west-2.amazonses.com (mailing list archive)
State Accepted
Commit e4eb7b5c335ccfdb5c2a9a2004aca7cb81e0d577
Delegated to: Kalle Valo
Headers show
Series ath11k: first round of post-bringup patches | expand

Commit Message

Kalle Valo Nov. 25, 2019, 4:36 p.m. UTC
From: John Crispin <john@phrozen.org>

mac80211 expects the definition of what HE rate info is available inside a
struct prepended to the skb.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/dp_rx.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Kalle Valo Nov. 27, 2019, 3:47 p.m. UTC | #1
Kalle Valo <kvalo@codeaurora.org> wrote:

> mac80211 expects the definition of what HE rate info is available inside a
> struct prepended to the skb.
> 
> Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
> Signed-off-by: John Crispin <john@phrozen.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

8 patches applied to ath-next branch of ath.git, thanks.

e4eb7b5c335c ath11k: add RX stats support for radiotap
9cfbae4632fa ath11k: ignore event 0x6017
2dab7d221e88 ath11k: convert message from info to dbg
39e81c6a2907 ath11k: fix missed bw conversion in tx completion
33782a3c379e ath11k: Remove dead code while handling amsdu packets
9f056ed8ee01 ath11k: add HE support
6d293d447670 ath11k: add TWT support
3f8be640077a ath11k: add spatial reuse support
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index 9491a479fab5..c498c4920e11 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -2038,11 +2038,21 @@  static char *ath11k_print_get_tid(struct ieee80211_hdr *hdr, char *out,
 static void ath11k_dp_rx_deliver_msdu(struct ath11k *ar, struct napi_struct *napi,
 				      struct sk_buff *msdu)
 {
+	static const struct ieee80211_radiotap_he known = {
+		.data1 = cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_DATA_MCS_KNOWN),
+		.data2 = cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_GI_KNOWN),
+	};
 	struct ieee80211_rx_status *status;
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
+	struct ieee80211_radiotap_he *he = NULL;
 	char tid[32];
 
 	status = IEEE80211_SKB_RXCB(msdu);
+	if (status->encoding == RX_ENC_HE) {
+		he = skb_push(msdu, sizeof(known));
+		memcpy(he, &known, sizeof(known));
+		status->flag |= RX_FLAG_RADIOTAP_HE;
+	}
 
 	ath11k_dbg(ar->ab, ATH11K_DBG_DATA,
 		   "rx skb %pK len %u peer %pM %s %s sn %u %s%s%s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n",