All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajkumar Manoharan <rmanohar@codeaurora.org>
To: ath11k@lists.infradead.org
Cc: Rajkumar Manoharan <rmanohar@codeaurora.org>
Subject: [PATCH 3/3] ath11k: remove unnecessary check for PMF
Date: Wed, 17 Apr 2019 02:29:18 -0700	[thread overview]
Message-ID: <1555493358-16381-4-git-send-email-rmanohar@codeaurora.org> (raw)
In-Reply-To: <1555493358-16381-1-git-send-email-rmanohar@codeaurora.org>

Firmware delivers mesh group action frame as encrypted payload.
To allow software decryption for these group action frames, rx
status should not be marked as RX_FLAG_DECRYPTED and protected
bit in frame control should not be cleared. Existing robust
management check is enough to handle RX_FLAG_DECRYPTED. Hence
removing unnecessary protected frame validation.

Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/wmi.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index cdacbaea188c..5712ac030419 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -5196,18 +5196,17 @@ void ath11k_mgmt_rx_event(struct ath11k_base *ab, struct sk_buff *skb)
 	 */
 	status->flag |= RX_FLAG_SKIP_MONITOR;
 
-	if (ieee80211_has_protected(hdr->frame_control)) {
-		/* In case of PMF, FW delivers decrypted frames
-		 * with Protected Bit set. Don't clear that.
-		 */
-		if (!ieee80211_is_robust_mgmt_frame(skb))  {
-			status->flag |= RX_FLAG_DECRYPTED;
+	/* In case of PMF, FW delivers decrypted frames with Protected Bit set.
+	 * Don't clear that. FW also delivers broadcast management frames
+	 * (ex: group privacy action frames in mesh) as encrypted payload.
+	 */
+	if (!ieee80211_is_robust_mgmt_frame(skb))  {
+		status->flag |= RX_FLAG_DECRYPTED;
 
-			status->flag |= RX_FLAG_IV_STRIPPED |
-					RX_FLAG_MMIC_STRIPPED;
-			hdr->frame_control = __cpu_to_le16(fc &
-					~IEEE80211_FCTL_PROTECTED);
-		}
+		status->flag |= RX_FLAG_IV_STRIPPED |
+			RX_FLAG_MMIC_STRIPPED;
+		hdr->frame_control = __cpu_to_le16(fc &
+				~IEEE80211_FCTL_PROTECTED);
 	}
 
 	/* TODO: Pending handle beacon implementation
-- 
1.9.1


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

      parent reply	other threads:[~2019-04-17  9:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-17  9:29 [PATCH 0/3] ath11k: Add Mesh mode support Rajkumar Manoharan
2019-04-17  9:29 ` [PATCH 1/3] ath11k: enable mesh mode Rajkumar Manoharan
2019-04-17  9:56   ` John Crispin
2019-04-17 21:01     ` Rajkumar Manoharan
2019-04-17  9:29 ` [PATCH 2/3] ath11k: allow 4 address transmission for mesh packet Rajkumar Manoharan
2019-04-17  9:57   ` John Crispin
2019-04-17 21:08     ` Rajkumar Manoharan
2019-04-17  9:29 ` Rajkumar Manoharan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1555493358-16381-4-git-send-email-rmanohar@codeaurora.org \
    --to=rmanohar@codeaurora.org \
    --cc=ath11k@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.