ATH11K Archive on 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 v2 3/3] ath11k: remove unnecessary check for PMF
Date: Fri, 19 Apr 2019 11:11:38 -0700	[thread overview]
Message-ID: <1555697498-27472-4-git-send-email-rmanohar@codeaurora.org> (raw)
In-Reply-To: <1555697498-27472-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-19 18:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-19 18:11 [PATCH v2 0/3] ath11k: Add Mesh mode support Rajkumar Manoharan
2019-04-19 18:11 ` [PATCH v2 1/3] ath11k: enable mesh mode Rajkumar Manoharan
2019-04-19 18:11 ` [PATCH v2 2/3] ath11k: allow 4 address transmission for mesh packet Rajkumar Manoharan
2019-04-19 18:11 ` Rajkumar Manoharan [this message]
2019-05-28 13:48 ` [PATCH v2 0/3] ath11k: Add Mesh mode support Sven Eckelmann
2019-05-28 14:39   ` Sven Eckelmann
2019-05-29  4:26     ` Rajkumar Manoharan
2019-05-29  7:41       ` Sven Eckelmann
2019-05-29  7:52         ` Rajkumar Manoharan

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=1555697498-27472-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox