linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sathishkumar Muruganandam <murugana@codeaurora.org>
To: ath11k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org,
	Sathishkumar Muruganandam <murugana@codeaurora.org>
Subject: [PATCH 1/2] mac80211: enable TKIP when using encapsulation offloading
Date: Fri, 24 Apr 2020 15:05:50 +0530	[thread overview]
Message-ID: <1587720951-9222-2-git-send-email-murugana@codeaurora.org> (raw)
In-Reply-To: <1587720951-9222-1-git-send-email-murugana@codeaurora.org>

TKIP was disabled on encap offload mode since if TKIP MIC error
reporting is not capable by the driver using encap offload mode,
then TKIP countermeasures wont work.

Enabling back TKIP bring-up in encap offload mode to leave the
control with the driver to disable hw encap when it is not capable
of TKIP MIC error reporting.

Fixes: 50ff477a8639 ("mac80211: add 802.11 encapsulation offloading support")
Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
---
 net/mac80211/iface.c | 7 -------
 net/mac80211/key.c   | 7 -------
 2 files changed, 14 deletions(-)

diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index d069825705d6..68af8acde0f0 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1257,13 +1257,6 @@ bool ieee80211_set_hw_80211_encap(struct ieee80211_vif *vif, bool enable)
 	    (local->hw.wiphy->frag_threshold != (u32)-1))
 		enable = false;
 
-	mutex_lock(&sdata->local->key_mtx);
-	list_for_each_entry(key, &sdata->key_list, list) {
-		if (key->conf.cipher == WLAN_CIPHER_SUITE_TKIP)
-			enable = false;
-	}
-	mutex_unlock(&sdata->local->key_mtx);
-
 	__ieee80211_set_hw_80211_encap(sdata, enable);
 
 	return enable;
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 8f403c1bb908..25cab6fc127c 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -177,13 +177,6 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
 		}
 	}
 
-	/* TKIP countermeasures don't work in encap offload mode */
-	if (key->conf.cipher == WLAN_CIPHER_SUITE_TKIP &&
-	    sdata->hw_80211_encap) {
-		sdata_dbg(sdata, "TKIP is not allowed in hw 80211 encap mode\n");
-		return -EINVAL;
-	}
-
 	ret = drv_set_key(key->local, SET_KEY, sdata,
 			  sta ? &sta->sta : NULL, &key->conf);
 
-- 
2.7.4

  reply	other threads:[~2020-04-24  9:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24  9:35 [PATCH 0/2] mac80211: enable TKIP when using encapsulation offloading Sathishkumar Muruganandam
2020-04-24  9:35 ` Sathishkumar Muruganandam [this message]
2020-05-26 12:44   ` [PATCH 1/2] " Johannes Berg
2020-05-29 12:08     ` Sathishkumar Muruganandam
2020-05-29 12:10       ` Johannes Berg
2020-05-29 12:29         ` Sathishkumar Muruganandam
2020-05-29 12:46           ` Johannes Berg
2020-05-29 14:40             ` Sathishkumar Muruganandam
2020-05-29 14:44               ` Johannes Berg
2020-05-29 14:51                 ` Sathishkumar Muruganandam
2020-04-24  9:35 ` [PATCH 2/2] ath11k: add 802.3 undecap support to fix TKIP MIC error reporting Sathishkumar Muruganandam
2020-05-29 14:42   ` Kalle Valo
2020-04-24  9:47 ` [PATCH 0/2] mac80211: enable TKIP when using encapsulation offloading Kalle Valo

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=1587720951-9222-2-git-send-email-murugana@codeaurora.org \
    --to=murugana@codeaurora.org \
    --cc=ath11k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).