Linux-Wireless Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] iwlwifi: Extended Key ID support for mvm and dvm
@ 2019-08-19 18:05 Alexander Wetzel
  2019-08-19 18:51 ` Johannes Berg
  2019-09-06 20:41 ` Alexander Wetzel
  0 siblings, 2 replies; 8+ messages in thread
From: Alexander Wetzel @ 2019-08-19 18:05 UTC (permalink / raw)
  To: johannes, luciano.coelho; +Cc: linux-wireless, linuxwifi, Alexander Wetzel

All iwlwifi cards below the 22000 series are able to handle multiple
keyids per STA and allow the selection of the encryption key per MPDU.

These are therefore fully compatible with the Extended Key ID support
implementation in mac80211.

Enable Extended Key ID support for all dvm cards and the mvm cards not
using the incompatible new Tx API introduced for the 22000 series.

Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
---

This is basically the V3 of the patch, but the other patches were part
of series and this here is the first standalone version.

V1: https://patchwork.kernel.org/patch/10931879/
V2: https://patchwork.kernel.org/patch/11024137/

V1 become deprecated due to redesigning the Extended Key ID support API.
V2 became deprecated due to the discovery that the 22000 is not (yet)
able to support Extended Key ID.

The patch is still super trivial, but I cross checked that Extended Key
ID support is enabled with my old 3168 card and disabled with my new
AX200 card.

 drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c | 1 +
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
index 6c170636110a..ac88c19f4f18 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
@@ -200,6 +200,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
 	iwl_leds_init(priv);
 
 	wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
+	wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_EXT_KEY_ID);
 
 	ret = ieee80211_register_hw(priv->hw);
 	if (ret) {
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index b74bd58f3f45..034bf959153b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -617,6 +617,14 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
 
 	hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
 	wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
+
+	/* The new Tx API does not allow to pass the key or keyid of a MPDU to
+	 * the hw, preventing us to control which key(id) to use per MPDU.
+	 * Till that's fixed we can't use Extended Key ID for the newer cards.
+	 */
+	if (!iwl_mvm_has_new_tx_api(mvm))
+		wiphy_ext_feature_set(hw->wiphy,
+				      NL80211_EXT_FEATURE_EXT_KEY_ID);
 	hw->wiphy->features |= NL80211_FEATURE_HT_IBSS;
 
 	hw->wiphy->regulatory_flags |= REGULATORY_ENABLE_RELAX_NO_IR;
-- 
2.22.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, back to index

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-19 18:05 [PATCH] iwlwifi: Extended Key ID support for mvm and dvm Alexander Wetzel
2019-08-19 18:51 ` Johannes Berg
2019-08-19 19:57   ` Alexander Wetzel
2019-08-19 20:03     ` Johannes Berg
2019-08-19 20:09       ` Johannes Berg
2019-08-19 20:50         ` Alexander Wetzel
2019-08-19 20:42       ` Alexander Wetzel
2019-09-06 20:41 ` Alexander Wetzel

Linux-Wireless Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wireless/0 linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ https://lore.kernel.org/linux-wireless \
		linux-wireless@vger.kernel.org linux-wireless@archiver.kernel.org
	public-inbox-index linux-wireless

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wireless


AGPL code for this site: git clone https://public-inbox.org/ public-inbox