summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2017-02-02 15:33:28 +0200
committerJohannes Berg <johannes.berg@intel.com>2017-02-06 15:00:43 +0100
commit49370ccced399dfabf921ed2cdfbaf03eba6c9a2 (patch)
tree770ee232592c30febdd69d49e89eebb207d12b51 /patches
parent5321c22d12dadc845ea86201cba6a16c63110c61 (diff)
backports: disable fils for kernels that don't support skcipher
It's very hard to backport the skcipher implementation from newer kernels, so disable FILS support for kernels that don't support skcipher natively (< 4.3). Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'patches')
-rw-r--r--patches/collateral-evolutions/network/0070-mac80211-fils.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/patches/collateral-evolutions/network/0070-mac80211-fils.patch b/patches/collateral-evolutions/network/0070-mac80211-fils.patch
new file mode 100644
index 00000000..0e8747f9
--- /dev/null
+++ b/patches/collateral-evolutions/network/0070-mac80211-fils.patch
@@ -0,0 +1,60 @@
+diff --git a/net/mac80211/fils_aead.c b/net/mac80211/fils_aead.c
+index ecfdd97758a3..95fc9669ea4f 100644
+--- a/net/mac80211/fils_aead.c
++++ b/net/mac80211/fils_aead.c
+@@ -1,3 +1,4 @@
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
+ /*
+ * FILS AEAD for (Re)Association Request/Response frames
+ * Copyright 2016, Qualcomm Atheros, Inc.
+@@ -340,3 +341,4 @@ int fils_decrypt_assoc_resp(struct ieee80211_sub_if_data *sdata,
+ *frame_len -= AES_BLOCK_SIZE;
+ return 0;
+ }
++#endif
+diff --git a/net/mac80211/fils_aead.h b/net/mac80211/fils_aead.h
+index fbc65232f0b3..482bc5fcdd18 100644
+--- a/net/mac80211/fils_aead.h
++++ b/net/mac80211/fils_aead.h
+@@ -10,10 +10,27 @@
+ #ifndef FILS_AEAD_H
+ #define FILS_AEAD_H
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
+ int fils_encrypt_assoc_req(struct sk_buff *skb,
+ struct ieee80211_mgd_assoc_data *assoc_data);
+ int fils_decrypt_assoc_resp(struct ieee80211_sub_if_data *sdata,
+ u8 *frame, size_t *frame_len,
+ struct ieee80211_mgd_assoc_data *assoc_data);
++#else
++static inline
++int fils_encrypt_assoc_req(struct sk_buff *skb,
++ struct ieee80211_mgd_assoc_data *assoc_data)
++{
++ return -EOPNOTSUPP;
++}
++
++static inline
++int fils_decrypt_assoc_resp(struct ieee80211_sub_if_data *sdata,
++ u8 *frame, size_t *frame_len,
++ struct ieee80211_mgd_assoc_data *assoc_data)
++{
++ return -EOPNOTSUPP;
++}
++#endif
+
+ #endif /* FILS_AEAD_H */
+diff --git a/net/mac80211/main.c b/net/mac80211/main.c
+index a6ecbbf0f47f..afc1517e9729 100644
+--- a/net/mac80211/main.c
++++ b/net/mac80211/main.c
+@@ -553,7 +553,9 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
+ NL80211_FEATURE_MAC_ON_CREATE |
+ NL80211_FEATURE_USERSPACE_MPM |
+ NL80211_FEATURE_FULL_AP_CLIENT_STATE;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
+ wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_FILS_STA);
++#endif
+
+ if (!ops->hw_scan)
+ wiphy->features |= NL80211_FEATURE_LOW_PRIORITY_SCAN |