aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2019-08-21 13:11:13 +0200
committerFelix Fietkau <nbd@nbd.name>2019-08-21 14:59:21 +0200
commit0441edfb7fe0e927f51b291c2d996da68ac78dd2 (patch)
tree026409b58b084b5b2c29d0e915c3910611def4c8 /package
parenta0637718d5a09b22e505ed6bef0ff42be254d94d (diff)
downloadupstream-0441edfb7fe0e927f51b291c2d996da68ac78dd2.tar.gz
upstream-0441edfb7fe0e927f51b291c2d996da68ac78dd2.tar.bz2
upstream-0441edfb7fe0e927f51b291c2d996da68ac78dd2.zip
mac80211: backport support for the IEEE80211_KEY_FLAG_GENERATE_MMIE flag
Required for an upcoming mt76 update Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package')
-rw-r--r--package/kernel/mac80211/patches/subsys/314-mac80211-add-IEEE80211_KEY_FLAG_GENERATE_MMIE-to-iee.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/subsys/314-mac80211-add-IEEE80211_KEY_FLAG_GENERATE_MMIE-to-iee.patch b/package/kernel/mac80211/patches/subsys/314-mac80211-add-IEEE80211_KEY_FLAG_GENERATE_MMIE-to-iee.patch
new file mode 100644
index 0000000000..f732345842
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/314-mac80211-add-IEEE80211_KEY_FLAG_GENERATE_MMIE-to-iee.patch
@@ -0,0 +1,58 @@
+From: Lorenzo Bianconi <lorenzo@kernel.org>
+Date: Tue, 16 Jul 2019 00:09:19 +0200
+Subject: [PATCH] mac80211: add IEEE80211_KEY_FLAG_GENERATE_MMIE to
+ ieee80211_key_flags
+
+Add IEEE80211_KEY_FLAG_GENERATE_MMIE flag to ieee80211_key_flags in order
+to allow the driver to notify mac80211 to generate MMIE and that it
+requires sequence number generation only.
+This is a preliminary patch to add BIP_CMAC_128 hw support to mt7615
+driver
+
+Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
+Link: https://lore.kernel.org/r/dfe275f9aa0f1cc6b33085f9efd5d8447f68ad13.1563228405.git.lorenzo@kernel.org
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+---
+
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -1702,6 +1702,9 @@ struct wireless_dev *ieee80211_vif_to_wd
+ * a TKIP key if it only requires MIC space. Do not set together with
+ * @IEEE80211_KEY_FLAG_GENERATE_MMIC on the same key.
+ * @IEEE80211_KEY_FLAG_NO_AUTO_TX: Key needs explicit Tx activation.
++ * @IEEE80211_KEY_FLAG_GENERATE_MMIE: This flag should be set by the driver
++ * for a AES_CMAC key to indicate that it requires sequence number
++ * generation only
+ */
+ enum ieee80211_key_flags {
+ IEEE80211_KEY_FLAG_GENERATE_IV_MGMT = BIT(0),
+@@ -1714,6 +1717,7 @@ enum ieee80211_key_flags {
+ IEEE80211_KEY_FLAG_RESERVE_TAILROOM = BIT(7),
+ IEEE80211_KEY_FLAG_PUT_MIC_SPACE = BIT(8),
+ IEEE80211_KEY_FLAG_NO_AUTO_TX = BIT(9),
++ IEEE80211_KEY_FLAG_GENERATE_MMIE = BIT(10),
+ };
+
+ /**
+--- a/net/mac80211/wpa.c
++++ b/net/mac80211/wpa.c
+@@ -947,7 +947,8 @@ ieee80211_crypto_aes_cmac_encrypt(struct
+
+ info = IEEE80211_SKB_CB(skb);
+
+- if (info->control.hw_key)
++ if (info->control.hw_key &&
++ !(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIE))
+ return TX_CONTINUE;
+
+ if (WARN_ON(skb_tailroom(skb) < sizeof(*mmie)))
+@@ -963,6 +964,9 @@ ieee80211_crypto_aes_cmac_encrypt(struct
+
+ bip_ipn_set64(mmie->sequence_number, pn64);
+
++ if (info->control.hw_key)
++ return TX_CONTINUE;
++
+ bip_aad(skb, aad);
+
+ /*