patches: refresh patches on v4.14-rc1
[openwrt/staging/blogic.git] / patches / 0070-mac80211-fils.patch
1 --- a/net/mac80211/fils_aead.c
2 +++ b/net/mac80211/fils_aead.c
3 @@ -1,3 +1,4 @@
4 +#if LINUX_VERSION_IS_GEQ(4,3,0)
5 /*
6 * FILS AEAD for (Re)Association Request/Response frames
7 * Copyright 2016, Qualcomm Atheros, Inc.
8 @@ -332,3 +333,4 @@ int fils_decrypt_assoc_resp(struct ieee8
9 *frame_len -= AES_BLOCK_SIZE;
10 return 0;
11 }
12 +#endif
13 --- a/net/mac80211/fils_aead.h
14 +++ b/net/mac80211/fils_aead.h
15 @@ -10,10 +10,27 @@
16 #ifndef FILS_AEAD_H
17 #define FILS_AEAD_H
18
19 +#if LINUX_VERSION_IS_GEQ(4,3,0)
20 int fils_encrypt_assoc_req(struct sk_buff *skb,
21 struct ieee80211_mgd_assoc_data *assoc_data);
22 int fils_decrypt_assoc_resp(struct ieee80211_sub_if_data *sdata,
23 u8 *frame, size_t *frame_len,
24 struct ieee80211_mgd_assoc_data *assoc_data);
25 +#else
26 +static inline
27 +int fils_encrypt_assoc_req(struct sk_buff *skb,
28 + struct ieee80211_mgd_assoc_data *assoc_data)
29 +{
30 + return -EOPNOTSUPP;
31 +}
32 +
33 +static inline
34 +int fils_decrypt_assoc_resp(struct ieee80211_sub_if_data *sdata,
35 + u8 *frame, size_t *frame_len,
36 + struct ieee80211_mgd_assoc_data *assoc_data)
37 +{
38 + return -EOPNOTSUPP;
39 +}
40 +#endif
41
42 #endif /* FILS_AEAD_H */
43 --- a/net/mac80211/main.c
44 +++ b/net/mac80211/main.c
45 @@ -550,7 +550,9 @@ struct ieee80211_hw *ieee80211_alloc_hw_
46 NL80211_FEATURE_MAC_ON_CREATE |
47 NL80211_FEATURE_USERSPACE_MPM |
48 NL80211_FEATURE_FULL_AP_CLIENT_STATE;
49 +#if LINUX_VERSION_IS_GEQ(4,3,0)
50 wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_FILS_STA);
51 +#endif
52
53 if (!ops->hw_scan)
54 wiphy->features |= NL80211_FEATURE_LOW_PRIORITY_SCAN |