Merge ~canonical-hwe-team/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:vicamo/for-hwe/bug-1835858-fix-build-on-eoan into ~canonical-hwe-team/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:ubuntu/master
- Git
- lp:~canonical-hwe-team/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms
- vicamo/for-hwe/bug-1835858-fix-build-on-eoan
- Merge into ubuntu/master
Proposed by
You-Sheng Yang
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | You-Sheng Yang | ||||
Approved revision: | 55790fad5390a07d821ead3ae9a2b3f6ffd34d5c | ||||
Merged at revision: | 55790fad5390a07d821ead3ae9a2b3f6ffd34d5c | ||||
Proposed branch: | ~canonical-hwe-team/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:vicamo/for-hwe/bug-1835858-fix-build-on-eoan | ||||
Merge into: | ~canonical-hwe-team/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:ubuntu/master | ||||
Diff against target: |
4542 lines (+1565/-737) 58 files modified
backport-include/linux/skbuff.h (+5/-5) backport-include/net/genetlink.h (+2/-1) backport-include/net/netlink.h (+13/-5) compat/Makefile (+1/-1) compat/backport-4.20.c (+7/-1) compat/backport-genetlink.c (+1/-1) compat/verification/pkcs7_verify.c (+0/-1) debian/backport-iwlwifi-dkms.modaliases (+2/-0) debian/changelog (+14/-0) debian/gbp.conf (+1/-1) debian/gitlab-ci.yml (+3/-3) debian/patches/0002-fix-format-overflow-compile-error-in-kconf-confdata..patch (+28/-0) debian/patches/0003-backport-apply-__copy-to-init_module-cleanup_module.patch (+44/-0) debian/patches/0004-backport-fix-build-for-v5.2-kernel.patch (+38/-0) debian/patches/0005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch (+22/-0) debian/patches/series (+4/-0) drivers/net/wireless/intel/iwlwifi/cfg/22000.c (+55/-6) drivers/net/wireless/intel/iwlwifi/fw/acpi.h (+12/-0) drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h (+2/-0) drivers/net/wireless/intel/iwlwifi/fw/api/location.h (+2/-2) drivers/net/wireless/intel/iwlwifi/fw/api/phy.h (+7/-0) drivers/net/wireless/intel/iwlwifi/fw/api/power.h (+12/-0) drivers/net/wireless/intel/iwlwifi/fw/api/rx.h (+2/-1) drivers/net/wireless/intel/iwlwifi/fw/dbg.c (+30/-26) drivers/net/wireless/intel/iwlwifi/fw/file.h (+1/-0) drivers/net/wireless/intel/iwlwifi/fw/img.h (+0/-9) drivers/net/wireless/intel/iwlwifi/iwl-config.h (+7/-0) drivers/net/wireless/intel/iwlwifi/iwl-csr.h (+1/-0) drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c (+44/-109) drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.h (+10/-14) drivers/net/wireless/intel/iwlwifi/iwl-drv.c (+4/-8) drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c (+0/-14) drivers/net/wireless/intel/iwlwifi/iwl-tm-gnl.c (+11/-6) drivers/net/wireless/intel/iwlwifi/iwl-trans.h (+3/-1) drivers/net/wireless/intel/iwlwifi/mvm/d3.c (+3/-0) drivers/net/wireless/intel/iwlwifi/mvm/fw.c (+141/-7) drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c (+3/-1) drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c (+79/-44) drivers/net/wireless/intel/iwlwifi/mvm/mvm.h (+7/-4) drivers/net/wireless/intel/iwlwifi/mvm/nvm.c (+1/-1) drivers/net/wireless/intel/iwlwifi/mvm/ops.c (+15/-14) drivers/net/wireless/intel/iwlwifi/mvm/rs.c (+268/-251) drivers/net/wireless/intel/iwlwifi/mvm/rs.h (+2/-1) drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c (+134/-51) drivers/net/wireless/intel/iwlwifi/mvm/sta.c (+4/-2) drivers/net/wireless/intel/iwlwifi/mvm/sta.h (+10/-2) drivers/net/wireless/intel/iwlwifi/mvm/utils.c (+2/-2) drivers/net/wireless/intel/iwlwifi/pcie/drv.c (+23/-0) drivers/net/wireless/intel/iwlwifi/pcie/trans.c (+4/-5) drivers/net/wireless/mac80211_hwsim.c (+25/-6) net/mac80211/ibss.c (+7/-3) net/mac80211/ieee80211_i.h (+1/-1) net/mac80211/main.c (+13/-0) net/mac80211/mlme.c (+4/-4) net/mac80211/scan.c (+2/-3) net/mac80211/util.c (+6/-5) net/wireless/nl80211.c (+422/-114) versions (+1/-1) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Anthony Wong | Approve | ||
Review via email: mp+370163@code.launchpad.net |
Commit message
To post a comment you must log in.
Revision history for this message
You-Sheng Yang (vicamo) wrote : | # |
Revision history for this message
You-Sheng Yang (vicamo) wrote : | # |
Tested on newly released 5.2.0-8-generic as well.
Revision history for this message
Anthony Wong (anthonywong) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/backport-include/linux/skbuff.h b/backport-include/linux/skbuff.h | |||
2 | index 4d37569..c60cbcc 100644 | |||
3 | --- a/backport-include/linux/skbuff.h | |||
4 | +++ b/backport-include/linux/skbuff.h | |||
5 | @@ -200,14 +200,14 @@ static inline struct sk_buff *__pskb_copy_fclone(struct sk_buff *skb, | |||
6 | 200 | struct sk_buff *skb_clone_sk(struct sk_buff *skb); | 200 | struct sk_buff *skb_clone_sk(struct sk_buff *skb); |
7 | 201 | #endif | 201 | #endif |
8 | 202 | 202 | ||
11 | 203 | static inline bool skb_xmit_more(struct sk_buff *skb) | 203 | |
10 | 204 | { | ||
12 | 205 | #if LINUX_VERSION_IS_LESS(3,18,0) | 204 | #if LINUX_VERSION_IS_LESS(3,18,0) |
14 | 206 | return false; | 205 | #define skb_xmit_more(skb) false |
15 | 206 | #elif LINUX_VERSION_IS_LESS(5,2,0) | ||
16 | 207 | #define skb_xmit_more(skb) ((skb)->xmit_more) | ||
17 | 207 | #else | 208 | #else |
19 | 208 | return skb->xmit_more; | 209 | #define skb_xmit_more(skb) netdev_xmit_more() |
20 | 209 | #endif | 210 | #endif |
21 | 210 | } | ||
22 | 211 | 211 | ||
23 | 212 | #if LINUX_VERSION_IS_LESS(3,19,0) | 212 | #if LINUX_VERSION_IS_LESS(3,19,0) |
24 | 213 | /** | 213 | /** |
25 | diff --git a/backport-include/net/genetlink.h b/backport-include/net/genetlink.h | |||
26 | index 844ed2a..59611a8 100644 | |||
27 | --- a/backport-include/net/genetlink.h | |||
28 | +++ b/backport-include/net/genetlink.h | |||
29 | @@ -93,7 +93,7 @@ void backport_genl_dump_check_consistent(struct netlink_callback *cb, | |||
30 | 93 | #endif | 93 | #endif |
31 | 94 | #endif /* LINUX_VERSION_IS_LESS(4,15,0) */ | 94 | #endif /* LINUX_VERSION_IS_LESS(4,15,0) */ |
32 | 95 | 95 | ||
34 | 96 | #if LINUX_VERSION_IS_LESS(4,20,0) | 96 | #if LINUX_VERSION_IS_LESS(5,2,0) |
35 | 97 | static inline int | 97 | static inline int |
36 | 98 | __real_backport_genl_register_family(struct genl_family *family) | 98 | __real_backport_genl_register_family(struct genl_family *family) |
37 | 99 | { | 99 | { |
38 | @@ -117,6 +117,7 @@ struct backport_genl_family { | |||
39 | 117 | unsigned int maxattr; | 117 | unsigned int maxattr; |
40 | 118 | bool netnsok; | 118 | bool netnsok; |
41 | 119 | bool parallel_ops; | 119 | bool parallel_ops; |
42 | 120 | const struct nla_policy *policy; | ||
43 | 120 | int (*pre_doit)(__genl_const struct genl_ops *ops, | 121 | int (*pre_doit)(__genl_const struct genl_ops *ops, |
44 | 121 | struct sk_buff *skb, | 122 | struct sk_buff *skb, |
45 | 122 | struct genl_info *info); | 123 | struct genl_info *info); |
46 | diff --git a/backport-include/net/netlink.h b/backport-include/net/netlink.h | |||
47 | index 8b58301..87c30cc 100644 | |||
48 | --- a/backport-include/net/netlink.h | |||
49 | +++ b/backport-include/net/netlink.h | |||
50 | @@ -4,6 +4,19 @@ | |||
51 | 4 | #include <linux/version.h> | 4 | #include <linux/version.h> |
52 | 5 | #include <linux/in6.h> | 5 | #include <linux/in6.h> |
53 | 6 | 6 | ||
54 | 7 | #if LINUX_VERSION_IS_LESS(5,1,0) | ||
55 | 8 | #undef NLA_POLICY_NESTED | ||
56 | 9 | #undef NLA_POLICY_NESTED_ARRAY | ||
57 | 10 | #define _NLA_POLICY_NESTED(maxattr, policy) \ | ||
58 | 11 | { .type = NLA_NESTED, .validation_data = policy, .len = maxattr } | ||
59 | 12 | #define _NLA_POLICY_NESTED_ARRAY(maxattr, policy) \ | ||
60 | 13 | { .type = NLA_NESTED_ARRAY, .validation_data = policy, .len = maxattr } | ||
61 | 14 | #define NLA_POLICY_NESTED(policy) \ | ||
62 | 15 | _NLA_POLICY_NESTED(ARRAY_SIZE(policy) - 1, policy) | ||
63 | 16 | #define NLA_POLICY_NESTED_ARRAY(policy) \ | ||
64 | 17 | _NLA_POLICY_NESTED_ARRAY(ARRAY_SIZE(policy) - 1, policy) | ||
65 | 18 | #endif /* < 5.1 */ | ||
66 | 19 | |||
67 | 7 | #if LINUX_VERSION_IS_LESS(4,20,0) | 20 | #if LINUX_VERSION_IS_LESS(4,20,0) |
68 | 8 | /* can't backport using the enum - need to override */ | 21 | /* can't backport using the enum - need to override */ |
69 | 9 | #define NLA_UNSPEC 0 | 22 | #define NLA_UNSPEC 0 |
70 | @@ -59,11 +72,6 @@ struct backport_nla_policy { | |||
71 | 59 | #define NLA_POLICY_ETH_ADDR NLA_POLICY_EXACT_LEN(ETH_ALEN) | 72 | #define NLA_POLICY_ETH_ADDR NLA_POLICY_EXACT_LEN(ETH_ALEN) |
72 | 60 | #define NLA_POLICY_ETH_ADDR_COMPAT NLA_POLICY_EXACT_LEN_WARN(ETH_ALEN) | 73 | #define NLA_POLICY_ETH_ADDR_COMPAT NLA_POLICY_EXACT_LEN_WARN(ETH_ALEN) |
73 | 61 | 74 | ||
74 | 62 | #define NLA_POLICY_NESTED(maxattr, policy) \ | ||
75 | 63 | { .type = NLA_NESTED, .validation_data = policy, .len = maxattr } | ||
76 | 64 | #define NLA_POLICY_NESTED_ARRAY(maxattr, policy) \ | ||
77 | 65 | { .type = NLA_NESTED_ARRAY, .validation_data = policy, .len = maxattr } | ||
78 | 66 | |||
79 | 67 | #define __NLA_ENSURE(condition) (sizeof(char[1 - 2*!(condition)]) - 1) | 75 | #define __NLA_ENSURE(condition) (sizeof(char[1 - 2*!(condition)]) - 1) |
80 | 68 | #define NLA_ENSURE_INT_TYPE(tp) \ | 76 | #define NLA_ENSURE_INT_TYPE(tp) \ |
81 | 69 | (__NLA_ENSURE(tp == NLA_S8 || tp == NLA_U8 || \ | 77 | (__NLA_ENSURE(tp == NLA_S8 || tp == NLA_U8 || \ |
82 | diff --git a/compat/Makefile b/compat/Makefile | |||
83 | index 7d2278b..1f62e4f 100644 | |||
84 | --- a/compat/Makefile | |||
85 | +++ b/compat/Makefile | |||
86 | @@ -39,7 +39,7 @@ compat-$(CPTCFG_KERNEL_4_10) += backport-4.10.o | |||
87 | 39 | compat-$(CPTCFG_KERNEL_4_18) += backport-4.18.o | 39 | compat-$(CPTCFG_KERNEL_4_18) += backport-4.18.o |
88 | 40 | compat-$(CPTCFG_KERNEL_4_20) += backport-4.20.o | 40 | compat-$(CPTCFG_KERNEL_4_20) += backport-4.20.o |
89 | 41 | 41 | ||
91 | 42 | compat-$(CPTCFG_KERNEL_4_20) += backport-genetlink.o | 42 | compat-$(CPTCFG_KERNEL_5_2) += backport-genetlink.o |
92 | 43 | 43 | ||
93 | 44 | compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/verify.o | 44 | compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/verify.o |
94 | 45 | compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/pkcs7.asn1.o | 45 | compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/pkcs7.asn1.o |
95 | diff --git a/compat/backport-4.20.c b/compat/backport-4.20.c | |||
96 | index e26f3b5..a75657f 100644 | |||
97 | --- a/compat/backport-4.20.c | |||
98 | +++ b/compat/backport-4.20.c | |||
99 | @@ -1,5 +1,5 @@ | |||
100 | 1 | /* | 1 | /* |
102 | 2 | * Copyright (C) 2018 Intel Corporation | 2 | * Copyright (C) 2018 - 2019 Intel Corporation |
103 | 3 | * | 3 | * |
104 | 4 | * Backport functionality introduced in Linux 4.20. | 4 | * Backport functionality introduced in Linux 4.20. |
105 | 5 | * This is basically upstream lib/nlattr.c. | 5 | * This is basically upstream lib/nlattr.c. |
106 | @@ -158,6 +158,9 @@ static int validate_nla(const struct nlattr *nla, int maxtype, | |||
107 | 158 | if (type <= 0 || type > maxtype) | 158 | if (type <= 0 || type > maxtype) |
108 | 159 | return 0; | 159 | return 0; |
109 | 160 | 160 | ||
110 | 161 | if (WARN_ON(!policy)) | ||
111 | 162 | return -EINVAL; | ||
112 | 163 | |||
113 | 161 | pt = &policy[type]; | 164 | pt = &policy[type]; |
114 | 162 | 165 | ||
115 | 163 | BUG_ON(pt->type > NLA_TYPE_MAX); | 166 | BUG_ON(pt->type > NLA_TYPE_MAX); |
116 | @@ -316,6 +319,9 @@ int backport_nla_validate(const struct nlattr *head, int len, int maxtype, | |||
117 | 316 | const struct nlattr *nla; | 319 | const struct nlattr *nla; |
118 | 317 | int rem; | 320 | int rem; |
119 | 318 | 321 | ||
120 | 322 | if (!policy) | ||
121 | 323 | return 0; | ||
122 | 324 | |||
123 | 319 | nla_for_each_attr(nla, head, len, rem) { | 325 | nla_for_each_attr(nla, head, len, rem) { |
124 | 320 | int err = validate_nla(nla, maxtype, policy, extack); | 326 | int err = validate_nla(nla, maxtype, policy, extack); |
125 | 321 | 327 | ||
126 | diff --git a/compat/backport-genetlink.c b/compat/backport-genetlink.c | |||
127 | index fb559d2..f9e307b 100644 | |||
128 | --- a/compat/backport-genetlink.c | |||
129 | +++ b/compat/backport-genetlink.c | |||
130 | @@ -169,7 +169,7 @@ static int backport_pre_doit(__genl_const struct genl_ops *ops, | |||
131 | 169 | #endif | 169 | #endif |
132 | 170 | 170 | ||
133 | 171 | err = nlmsg_validate(info->nlhdr, GENL_HDRLEN + family->hdrsize, | 171 | err = nlmsg_validate(info->nlhdr, GENL_HDRLEN + family->hdrsize, |
135 | 172 | family->maxattr, ops->policy, extack); | 172 | family->maxattr, family->policy, extack); |
136 | 173 | if (!err && family->pre_doit) | 173 | if (!err && family->pre_doit) |
137 | 174 | err = family->pre_doit(ops, skb, info); | 174 | err = family->pre_doit(ops, skb, info); |
138 | 175 | 175 | ||
139 | diff --git a/compat/verification/pkcs7_verify.c b/compat/verification/pkcs7_verify.c | |||
140 | index 97c77f6..f7b0980 100644 | |||
141 | --- a/compat/verification/pkcs7_verify.c | |||
142 | +++ b/compat/verification/pkcs7_verify.c | |||
143 | @@ -56,7 +56,6 @@ static int pkcs7_digest(struct pkcs7_message *pkcs7, | |||
144 | 56 | goto error_no_desc; | 56 | goto error_no_desc; |
145 | 57 | 57 | ||
146 | 58 | desc->tfm = tfm; | 58 | desc->tfm = tfm; |
147 | 59 | desc->flags = CRYPTO_TFM_REQ_MAY_SLEEP; | ||
148 | 60 | 59 | ||
149 | 61 | /* Digest the message [RFC2315 9.3] */ | 60 | /* Digest the message [RFC2315 9.3] */ |
150 | 62 | ret = crypto_shash_digest(desc, pkcs7->data, pkcs7->data_len, | 61 | ret = crypto_shash_digest(desc, pkcs7->data, pkcs7->data_len, |
151 | diff --git a/debian/backport-iwlwifi-dkms.modaliases b/debian/backport-iwlwifi-dkms.modaliases | |||
152 | index 4ac4b99..9e7706a 100644 | |||
153 | --- a/debian/backport-iwlwifi-dkms.modaliases | |||
154 | +++ b/debian/backport-iwlwifi-dkms.modaliases | |||
155 | @@ -2,6 +2,7 @@ alias net-pf-16-proto-16-family-nl80211 cfg80211 | |||
156 | 2 | alias pci:v00008086d00007AF0sv*sd00000A10bc*sc*i* iwlwifi | 2 | alias pci:v00008086d00007AF0sv*sd00000A10bc*sc*i* iwlwifi |
157 | 3 | alias pci:v00008086d00007AF0sv*sd00000510bc*sc*i* iwlwifi | 3 | alias pci:v00008086d00007AF0sv*sd00000510bc*sc*i* iwlwifi |
158 | 4 | alias pci:v00008086d00007AF0sv*sd00000310bc*sc*i* iwlwifi | 4 | alias pci:v00008086d00007AF0sv*sd00000310bc*sc*i* iwlwifi |
159 | 5 | alias pci:v00008086d00007AF0sv*sd00000090bc*sc*i* iwlwifi | ||
160 | 5 | alias pci:v00008086d00007A70sv*sd00000A10bc*sc*i* iwlwifi | 6 | alias pci:v00008086d00007A70sv*sd00000A10bc*sc*i* iwlwifi |
161 | 6 | alias pci:v00008086d00007A70sv*sd00000510bc*sc*i* iwlwifi | 7 | alias pci:v00008086d00007A70sv*sd00000510bc*sc*i* iwlwifi |
162 | 7 | alias pci:v00008086d00007A70sv*sd00000310bc*sc*i* iwlwifi | 8 | alias pci:v00008086d00007A70sv*sd00000310bc*sc*i* iwlwifi |
163 | @@ -366,6 +367,7 @@ alias pci:v00008086d0000271Bsv*sd00000010bc*sc*i* iwlwifi | |||
164 | 366 | alias pci:v00008086d00002526sv*sd0000A014bc*sc*i* iwlwifi | 367 | alias pci:v00008086d00002526sv*sd0000A014bc*sc*i* iwlwifi |
165 | 367 | alias pci:v00008086d00002526sv*sd00008010bc*sc*i* iwlwifi | 368 | alias pci:v00008086d00002526sv*sd00008010bc*sc*i* iwlwifi |
166 | 368 | alias pci:v00008086d00002526sv*sd00008014bc*sc*i* iwlwifi | 369 | alias pci:v00008086d00002526sv*sd00008014bc*sc*i* iwlwifi |
167 | 370 | alias pci:v00008086d00002526sv*sd00006014bc*sc*i* iwlwifi | ||
168 | 369 | alias pci:v00008086d00002526sv*sd000042A4bc*sc*i* iwlwifi | 371 | alias pci:v00008086d00002526sv*sd000042A4bc*sc*i* iwlwifi |
169 | 370 | alias pci:v00008086d00002526sv*sd00004234bc*sc*i* iwlwifi | 372 | alias pci:v00008086d00002526sv*sd00004234bc*sc*i* iwlwifi |
170 | 371 | alias pci:v00008086d00002526sv*sd000040A4bc*sc*i* iwlwifi | 373 | alias pci:v00008086d00002526sv*sd000040A4bc*sc*i* iwlwifi |
171 | diff --git a/debian/changelog b/debian/changelog | |||
172 | index d70c99a..5c9c315 100644 | |||
173 | --- a/debian/changelog | |||
174 | +++ b/debian/changelog | |||
175 | @@ -1,3 +1,17 @@ | |||
176 | 1 | backport-iwlwifi-dkms (7906-ubuntu2) eoan; urgency=low | ||
177 | 2 | |||
178 | 3 | * Fix build on Eoan. (LP: #1835858) | ||
179 | 4 | - Fix build with gcc-9. (LP: #1830961) | ||
180 | 5 | - Fix build against kernel v5.2. | ||
181 | 6 | |||
182 | 7 | -- You-Sheng Yang <vicamo@gmail.com> Tue, 16 Jul 2019 09:40:27 +0800 | ||
183 | 8 | |||
184 | 9 | backport-iwlwifi-dkms (7906-ubuntu1) eoan; urgency=low | ||
185 | 10 | |||
186 | 11 | * Sync with debian 7906-1. | ||
187 | 12 | |||
188 | 13 | -- You-Sheng Yang <vicamo@gmail.com> Tue, 9 Jul 2019 16:35:22 +0800 | ||
189 | 14 | |||
190 | 1 | backport-iwlwifi-dkms (7858-ubuntu2) UNRELEASED; urgency=low | 15 | backport-iwlwifi-dkms (7858-ubuntu2) UNRELEASED; urgency=low |
191 | 2 | 16 | ||
192 | 3 | * Fix build on recent kernel that removes *.lex.c and *.tab.c at clean | 17 | * Fix build on recent kernel that removes *.lex.c and *.tab.c at clean |
193 | diff --git a/debian/gbp.conf b/debian/gbp.conf | |||
194 | index fca26f6..8052664 100644 | |||
195 | --- a/debian/gbp.conf | |||
196 | +++ b/debian/gbp.conf | |||
197 | @@ -1,4 +1,4 @@ | |||
198 | 1 | [DEFAULT] | 1 | [DEFAULT] |
200 | 2 | debian-branch = debian/master | 2 | debian-branch = ubuntu/eoan |
201 | 3 | upstream-branch = upstream/master | 3 | upstream-branch = upstream/master |
202 | 4 | upstream-tree = BRANCH | 4 | upstream-tree = BRANCH |
203 | diff --git a/debian/gitlab-ci.yml b/debian/gitlab-ci.yml | |||
204 | index ac7bc44..00dbb77 100644 | |||
205 | --- a/debian/gitlab-ci.yml | |||
206 | +++ b/debian/gitlab-ci.yml | |||
207 | @@ -1,6 +1,6 @@ | |||
208 | 1 | include: | 1 | include: |
211 | 2 | - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml | 2 | - https://gitlab.com/hustle-ci/pipeline/raw/master/salsa-ci.yml |
212 | 3 | - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml | 3 | - https://gitlab.com/hustle-ci/pipeline/raw/master/pipeline-jobs.yml |
213 | 4 | 4 | ||
214 | 5 | variables: | 5 | variables: |
216 | 6 | RELEASE: 'unstable' | 6 | RELEASE: 'eoan' |
217 | diff --git a/debian/patches/0002-fix-format-overflow-compile-error-in-kconf-confdata..patch b/debian/patches/0002-fix-format-overflow-compile-error-in-kconf-confdata..patch | |||
218 | 7 | new file mode 100644 | 7 | new file mode 100644 |
219 | index 0000000..8c0464d | |||
220 | --- /dev/null | |||
221 | +++ b/debian/patches/0002-fix-format-overflow-compile-error-in-kconf-confdata..patch | |||
222 | @@ -0,0 +1,28 @@ | |||
223 | 1 | From: You-Sheng Yang <vicamo@gmail.com> | ||
224 | 2 | Date: Mon, 15 Jul 2019 17:56:56 +0800 | ||
225 | 3 | Subject: fix format-overflow compile error in kconf/confdata.c | ||
226 | 4 | |||
227 | 5 | --- | ||
228 | 6 | kconf/confdata.c | 7 +++++-- | ||
229 | 7 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
230 | 8 | |||
231 | 9 | diff --git a/kconf/confdata.c b/kconf/confdata.c | ||
232 | 10 | index 297b079..ed1ff5d 100644 | ||
233 | 11 | --- a/kconf/confdata.c | ||
234 | 12 | +++ b/kconf/confdata.c | ||
235 | 13 | @@ -770,10 +770,13 @@ int conf_write(const char *name) | ||
236 | 14 | } else | ||
237 | 15 | basename = conf_get_configname(); | ||
238 | 16 | |||
239 | 17 | - sprintf(newname, "%s%s", dirname, basename); | ||
240 | 18 | + if (snprintf(newname, sizeof newname, "%s%s", dirname, basename) < 0) | ||
241 | 19 | + return 1; | ||
242 | 20 | + | ||
243 | 21 | env = getenv("KCONFIG_OVERWRITECONFIG"); | ||
244 | 22 | if (!env || !*env) { | ||
245 | 23 | - sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid()); | ||
246 | 24 | + if (snprintf(tmpname, sizeof tmpname, "%s.tmpconfig.%d", dirname, (int)getpid()) < 0) | ||
247 | 25 | + return 1; | ||
248 | 26 | out = fopen(tmpname, "w"); | ||
249 | 27 | } else { | ||
250 | 28 | *tmpname = 0; | ||
251 | diff --git a/debian/patches/0003-backport-apply-__copy-to-init_module-cleanup_module.patch b/debian/patches/0003-backport-apply-__copy-to-init_module-cleanup_module.patch | |||
252 | 0 | new file mode 100644 | 29 | new file mode 100644 |
253 | index 0000000..d7c145c | |||
254 | --- /dev/null | |||
255 | +++ b/debian/patches/0003-backport-apply-__copy-to-init_module-cleanup_module.patch | |||
256 | @@ -0,0 +1,44 @@ | |||
257 | 1 | From: You-Sheng Yang <vicamo@gmail.com> | ||
258 | 2 | Date: Mon, 15 Jul 2019 18:56:31 +0800 | ||
259 | 3 | Subject: backport: apply __copy to init_module/cleanup_module | ||
260 | 4 | |||
261 | 5 | --- | ||
262 | 6 | backport-include/linux/compiler.h | 4 ++++ | ||
263 | 7 | backport-include/linux/module.h | 4 ++-- | ||
264 | 8 | 2 files changed, 6 insertions(+), 2 deletions(-) | ||
265 | 9 | |||
266 | 10 | diff --git a/backport-include/linux/compiler.h b/backport-include/linux/compiler.h | ||
267 | 11 | index 53c069d..adc5a24 100644 | ||
268 | 12 | --- a/backport-include/linux/compiler.h | ||
269 | 13 | +++ b/backport-include/linux/compiler.h | ||
270 | 14 | @@ -92,4 +92,8 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s | ||
271 | 15 | #define OPTIMIZER_HIDE_VAR(var) barrier() | ||
272 | 16 | #endif | ||
273 | 17 | |||
274 | 18 | +#ifndef __copy | ||
275 | 19 | +#define __copy(x) | ||
276 | 20 | +#endif | ||
277 | 21 | + | ||
278 | 22 | #endif /* __BACKPORT_LINUX_COMPILER_H */ | ||
279 | 23 | diff --git a/backport-include/linux/module.h b/backport-include/linux/module.h | ||
280 | 24 | index 1a2c82f..877491e 100644 | ||
281 | 25 | --- a/backport-include/linux/module.h | ||
282 | 26 | +++ b/backport-include/linux/module.h | ||
283 | 27 | @@ -33,7 +33,7 @@ extern void backport_dependency_symbol(void); | ||
284 | 28 | backport_dependency_symbol(); \ | ||
285 | 29 | return initfn(); \ | ||
286 | 30 | } \ | ||
287 | 31 | - int init_module(void) __attribute__((alias("__init_backport")));\ | ||
288 | 32 | + int init_module(void) __copy(__init_backport) __attribute__((alias("__init_backport")));\ | ||
289 | 33 | BACKPORT_MOD_VERSIONS | ||
290 | 34 | |||
291 | 35 | /* | ||
292 | 36 | @@ -58,7 +58,7 @@ extern void backport_dependency_symbol(void); | ||
293 | 37 | exitfn(); \ | ||
294 | 38 | rcu_barrier(); \ | ||
295 | 39 | } \ | ||
296 | 40 | - void cleanup_module(void) __attribute__((alias("__exit_compat"))); | ||
297 | 41 | + void cleanup_module(void) __copy(__exit_compat) __attribute__((alias("__exit_compat"))); | ||
298 | 42 | #endif | ||
299 | 43 | |||
300 | 44 | #if LINUX_VERSION_IS_LESS(3,3,0) | ||
301 | diff --git a/debian/patches/0004-backport-fix-build-for-v5.2-kernel.patch b/debian/patches/0004-backport-fix-build-for-v5.2-kernel.patch | |||
302 | 0 | new file mode 100644 | 45 | new file mode 100644 |
303 | index 0000000..8c9464f | |||
304 | --- /dev/null | |||
305 | +++ b/debian/patches/0004-backport-fix-build-for-v5.2-kernel.patch | |||
306 | @@ -0,0 +1,38 @@ | |||
307 | 1 | From: You-Sheng Yang <vicamo@gmail.com> | ||
308 | 2 | Date: Mon, 15 Jul 2019 19:43:57 +0800 | ||
309 | 3 | Subject: backport: fix build for v5.2 kernel | ||
310 | 4 | |||
311 | 5 | --- | ||
312 | 6 | net/mac80211/iface.c | 12 ++++++++++-- | ||
313 | 7 | 1 file changed, 10 insertions(+), 2 deletions(-) | ||
314 | 8 | |||
315 | 9 | diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c | ||
316 | 10 | index 421cd44..9fb38ba 100644 | ||
317 | 11 | --- a/net/mac80211/iface.c | ||
318 | 12 | +++ b/net/mac80211/iface.c | ||
319 | 13 | @@ -1132,7 +1132,11 @@ static void ieee80211_uninit(struct net_device *dev) | ||
320 | 14 | ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev)); | ||
321 | 15 | } | ||
322 | 16 | |||
323 | 17 | -#if LINUX_VERSION_IS_GEQ(4,19,0) | ||
324 | 18 | +#if LINUX_VERSION_IS_GEQ(5,2,0) | ||
325 | 19 | +static u16 ieee80211_netdev_select_queue(struct net_device *dev, | ||
326 | 20 | + struct sk_buff *skb, | ||
327 | 21 | + struct net_device *sb_dev) | ||
328 | 22 | +#elif LINUX_VERSION_IS_GEQ(4,19,0) | ||
329 | 23 | static u16 ieee80211_netdev_select_queue(struct net_device *dev, | ||
330 | 24 | struct sk_buff *skb, | ||
331 | 25 | struct net_device *sb_dev, | ||
332 | 26 | @@ -1223,7 +1227,11 @@ static const struct net_device_ops ieee80211_dataif_ops = { | ||
333 | 27 | |||
334 | 28 | }; | ||
335 | 29 | |||
336 | 30 | -#if LINUX_VERSION_IS_GEQ(4,19,0) | ||
337 | 31 | +#if LINUX_VERSION_IS_GEQ(5,2,0) | ||
338 | 32 | +static u16 ieee80211_monitor_select_queue(struct net_device *dev, | ||
339 | 33 | + struct sk_buff *skb, | ||
340 | 34 | + struct net_device *sb_dev) | ||
341 | 35 | +#elif LINUX_VERSION_IS_GEQ(4,19,0) | ||
342 | 36 | static u16 ieee80211_monitor_select_queue(struct net_device *dev, | ||
343 | 37 | struct sk_buff *skb, | ||
344 | 38 | struct net_device *sb_dev, | ||
345 | diff --git a/debian/patches/0005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch b/debian/patches/0005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch | |||
346 | 0 | new file mode 100644 | 39 | new file mode 100644 |
347 | index 0000000..194c653 | |||
348 | --- /dev/null | |||
349 | +++ b/debian/patches/0005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch | |||
350 | @@ -0,0 +1,22 @@ | |||
351 | 1 | From: You-Sheng Yang <vicamo@gmail.com> | ||
352 | 2 | Date: Mon, 15 Jul 2019 20:05:54 +0800 | ||
353 | 3 | Subject: Makefile.kernel: pass -fno-stack-clash-protection and | ||
354 | 4 | -fcf-protection=none for gcc-9 | ||
355 | 5 | |||
356 | 6 | --- | ||
357 | 7 | Makefile.kernel | 2 ++ | ||
358 | 8 | 1 file changed, 2 insertions(+) | ||
359 | 9 | |||
360 | 10 | diff --git a/Makefile.kernel b/Makefile.kernel | ||
361 | 11 | index 3274949..403345d 100644 | ||
362 | 12 | --- a/Makefile.kernel | ||
363 | 13 | +++ b/Makefile.kernel | ||
364 | 14 | @@ -10,6 +10,8 @@ KBUILD_CFLAGS := $(KBUILD_CFLAGS) -Wformat-security \ | ||
365 | 15 | $(call backport-cc-disable-error, date-time) \ | ||
366 | 16 | $(call backport-cc-disable-warning, date-time) | ||
367 | 17 | |||
368 | 18 | +KBUILD_CFLAGS += -fno-stack-clash-protection -fcf-protection=none | ||
369 | 19 | + | ||
370 | 20 | NOSTDINC_FLAGS := \ | ||
371 | 21 | -I$(M)/backport-include/ \ | ||
372 | 22 | -I$(M)/backport-include/uapi \ | ||
373 | diff --git a/debian/patches/series b/debian/patches/series | |||
374 | index 118ab0e..e037267 100644 | |||
375 | --- a/debian/patches/series | |||
376 | +++ b/debian/patches/series | |||
377 | @@ -1 +1,5 @@ | |||
378 | 1 | 0001-keep-zconf-in-make-clean.patch | 1 | 0001-keep-zconf-in-make-clean.patch |
379 | 2 | 0002-fix-format-overflow-compile-error-in-kconf-confdata..patch | ||
380 | 3 | 0003-backport-apply-__copy-to-init_module-cleanup_module.patch | ||
381 | 4 | 0004-backport-fix-build-for-v5.2-kernel.patch | ||
382 | 5 | 0005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch | ||
383 | diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c | |||
384 | index c5a0b6f..351f2c0 100644 | |||
385 | --- a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c | |||
386 | +++ b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c | |||
387 | @@ -56,7 +56,7 @@ | |||
388 | 56 | #include "iwl-config.h" | 56 | #include "iwl-config.h" |
389 | 57 | 57 | ||
390 | 58 | /* Highest firmware API version supported */ | 58 | /* Highest firmware API version supported */ |
392 | 59 | #define IWL_22000_UCODE_API_MAX 50 | 59 | #define IWL_22000_UCODE_API_MAX 51 |
393 | 60 | 60 | ||
394 | 61 | /* Lowest firmware API version supported */ | 61 | /* Lowest firmware API version supported */ |
395 | 62 | #define IWL_22000_UCODE_API_MIN 39 | 62 | #define IWL_22000_UCODE_API_MIN 39 |
396 | @@ -76,11 +76,12 @@ | |||
397 | 76 | #define IWL_22000_HR_FW_PRE "iwlwifi-Qu-a0-hr-a0-" | 76 | #define IWL_22000_HR_FW_PRE "iwlwifi-Qu-a0-hr-a0-" |
398 | 77 | #define IWL_22000_HR_CDB_FW_PRE "iwlwifi-QuIcp-z0-hrcdb-a0-" | 77 | #define IWL_22000_HR_CDB_FW_PRE "iwlwifi-QuIcp-z0-hrcdb-a0-" |
399 | 78 | #define IWL_22000_HR_A_F0_FW_PRE "iwlwifi-QuQnj-f0-hr-a0-" | 78 | #define IWL_22000_HR_A_F0_FW_PRE "iwlwifi-QuQnj-f0-hr-a0-" |
400 | 79 | #define IWL_22000_HR_B_F0_FW_PRE "iwlwifi-Qu-b0-hr-b0-" | ||
401 | 80 | #define IWL_22000_QU_B_HR_B_FW_PRE "iwlwifi-Qu-b0-hr-b0-" | 79 | #define IWL_22000_QU_B_HR_B_FW_PRE "iwlwifi-Qu-b0-hr-b0-" |
402 | 81 | #define IWL_22000_HR_B_FW_PRE "iwlwifi-QuQnj-b0-hr-b0-" | 80 | #define IWL_22000_HR_B_FW_PRE "iwlwifi-QuQnj-b0-hr-b0-" |
403 | 82 | #define IWL_22000_HR_A0_FW_PRE "iwlwifi-QuQnj-a0-hr-a0-" | 81 | #define IWL_22000_HR_A0_FW_PRE "iwlwifi-QuQnj-a0-hr-a0-" |
404 | 82 | #define IWL_QU_C_HR_B_FW_PRE "iwlwifi-Qu-c0-hr-b0-" | ||
405 | 83 | #define IWL_QU_B_JF_B_FW_PRE "iwlwifi-Qu-b0-jf-b0-" | 83 | #define IWL_QU_B_JF_B_FW_PRE "iwlwifi-Qu-b0-jf-b0-" |
406 | 84 | #define IWL_QU_C_JF_B_FW_PRE "iwlwifi-Qu-c0-jf-b0-" | ||
407 | 84 | #define IWL_QUZ_A_HR_B_FW_PRE "iwlwifi-QuZ-a0-hr-b0-" | 85 | #define IWL_QUZ_A_HR_B_FW_PRE "iwlwifi-QuZ-a0-hr-b0-" |
408 | 85 | #define IWL_QUZ_A_JF_B_FW_PRE "iwlwifi-QuZ-a0-jf-b0-" | 86 | #define IWL_QUZ_A_JF_B_FW_PRE "iwlwifi-QuZ-a0-jf-b0-" |
409 | 86 | #define IWL_QNJ_B_JF_B_FW_PRE "iwlwifi-QuQnj-b0-jf-b0-" | 87 | #define IWL_QNJ_B_JF_B_FW_PRE "iwlwifi-QuQnj-b0-jf-b0-" |
410 | @@ -97,8 +98,6 @@ | |||
411 | 97 | IWL_22000_JF_FW_PRE __stringify(api) ".ucode" | 98 | IWL_22000_JF_FW_PRE __stringify(api) ".ucode" |
412 | 98 | #define IWL_22000_HR_A_F0_QNJ_MODULE_FIRMWARE(api) \ | 99 | #define IWL_22000_HR_A_F0_QNJ_MODULE_FIRMWARE(api) \ |
413 | 99 | IWL_22000_HR_A_F0_FW_PRE __stringify(api) ".ucode" | 100 | IWL_22000_HR_A_F0_FW_PRE __stringify(api) ".ucode" |
414 | 100 | #define IWL_22000_HR_B_F0_QNJ_MODULE_FIRMWARE(api) \ | ||
415 | 101 | IWL_22000_HR_B_F0_FW_PRE __stringify(api) ".ucode" | ||
416 | 102 | #define IWL_22000_QU_B_HR_B_MODULE_FIRMWARE(api) \ | 101 | #define IWL_22000_QU_B_HR_B_MODULE_FIRMWARE(api) \ |
417 | 103 | IWL_22000_QU_B_HR_B_FW_PRE __stringify(api) ".ucode" | 102 | IWL_22000_QU_B_HR_B_FW_PRE __stringify(api) ".ucode" |
418 | 104 | #define IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(api) \ | 103 | #define IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(api) \ |
419 | @@ -109,6 +108,8 @@ | |||
420 | 109 | IWL_QUZ_A_HR_B_FW_PRE __stringify(api) ".ucode" | 108 | IWL_QUZ_A_HR_B_FW_PRE __stringify(api) ".ucode" |
421 | 110 | #define IWL_QUZ_A_JF_B_MODULE_FIRMWARE(api) \ | 109 | #define IWL_QUZ_A_JF_B_MODULE_FIRMWARE(api) \ |
422 | 111 | IWL_QUZ_A_JF_B_FW_PRE __stringify(api) ".ucode" | 110 | IWL_QUZ_A_JF_B_FW_PRE __stringify(api) ".ucode" |
423 | 111 | #define IWL_QU_C_HR_B_MODULE_FIRMWARE(api) \ | ||
424 | 112 | IWL_QU_C_HR_B_FW_PRE __stringify(api) ".ucode" | ||
425 | 112 | #define IWL_QU_B_JF_B_MODULE_FIRMWARE(api) \ | 113 | #define IWL_QU_B_JF_B_MODULE_FIRMWARE(api) \ |
426 | 113 | IWL_QU_B_JF_B_FW_PRE __stringify(api) ".ucode" | 114 | IWL_QU_B_JF_B_FW_PRE __stringify(api) ".ucode" |
427 | 114 | #define IWL_QNJ_B_JF_B_MODULE_FIRMWARE(api) \ | 115 | #define IWL_QNJ_B_JF_B_MODULE_FIRMWARE(api) \ |
428 | @@ -256,6 +257,30 @@ const struct iwl_cfg iwl_ax201_cfg_qu_hr = { | |||
429 | 256 | .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, | 257 | .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, |
430 | 257 | }; | 258 | }; |
431 | 258 | 259 | ||
432 | 260 | const struct iwl_cfg iwl_ax101_cfg_qu_c0_hr_b0 = { | ||
433 | 261 | .name = "Intel(R) Wi-Fi 6 AX101", | ||
434 | 262 | .fw_name_pre = IWL_QU_C_HR_B_FW_PRE, | ||
435 | 263 | IWL_DEVICE_22500, | ||
436 | 264 | /* | ||
437 | 265 | * This device doesn't support receiving BlockAck with a large bitmap | ||
438 | 266 | * so we need to restrict the size of transmitted aggregation to the | ||
439 | 267 | * HT size; mac80211 would otherwise pick the HE max (256) by default. | ||
440 | 268 | */ | ||
441 | 269 | .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, | ||
442 | 270 | }; | ||
443 | 271 | |||
444 | 272 | const struct iwl_cfg iwl_ax201_cfg_qu_c0_hr_b0 = { | ||
445 | 273 | .name = "Intel(R) Wi-Fi 6 AX201 160MHz", | ||
446 | 274 | .fw_name_pre = IWL_QU_C_HR_B_FW_PRE, | ||
447 | 275 | IWL_DEVICE_22500, | ||
448 | 276 | /* | ||
449 | 277 | * This device doesn't support receiving BlockAck with a large bitmap | ||
450 | 278 | * so we need to restrict the size of transmitted aggregation to the | ||
451 | 279 | * HT size; mac80211 would otherwise pick the HE max (256) by default. | ||
452 | 280 | */ | ||
453 | 281 | .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, | ||
454 | 282 | }; | ||
455 | 283 | |||
456 | 259 | const struct iwl_cfg iwl_ax101_cfg_quz_hr = { | 284 | const struct iwl_cfg iwl_ax101_cfg_quz_hr = { |
457 | 260 | .name = "Intel(R) Wi-Fi 6 AX101", | 285 | .name = "Intel(R) Wi-Fi 6 AX101", |
458 | 261 | .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE, | 286 | .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE, |
459 | @@ -372,6 +397,30 @@ const struct iwl_cfg iwl9560_2ac_160_cfg_qu_b0_jf_b0 = { | |||
460 | 372 | IWL_DEVICE_22500, | 397 | IWL_DEVICE_22500, |
461 | 373 | }; | 398 | }; |
462 | 374 | 399 | ||
463 | 400 | const struct iwl_cfg iwl9461_2ac_cfg_qu_c0_jf_b0 = { | ||
464 | 401 | .name = "Intel(R) Wireless-AC 9461", | ||
465 | 402 | .fw_name_pre = IWL_QU_C_JF_B_FW_PRE, | ||
466 | 403 | IWL_DEVICE_22500, | ||
467 | 404 | }; | ||
468 | 405 | |||
469 | 406 | const struct iwl_cfg iwl9462_2ac_cfg_qu_c0_jf_b0 = { | ||
470 | 407 | .name = "Intel(R) Wireless-AC 9462", | ||
471 | 408 | .fw_name_pre = IWL_QU_C_JF_B_FW_PRE, | ||
472 | 409 | IWL_DEVICE_22500, | ||
473 | 410 | }; | ||
474 | 411 | |||
475 | 412 | const struct iwl_cfg iwl9560_2ac_cfg_qu_c0_jf_b0 = { | ||
476 | 413 | .name = "Intel(R) Wireless-AC 9560", | ||
477 | 414 | .fw_name_pre = IWL_QU_C_JF_B_FW_PRE, | ||
478 | 415 | IWL_DEVICE_22500, | ||
479 | 416 | }; | ||
480 | 417 | |||
481 | 418 | const struct iwl_cfg iwl9560_2ac_160_cfg_qu_c0_jf_b0 = { | ||
482 | 419 | .name = "Intel(R) Wireless-AC 9560 160MHz", | ||
483 | 420 | .fw_name_pre = IWL_QU_C_JF_B_FW_PRE, | ||
484 | 421 | IWL_DEVICE_22500, | ||
485 | 422 | }; | ||
486 | 423 | |||
487 | 375 | const struct iwl_cfg iwl9560_2ac_cfg_qnj_jf_b0 = { | 424 | const struct iwl_cfg iwl9560_2ac_cfg_qnj_jf_b0 = { |
488 | 376 | .name = "Intel(R) Wireless-AC 9560 160MHz", | 425 | .name = "Intel(R) Wireless-AC 9560 160MHz", |
489 | 377 | .fw_name_pre = IWL_QNJ_B_JF_B_FW_PRE, | 426 | .fw_name_pre = IWL_QNJ_B_JF_B_FW_PRE, |
490 | @@ -530,7 +579,7 @@ const struct iwl_cfg iwl22000_2ax_cfg_qnj_hr_a0_f0 = { | |||
491 | 530 | 579 | ||
492 | 531 | const struct iwl_cfg iwl22000_2ax_cfg_qnj_hr_b0_f0 = { | 580 | const struct iwl_cfg iwl22000_2ax_cfg_qnj_hr_b0_f0 = { |
493 | 532 | .name = "Intel(R) Dual Band Wireless AX 22000", | 581 | .name = "Intel(R) Dual Band Wireless AX 22000", |
495 | 533 | .fw_name_pre = IWL_22000_HR_B_F0_FW_PRE, | 582 | .fw_name_pre = IWL_22000_QU_B_HR_B_FW_PRE, |
496 | 534 | IWL_DEVICE_22500, | 583 | IWL_DEVICE_22500, |
497 | 535 | /* | 584 | /* |
498 | 536 | * This device doesn't support receiving BlockAck with a large bitmap | 585 | * This device doesn't support receiving BlockAck with a large bitmap |
499 | @@ -599,9 +648,9 @@ const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0 = { | |||
500 | 599 | MODULE_FIRMWARE(IWL_22000_HR_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | 648 | MODULE_FIRMWARE(IWL_22000_HR_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); |
501 | 600 | MODULE_FIRMWARE(IWL_22000_JF_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | 649 | MODULE_FIRMWARE(IWL_22000_JF_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); |
502 | 601 | MODULE_FIRMWARE(IWL_22000_HR_A_F0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | 650 | MODULE_FIRMWARE(IWL_22000_HR_A_F0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); |
503 | 602 | MODULE_FIRMWARE(IWL_22000_HR_B_F0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | ||
504 | 603 | MODULE_FIRMWARE(IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | 651 | MODULE_FIRMWARE(IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); |
505 | 604 | MODULE_FIRMWARE(IWL_22000_HR_A0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | 652 | MODULE_FIRMWARE(IWL_22000_HR_A0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); |
506 | 653 | MODULE_FIRMWARE(IWL_QU_C_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | ||
507 | 605 | MODULE_FIRMWARE(IWL_QU_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | 654 | MODULE_FIRMWARE(IWL_QU_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); |
508 | 606 | MODULE_FIRMWARE(IWL_QUZ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | 655 | MODULE_FIRMWARE(IWL_QUZ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); |
509 | 607 | MODULE_FIRMWARE(IWL_QUZ_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | 656 | MODULE_FIRMWARE(IWL_QUZ_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); |
510 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h | |||
511 | index 991a234..6cb2d1f 100644 | |||
512 | --- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h | |||
513 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h | |||
514 | @@ -68,6 +68,7 @@ | |||
515 | 68 | #define ACPI_WRDD_METHOD "WRDD" | 68 | #define ACPI_WRDD_METHOD "WRDD" |
516 | 69 | #define ACPI_SPLC_METHOD "SPLC" | 69 | #define ACPI_SPLC_METHOD "SPLC" |
517 | 70 | #define ACPI_ECKV_METHOD "ECKV" | 70 | #define ACPI_ECKV_METHOD "ECKV" |
518 | 71 | #define ACPI_PPAG_METHOD "PPAG" | ||
519 | 71 | 72 | ||
520 | 72 | #define ACPI_WIFI_DOMAIN (0x07) | 73 | #define ACPI_WIFI_DOMAIN (0x07) |
521 | 73 | 74 | ||
522 | @@ -92,6 +93,17 @@ | |||
523 | 92 | #define ACPI_WGDS_NUM_BANDS 2 | 93 | #define ACPI_WGDS_NUM_BANDS 2 |
524 | 93 | #define ACPI_WGDS_TABLE_SIZE 3 | 94 | #define ACPI_WGDS_TABLE_SIZE 3 |
525 | 94 | 95 | ||
526 | 96 | #define ACPI_PPAG_NUM_CHAINS 2 | ||
527 | 97 | #define ACPI_PPAG_NUM_SUB_BANDS 5 | ||
528 | 98 | #define ACPI_PPAG_WIFI_DATA_SIZE ((ACPI_PPAG_NUM_CHAINS * \ | ||
529 | 99 | ACPI_PPAG_NUM_SUB_BANDS) + 3) | ||
530 | 100 | |||
531 | 101 | /* PPAG gain value bounds in 1/8 dBm */ | ||
532 | 102 | #define ACPI_PPAG_MIN_LB -16 | ||
533 | 103 | #define ACPI_PPAG_MAX_LB 24 | ||
534 | 104 | #define ACPI_PPAG_MIN_HB -16 | ||
535 | 105 | #define ACPI_PPAG_MAX_HB 40 | ||
536 | 106 | |||
537 | 95 | #ifdef CONFIG_ACPI | 107 | #ifdef CONFIG_ACPI |
538 | 96 | 108 | ||
539 | 97 | void *iwl_acpi_get_object(struct device *dev, acpi_string method); | 109 | void *iwl_acpi_get_object(struct device *dev, acpi_string method); |
540 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h b/drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h | |||
541 | index aaf3974..e02e289 100644 | |||
542 | --- a/drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h | |||
543 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h | |||
544 | @@ -439,6 +439,7 @@ enum iwl_fw_ini_apply_point { | |||
545 | 439 | * @IWL_FW_INI_ALLOCATION_ID_SDFX: for SDFX module | 439 | * @IWL_FW_INI_ALLOCATION_ID_SDFX: for SDFX module |
546 | 440 | * @IWL_FW_INI_ALLOCATION_ID_FW_DUMP: used for crash and runtime dumps | 440 | * @IWL_FW_INI_ALLOCATION_ID_FW_DUMP: used for crash and runtime dumps |
547 | 441 | * @IWL_FW_INI_ALLOCATION_ID_USER_DEFINED: for future user scenarios | 441 | * @IWL_FW_INI_ALLOCATION_ID_USER_DEFINED: for future user scenarios |
548 | 442 | * @IWL_FW_INI_ALLOCATION_NUM: number of allocation ids | ||
549 | 442 | */ | 443 | */ |
550 | 443 | enum iwl_fw_ini_allocation_id { | 444 | enum iwl_fw_ini_allocation_id { |
551 | 444 | IWL_FW_INI_ALLOCATION_INVALID, | 445 | IWL_FW_INI_ALLOCATION_INVALID, |
552 | @@ -448,6 +449,7 @@ enum iwl_fw_ini_allocation_id { | |||
553 | 448 | IWL_FW_INI_ALLOCATION_ID_SDFX, | 449 | IWL_FW_INI_ALLOCATION_ID_SDFX, |
554 | 449 | IWL_FW_INI_ALLOCATION_ID_FW_DUMP, | 450 | IWL_FW_INI_ALLOCATION_ID_FW_DUMP, |
555 | 450 | IWL_FW_INI_ALLOCATION_ID_USER_DEFINED, | 451 | IWL_FW_INI_ALLOCATION_ID_USER_DEFINED, |
556 | 452 | IWL_FW_INI_ALLOCATION_NUM, | ||
557 | 451 | }; /* FW_DEBUG_TLV_ALLOCATION_ID_E_VER_1 */ | 453 | }; /* FW_DEBUG_TLV_ALLOCATION_ID_E_VER_1 */ |
558 | 452 | 454 | ||
559 | 453 | /** | 455 | /** |
560 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/location.h b/drivers/net/wireless/intel/iwlwifi/fw/api/location.h | |||
561 | index ec864c7..7a0fe5a 100644 | |||
562 | --- a/drivers/net/wireless/intel/iwlwifi/fw/api/location.h | |||
563 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/location.h | |||
564 | @@ -82,7 +82,7 @@ enum iwl_location_subcmd_ids { | |||
565 | 82 | TOF_RANGE_ABORT_CMD = 0x2, | 82 | TOF_RANGE_ABORT_CMD = 0x2, |
566 | 83 | /** | 83 | /** |
567 | 84 | * @TOF_RANGE_REQ_EXT_CMD: TOF extended ranging config, | 84 | * @TOF_RANGE_REQ_EXT_CMD: TOF extended ranging config, |
569 | 85 | * uses &struct iwl_tof_range_request_ext_cmd | 85 | * uses &struct iwl_tof_range_req_ext_cmd |
570 | 86 | */ | 86 | */ |
571 | 87 | TOF_RANGE_REQ_EXT_CMD = 0x3, | 87 | TOF_RANGE_REQ_EXT_CMD = 0x3, |
572 | 88 | /** | 88 | /** |
573 | @@ -292,7 +292,7 @@ struct iwl_tof_responder_dyn_config_cmd { | |||
574 | 292 | } __packed; /* TOF_RESPONDER_DYN_CONFIG_CMD_API_S_VER_2 */ | 292 | } __packed; /* TOF_RESPONDER_DYN_CONFIG_CMD_API_S_VER_2 */ |
575 | 293 | 293 | ||
576 | 294 | /** | 294 | /** |
578 | 295 | * struct iwl_tof_range_request_ext_cmd - extended range req for WLS | 295 | * struct iwl_tof_range_req_ext_cmd - extended range req for WLS |
579 | 296 | * @tsf_timer_offset_msec: the recommended time offset (mSec) from the AP's TSF | 296 | * @tsf_timer_offset_msec: the recommended time offset (mSec) from the AP's TSF |
580 | 297 | * @reserved: reserved | 297 | * @reserved: reserved |
581 | 298 | * @min_delta_ftm: Minimal time between two consecutive measurements, | 298 | * @min_delta_ftm: Minimal time between two consecutive measurements, |
582 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/phy.h b/drivers/net/wireless/intel/iwlwifi/fw/api/phy.h | |||
583 | index 9cc59e0..8991ddf 100644 | |||
584 | --- a/drivers/net/wireless/intel/iwlwifi/fw/api/phy.h | |||
585 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/phy.h | |||
586 | @@ -8,6 +8,7 @@ | |||
587 | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
588 | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
589 | 10 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH | 10 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
590 | 11 | * Copyright(c) 2019 Intel Corporation | ||
591 | 11 | * | 12 | * |
592 | 12 | * This program is free software; you can redistribute it and/or modify | 13 | * This program is free software; you can redistribute it and/or modify |
593 | 13 | * it under the terms of version 2 of the GNU General Public License as | 14 | * it under the terms of version 2 of the GNU General Public License as |
594 | @@ -30,6 +31,7 @@ | |||
595 | 30 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. | 31 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
596 | 31 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 32 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
597 | 32 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH | 33 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
598 | 34 | * Copyright(c) 2019 Intel Corporation | ||
599 | 33 | * All rights reserved. | 35 | * All rights reserved. |
600 | 34 | * | 36 | * |
601 | 35 | * Redistribution and use in source and binary forms, with or without | 37 | * Redistribution and use in source and binary forms, with or without |
602 | @@ -90,6 +92,11 @@ enum iwl_phy_ops_subcmd_ids { | |||
603 | 90 | GEO_TX_POWER_LIMIT = 0x05, | 92 | GEO_TX_POWER_LIMIT = 0x05, |
604 | 91 | 93 | ||
605 | 92 | /** | 94 | /** |
606 | 95 | * @PER_PLATFORM_ANT_GAIN_CMD: &struct iwl_ppag_table_cmd | ||
607 | 96 | */ | ||
608 | 97 | PER_PLATFORM_ANT_GAIN_CMD = 0x07, | ||
609 | 98 | |||
610 | 99 | /** | ||
611 | 93 | * @CT_KILL_NOTIFICATION: &struct ct_kill_notif | 100 | * @CT_KILL_NOTIFICATION: &struct ct_kill_notif |
612 | 94 | */ | 101 | */ |
613 | 95 | CT_KILL_NOTIFICATION = 0xFE, | 102 | CT_KILL_NOTIFICATION = 0xFE, |
614 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/power.h b/drivers/net/wireless/intel/iwlwifi/fw/api/power.h | |||
615 | index f195db3..6e1b9b2 100644 | |||
616 | --- a/drivers/net/wireless/intel/iwlwifi/fw/api/power.h | |||
617 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/power.h | |||
618 | @@ -450,6 +450,18 @@ struct iwl_geo_tx_power_profiles_resp { | |||
619 | 450 | } __packed; /* GEO_TX_POWER_LIMIT_RESP */ | 450 | } __packed; /* GEO_TX_POWER_LIMIT_RESP */ |
620 | 451 | 451 | ||
621 | 452 | /** | 452 | /** |
622 | 453 | * struct iwl_ppag_table_cmd - struct for PER_PLATFORM_ANT_GAIN_CMD cmd. | ||
623 | 454 | * @enabled: 1 if PPAG is enabled, 0 otherwise | ||
624 | 455 | * @gain: table of antenna gain values per chain and sub-band | ||
625 | 456 | * @reserved: reserved | ||
626 | 457 | */ | ||
627 | 458 | struct iwl_ppag_table_cmd { | ||
628 | 459 | __le32 enabled; | ||
629 | 460 | s8 gain[IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS]; | ||
630 | 461 | s8 reserved[2]; | ||
631 | 462 | } __packed; /* PER_PLATFORM_ANT_GAIN_CMD */ | ||
632 | 463 | |||
633 | 464 | /** | ||
634 | 453 | * struct iwl_beacon_filter_cmd | 465 | * struct iwl_beacon_filter_cmd |
635 | 454 | * REPLY_BEACON_FILTERING_CMD = 0xd2 (command) | 466 | * REPLY_BEACON_FILTERING_CMD = 0xd2 (command) |
636 | 455 | * @bf_energy_delta: Used for RSSI filtering, if in 'normal' state. Send beacon | 467 | * @bf_energy_delta: Used for RSSI filtering, if in 'normal' state. Send beacon |
637 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h b/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | |||
638 | index 4a96090..2920a11 100644 | |||
639 | --- a/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | |||
640 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | |||
641 | @@ -777,7 +777,6 @@ struct iwl_rss_config_cmd { | |||
642 | 777 | u8 indirection_table[IWL_RSS_INDIRECTION_TABLE_SIZE]; | 777 | u8 indirection_table[IWL_RSS_INDIRECTION_TABLE_SIZE]; |
643 | 778 | } __packed; /* RSS_CONFIG_CMD_API_S_VER_1 */ | 778 | } __packed; /* RSS_CONFIG_CMD_API_S_VER_1 */ |
644 | 779 | 779 | ||
645 | 780 | #define IWL_MULTI_QUEUE_SYNC_MSG_MAX_SIZE 128 | ||
646 | 781 | #define IWL_MULTI_QUEUE_SYNC_SENDER_POS 0 | 780 | #define IWL_MULTI_QUEUE_SYNC_SENDER_POS 0 |
647 | 782 | #define IWL_MULTI_QUEUE_SYNC_SENDER_MSK 0xf | 781 | #define IWL_MULTI_QUEUE_SYNC_SENDER_MSK 0xf |
648 | 783 | 782 | ||
649 | @@ -813,10 +812,12 @@ struct iwl_rxq_sync_notification { | |||
650 | 813 | * | 812 | * |
651 | 814 | * @IWL_MVM_RXQ_EMPTY: empty sync notification | 813 | * @IWL_MVM_RXQ_EMPTY: empty sync notification |
652 | 815 | * @IWL_MVM_RXQ_NOTIF_DEL_BA: notify RSS queues of delBA | 814 | * @IWL_MVM_RXQ_NOTIF_DEL_BA: notify RSS queues of delBA |
653 | 815 | * @IWL_MVM_RXQ_NSSN_SYNC: notify all the RSS queues with the new NSSN | ||
654 | 816 | */ | 816 | */ |
655 | 817 | enum iwl_mvm_rxq_notif_type { | 817 | enum iwl_mvm_rxq_notif_type { |
656 | 818 | IWL_MVM_RXQ_EMPTY, | 818 | IWL_MVM_RXQ_EMPTY, |
657 | 819 | IWL_MVM_RXQ_NOTIF_DEL_BA, | 819 | IWL_MVM_RXQ_NOTIF_DEL_BA, |
658 | 820 | IWL_MVM_RXQ_NSSN_SYNC, | ||
659 | 820 | }; | 821 | }; |
660 | 821 | 822 | ||
661 | 822 | /** | 823 | /** |
662 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c | |||
663 | index d5a595a..d243f71 100644 | |||
664 | --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c | |||
665 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c | |||
666 | @@ -468,6 +468,9 @@ static const struct iwl_prph_range iwl_prph_dump_addr_9000[] = { | |||
667 | 468 | { .start = 0x00a05400, .end = 0x00a056e8 }, | 468 | { .start = 0x00a05400, .end = 0x00a056e8 }, |
668 | 469 | { .start = 0x00a08000, .end = 0x00a098bc }, | 469 | { .start = 0x00a08000, .end = 0x00a098bc }, |
669 | 470 | { .start = 0x00a02400, .end = 0x00a02758 }, | 470 | { .start = 0x00a02400, .end = 0x00a02758 }, |
670 | 471 | { .start = 0x00a04764, .end = 0x00a0476c }, | ||
671 | 472 | { .start = 0x00a04770, .end = 0x00a04774 }, | ||
672 | 473 | { .start = 0x00a04620, .end = 0x00a04624 }, | ||
673 | 471 | }; | 474 | }; |
674 | 472 | 475 | ||
675 | 473 | static const struct iwl_prph_range iwl_prph_dump_addr_22000[] = { | 476 | static const struct iwl_prph_range iwl_prph_dump_addr_22000[] = { |
676 | @@ -1905,8 +1908,6 @@ static void iwl_fw_ini_dump_trigger(struct iwl_fw_runtime *fwrt, | |||
677 | 1905 | iwl_dump_ini_mem(fwrt, data, reg, &ops); | 1908 | iwl_dump_ini_mem(fwrt, data, reg, &ops); |
678 | 1906 | break; | 1909 | break; |
679 | 1907 | case IWL_FW_INI_REGION_PERIPHERY_MAC: | 1910 | case IWL_FW_INI_REGION_PERIPHERY_MAC: |
680 | 1908 | case IWL_FW_INI_REGION_PERIPHERY_PHY: | ||
681 | 1909 | case IWL_FW_INI_REGION_PERIPHERY_AUX: | ||
682 | 1910 | ops.get_num_of_ranges = iwl_dump_ini_mem_ranges; | 1911 | ops.get_num_of_ranges = iwl_dump_ini_mem_ranges; |
683 | 1911 | ops.get_size = iwl_dump_ini_mem_get_size; | 1912 | ops.get_size = iwl_dump_ini_mem_get_size; |
684 | 1912 | ops.fill_mem_hdr = iwl_dump_ini_mem_fill_header; | 1913 | ops.fill_mem_hdr = iwl_dump_ini_mem_fill_header; |
685 | @@ -1971,6 +1972,8 @@ static void iwl_fw_ini_dump_trigger(struct iwl_fw_runtime *fwrt, | |||
686 | 1971 | ops.fill_range = iwl_dump_ini_csr_iter; | 1972 | ops.fill_range = iwl_dump_ini_csr_iter; |
687 | 1972 | iwl_dump_ini_mem(fwrt, data, reg, &ops); | 1973 | iwl_dump_ini_mem(fwrt, data, reg, &ops); |
688 | 1973 | break; | 1974 | break; |
689 | 1975 | case IWL_FW_INI_REGION_PERIPHERY_PHY: | ||
690 | 1976 | case IWL_FW_INI_REGION_PERIPHERY_AUX: | ||
691 | 1974 | case IWL_FW_INI_REGION_DRAM_IMR: | 1977 | case IWL_FW_INI_REGION_DRAM_IMR: |
692 | 1975 | /* This is undefined yet */ | 1978 | /* This is undefined yet */ |
693 | 1976 | default: | 1979 | default: |
694 | @@ -2481,8 +2484,7 @@ iwl_fw_dbg_buffer_allocation(struct iwl_fw_runtime *fwrt, u32 size) | |||
695 | 2481 | 2484 | ||
696 | 2482 | virtual_addr = | 2485 | virtual_addr = |
697 | 2483 | dma_alloc_coherent(fwrt->trans->dev, size, &phys_addr, | 2486 | dma_alloc_coherent(fwrt->trans->dev, size, &phys_addr, |
700 | 2484 | GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO | | 2487 | GFP_KERNEL | __GFP_NOWARN); |
699 | 2485 | __GFP_COMP); | ||
701 | 2486 | 2488 | ||
702 | 2487 | /* TODO: alloc fragments if needed */ | 2489 | /* TODO: alloc fragments if needed */ |
703 | 2488 | if (!virtual_addr) | 2490 | if (!virtual_addr) |
704 | @@ -2499,7 +2501,7 @@ iwl_fw_dbg_buffer_allocation(struct iwl_fw_runtime *fwrt, u32 size) | |||
705 | 2499 | } | 2501 | } |
706 | 2500 | 2502 | ||
707 | 2501 | static void iwl_fw_dbg_buffer_apply(struct iwl_fw_runtime *fwrt, | 2503 | static void iwl_fw_dbg_buffer_apply(struct iwl_fw_runtime *fwrt, |
709 | 2502 | struct iwl_fw_ini_allocation_data *alloc, | 2504 | struct iwl_fw_ini_allocation_tlv *alloc, |
710 | 2503 | enum iwl_fw_ini_apply_point pnt) | 2505 | enum iwl_fw_ini_apply_point pnt) |
711 | 2504 | { | 2506 | { |
712 | 2505 | struct iwl_trans *trans = fwrt->trans; | 2507 | struct iwl_trans *trans = fwrt->trans; |
713 | @@ -2514,7 +2516,14 @@ static void iwl_fw_dbg_buffer_apply(struct iwl_fw_runtime *fwrt, | |||
714 | 2514 | .len[0] = sizeof(ldbg_cmd), | 2516 | .len[0] = sizeof(ldbg_cmd), |
715 | 2515 | }; | 2517 | }; |
716 | 2516 | int block_idx = trans->dbg.num_blocks; | 2518 | int block_idx = trans->dbg.num_blocks; |
718 | 2517 | u32 buf_location = le32_to_cpu(alloc->tlv.buffer_location); | 2519 | u32 buf_location = le32_to_cpu(alloc->buffer_location); |
719 | 2520 | u32 alloc_id = le32_to_cpu(alloc->allocation_id); | ||
720 | 2521 | |||
721 | 2522 | if (alloc_id <= IWL_FW_INI_ALLOCATION_INVALID || | ||
722 | 2523 | alloc_id >= IWL_FW_INI_ALLOCATION_NUM) { | ||
723 | 2524 | IWL_ERR(fwrt, "WRT: Invalid allocation id %d\n", alloc_id); | ||
724 | 2525 | return; | ||
725 | 2526 | } | ||
726 | 2518 | 2527 | ||
727 | 2519 | if (fwrt->trans->dbg.ini_dest == IWL_FW_INI_LOCATION_INVALID) | 2528 | if (fwrt->trans->dbg.ini_dest == IWL_FW_INI_LOCATION_INVALID) |
728 | 2520 | fwrt->trans->dbg.ini_dest = buf_location; | 2529 | fwrt->trans->dbg.ini_dest = buf_location; |
729 | @@ -2539,12 +2548,11 @@ static void iwl_fw_dbg_buffer_apply(struct iwl_fw_runtime *fwrt, | |||
730 | 2539 | if (buf_location != IWL_FW_INI_LOCATION_DRAM_PATH) | 2548 | if (buf_location != IWL_FW_INI_LOCATION_DRAM_PATH) |
731 | 2540 | return; | 2549 | return; |
732 | 2541 | 2550 | ||
736 | 2542 | if (!alloc->is_alloc) { | 2551 | if (!(BIT(alloc_id) & fwrt->trans->dbg.is_alloc)) { |
737 | 2543 | iwl_fw_dbg_buffer_allocation(fwrt, | 2552 | iwl_fw_dbg_buffer_allocation(fwrt, le32_to_cpu(alloc->size)); |
735 | 2544 | le32_to_cpu(alloc->tlv.size)); | ||
738 | 2545 | if (block_idx == trans->dbg.num_blocks) | 2553 | if (block_idx == trans->dbg.num_blocks) |
739 | 2546 | return; | 2554 | return; |
741 | 2547 | alloc->is_alloc = 1; | 2555 | fwrt->trans->dbg.is_alloc |= BIT(alloc_id); |
742 | 2548 | } | 2556 | } |
743 | 2549 | 2557 | ||
744 | 2550 | /* First block is assigned via registers / context info */ | 2558 | /* First block is assigned via registers / context info */ |
745 | @@ -2557,9 +2565,9 @@ static void iwl_fw_dbg_buffer_apply(struct iwl_fw_runtime *fwrt, | |||
746 | 2557 | cmd->num_frags = cpu_to_le32(1); | 2565 | cmd->num_frags = cpu_to_le32(1); |
747 | 2558 | cmd->fragments[0].address = | 2566 | cmd->fragments[0].address = |
748 | 2559 | cpu_to_le64(trans->dbg.fw_mon[block_idx].physical); | 2567 | cpu_to_le64(trans->dbg.fw_mon[block_idx].physical); |
752 | 2560 | cmd->fragments[0].size = alloc->tlv.size; | 2568 | cmd->fragments[0].size = alloc->size; |
753 | 2561 | cmd->allocation_id = alloc->tlv.allocation_id; | 2569 | cmd->allocation_id = alloc->allocation_id; |
754 | 2562 | cmd->buffer_location = alloc->tlv.buffer_location; | 2570 | cmd->buffer_location = alloc->buffer_location; |
755 | 2563 | 2571 | ||
756 | 2564 | iwl_trans_send_cmd(trans, &hcmd); | 2572 | iwl_trans_send_cmd(trans, &hcmd); |
757 | 2565 | } | 2573 | } |
758 | @@ -2773,10 +2781,13 @@ static void _iwl_fw_dbg_apply_point(struct iwl_fw_runtime *fwrt, | |||
759 | 2773 | enum iwl_fw_ini_apply_point pnt, | 2781 | enum iwl_fw_ini_apply_point pnt, |
760 | 2774 | bool ext) | 2782 | bool ext) |
761 | 2775 | { | 2783 | { |
763 | 2776 | void *iter = data->data; | 2784 | struct iwl_apply_point_data *iter; |
764 | 2785 | |||
765 | 2786 | if (!data->list.next) | ||
766 | 2787 | return; | ||
767 | 2777 | 2788 | ||
770 | 2778 | while (iter && iter < data->data + data->size) { | 2789 | list_for_each_entry(iter, &data->list, list) { |
771 | 2779 | struct iwl_ucode_tlv *tlv = iter; | 2790 | struct iwl_ucode_tlv *tlv = &iter->tlv; |
772 | 2780 | void *ini_tlv = (void *)tlv->data; | 2791 | void *ini_tlv = (void *)tlv->data; |
773 | 2781 | u32 type = le32_to_cpu(tlv->type); | 2792 | u32 type = le32_to_cpu(tlv->type); |
774 | 2782 | const char invalid_ap_str[] = | 2793 | const char invalid_ap_str[] = |
775 | @@ -2786,24 +2797,19 @@ static void _iwl_fw_dbg_apply_point(struct iwl_fw_runtime *fwrt, | |||
776 | 2786 | case IWL_UCODE_TLV_TYPE_DEBUG_INFO: | 2797 | case IWL_UCODE_TLV_TYPE_DEBUG_INFO: |
777 | 2787 | iwl_fw_dbg_info_apply(fwrt, ini_tlv, ext, pnt); | 2798 | iwl_fw_dbg_info_apply(fwrt, ini_tlv, ext, pnt); |
778 | 2788 | break; | 2799 | break; |
782 | 2789 | case IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION: { | 2800 | case IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION: |
780 | 2790 | struct iwl_fw_ini_allocation_data *buf_alloc = ini_tlv; | ||
781 | 2791 | |||
783 | 2792 | if (pnt != IWL_FW_INI_APPLY_EARLY) { | 2801 | if (pnt != IWL_FW_INI_APPLY_EARLY) { |
784 | 2793 | IWL_ERR(fwrt, invalid_ap_str, ext, pnt, | 2802 | IWL_ERR(fwrt, invalid_ap_str, ext, pnt, |
785 | 2794 | "buffer allocation"); | 2803 | "buffer allocation"); |
787 | 2795 | goto next; | 2804 | break; |
788 | 2796 | } | 2805 | } |
789 | 2797 | |||
790 | 2798 | iwl_fw_dbg_buffer_apply(fwrt, ini_tlv, pnt); | 2806 | iwl_fw_dbg_buffer_apply(fwrt, ini_tlv, pnt); |
791 | 2799 | iter += sizeof(buf_alloc->is_alloc); | ||
792 | 2800 | break; | 2807 | break; |
793 | 2801 | } | ||
794 | 2802 | case IWL_UCODE_TLV_TYPE_HCMD: | 2808 | case IWL_UCODE_TLV_TYPE_HCMD: |
795 | 2803 | if (pnt < IWL_FW_INI_APPLY_AFTER_ALIVE) { | 2809 | if (pnt < IWL_FW_INI_APPLY_AFTER_ALIVE) { |
796 | 2804 | IWL_ERR(fwrt, invalid_ap_str, ext, pnt, | 2810 | IWL_ERR(fwrt, invalid_ap_str, ext, pnt, |
797 | 2805 | "host command"); | 2811 | "host command"); |
799 | 2806 | goto next; | 2812 | break; |
800 | 2807 | } | 2813 | } |
801 | 2808 | iwl_fw_dbg_send_hcmd(fwrt, tlv, ext); | 2814 | iwl_fw_dbg_send_hcmd(fwrt, tlv, ext); |
802 | 2809 | break; | 2815 | break; |
803 | @@ -2821,8 +2827,6 @@ static void _iwl_fw_dbg_apply_point(struct iwl_fw_runtime *fwrt, | |||
804 | 2821 | ext, type); | 2827 | ext, type); |
805 | 2822 | break; | 2828 | break; |
806 | 2823 | } | 2829 | } |
807 | 2824 | next: | ||
808 | 2825 | iter += sizeof(*tlv) + le32_to_cpu(tlv->length); | ||
809 | 2826 | } | 2830 | } |
810 | 2827 | } | 2831 | } |
811 | 2828 | 2832 | ||
812 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/file.h b/drivers/net/wireless/intel/iwlwifi/fw/file.h | |||
813 | index a2b9299..d2b162f 100644 | |||
814 | --- a/drivers/net/wireless/intel/iwlwifi/fw/file.h | |||
815 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/file.h | |||
816 | @@ -476,6 +476,7 @@ enum iwl_ucode_tlv_capa { | |||
817 | 476 | IWL_UCODE_TLV_CAPA_ULTRA_HB_CHANNELS = (__force iwl_ucode_tlv_capa_t)48, | 476 | IWL_UCODE_TLV_CAPA_ULTRA_HB_CHANNELS = (__force iwl_ucode_tlv_capa_t)48, |
818 | 477 | IWL_UCODE_TLV_CAPA_CS_MODIFY = (__force iwl_ucode_tlv_capa_t)49, | 477 | IWL_UCODE_TLV_CAPA_CS_MODIFY = (__force iwl_ucode_tlv_capa_t)49, |
819 | 478 | IWL_UCODE_TLV_CAPA_SET_LTR_GEN2 = (__force iwl_ucode_tlv_capa_t)50, | 478 | IWL_UCODE_TLV_CAPA_SET_LTR_GEN2 = (__force iwl_ucode_tlv_capa_t)50, |
820 | 479 | IWL_UCODE_TLV_CAPA_SET_PPAG = (__force iwl_ucode_tlv_capa_t)52, | ||
821 | 479 | 480 | ||
822 | 480 | /* set 2 */ | 481 | /* set 2 */ |
823 | 481 | IWL_UCODE_TLV_CAPA_EXTENDED_DTS_MEASURE = (__force iwl_ucode_tlv_capa_t)64, | 482 | IWL_UCODE_TLV_CAPA_EXTENDED_DTS_MEASURE = (__force iwl_ucode_tlv_capa_t)64, |
824 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/img.h b/drivers/net/wireless/intel/iwlwifi/fw/img.h | |||
825 | index 18ca5f1..039576d 100644 | |||
826 | --- a/drivers/net/wireless/intel/iwlwifi/fw/img.h | |||
827 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/img.h | |||
828 | @@ -228,15 +228,6 @@ struct iwl_fw_dbg { | |||
829 | 228 | }; | 228 | }; |
830 | 229 | 229 | ||
831 | 230 | /** | 230 | /** |
832 | 231 | * @tlv: the buffer allocation tlv | ||
833 | 232 | * @is_alloc: indicates if the buffer was already allocated | ||
834 | 233 | */ | ||
835 | 234 | struct iwl_fw_ini_allocation_data { | ||
836 | 235 | struct iwl_fw_ini_allocation_tlv tlv; | ||
837 | 236 | u32 is_alloc; | ||
838 | 237 | } __packed; | ||
839 | 238 | |||
840 | 239 | /** | ||
841 | 240 | * struct iwl_fw_ini_active_triggers | 231 | * struct iwl_fw_ini_active_triggers |
842 | 241 | * @active: is this trigger active | 232 | * @active: is this trigger active |
843 | 242 | * @size: allocated memory size of the trigger | 233 | * @size: allocated memory size of the trigger |
844 | diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h | |||
845 | index 286bc0c..2cc02f0 100644 | |||
846 | --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h | |||
847 | +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h | |||
848 | @@ -523,10 +523,13 @@ extern const struct iwl_cfg iwl22000_2ac_cfg_hr; | |||
849 | 523 | extern const struct iwl_cfg iwl22000_2ac_cfg_hr_cdb; | 523 | extern const struct iwl_cfg iwl22000_2ac_cfg_hr_cdb; |
850 | 524 | extern const struct iwl_cfg iwl22000_2ac_cfg_jf; | 524 | extern const struct iwl_cfg iwl22000_2ac_cfg_jf; |
851 | 525 | extern const struct iwl_cfg iwl_ax101_cfg_qu_hr; | 525 | extern const struct iwl_cfg iwl_ax101_cfg_qu_hr; |
852 | 526 | extern const struct iwl_cfg iwl_ax101_cfg_qu_c0_hr_b0; | ||
853 | 526 | extern const struct iwl_cfg iwl_ax101_cfg_quz_hr; | 527 | extern const struct iwl_cfg iwl_ax101_cfg_quz_hr; |
854 | 527 | extern const struct iwl_cfg iwl22000_2ax_cfg_hr; | 528 | extern const struct iwl_cfg iwl22000_2ax_cfg_hr; |
855 | 528 | extern const struct iwl_cfg iwl_ax200_cfg_cc; | 529 | extern const struct iwl_cfg iwl_ax200_cfg_cc; |
856 | 529 | extern const struct iwl_cfg iwl_ax201_cfg_qu_hr; | 530 | extern const struct iwl_cfg iwl_ax201_cfg_qu_hr; |
857 | 531 | extern const struct iwl_cfg iwl_ax201_cfg_qu_hr; | ||
858 | 532 | extern const struct iwl_cfg iwl_ax201_cfg_qu_c0_hr_b0; | ||
859 | 530 | extern const struct iwl_cfg iwl_ax201_cfg_quz_hr; | 533 | extern const struct iwl_cfg iwl_ax201_cfg_quz_hr; |
860 | 531 | extern const struct iwl_cfg iwl_ax1650i_cfg_quz_hr; | 534 | extern const struct iwl_cfg iwl_ax1650i_cfg_quz_hr; |
861 | 532 | extern const struct iwl_cfg iwl_ax1650s_cfg_quz_hr; | 535 | extern const struct iwl_cfg iwl_ax1650s_cfg_quz_hr; |
862 | @@ -538,6 +541,10 @@ extern const struct iwl_cfg iwl9461_2ac_cfg_qu_b0_jf_b0; | |||
863 | 538 | extern const struct iwl_cfg iwl9462_2ac_cfg_qu_b0_jf_b0; | 541 | extern const struct iwl_cfg iwl9462_2ac_cfg_qu_b0_jf_b0; |
864 | 539 | extern const struct iwl_cfg iwl9560_2ac_cfg_qu_b0_jf_b0; | 542 | extern const struct iwl_cfg iwl9560_2ac_cfg_qu_b0_jf_b0; |
865 | 540 | extern const struct iwl_cfg iwl9560_2ac_160_cfg_qu_b0_jf_b0; | 543 | extern const struct iwl_cfg iwl9560_2ac_160_cfg_qu_b0_jf_b0; |
866 | 544 | extern const struct iwl_cfg iwl9461_2ac_cfg_qu_c0_jf_b0; | ||
867 | 545 | extern const struct iwl_cfg iwl9462_2ac_cfg_qu_c0_jf_b0; | ||
868 | 546 | extern const struct iwl_cfg iwl9560_2ac_cfg_qu_c0_jf_b0; | ||
869 | 547 | extern const struct iwl_cfg iwl9560_2ac_160_cfg_qu_c0_jf_b0; | ||
870 | 541 | extern const struct iwl_cfg killer1550i_2ac_cfg_qu_b0_jf_b0; | 548 | extern const struct iwl_cfg killer1550i_2ac_cfg_qu_b0_jf_b0; |
871 | 542 | extern const struct iwl_cfg killer1550s_2ac_cfg_qu_b0_jf_b0; | 549 | extern const struct iwl_cfg killer1550s_2ac_cfg_qu_b0_jf_b0; |
872 | 543 | extern const struct iwl_cfg iwl22000_2ax_cfg_jf; | 550 | extern const struct iwl_cfg iwl22000_2ax_cfg_jf; |
873 | diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-csr.h b/drivers/net/wireless/intel/iwlwifi/iwl-csr.h | |||
874 | index 1c867ce..cb4c551 100644 | |||
875 | --- a/drivers/net/wireless/intel/iwlwifi/iwl-csr.h | |||
876 | +++ b/drivers/net/wireless/intel/iwlwifi/iwl-csr.h | |||
877 | @@ -329,6 +329,7 @@ enum { | |||
878 | 329 | #define CSR_HW_REV_TYPE_QNJ (0x0000360) | 329 | #define CSR_HW_REV_TYPE_QNJ (0x0000360) |
879 | 330 | #define CSR_HW_REV_TYPE_QNJ_B0 (0x0000364) | 330 | #define CSR_HW_REV_TYPE_QNJ_B0 (0x0000364) |
880 | 331 | #define CSR_HW_REV_TYPE_QU_B0 (0x0000334) | 331 | #define CSR_HW_REV_TYPE_QU_B0 (0x0000334) |
881 | 332 | #define CSR_HW_REV_TYPE_QU_C0 (0x0000338) | ||
882 | 332 | #define CSR_HW_REV_TYPE_QUZ (0x0000354) | 333 | #define CSR_HW_REV_TYPE_QUZ (0x0000354) |
883 | 333 | #define CSR_HW_REV_TYPE_HR_CDB (0x0000340) | 334 | #define CSR_HW_REV_TYPE_HR_CDB (0x0000340) |
884 | 334 | #define CSR_HW_REV_TYPE_SO (0x0000370) | 335 | #define CSR_HW_REV_TYPE_SO (0x0000370) |
885 | diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | |||
886 | index c4481aa..3029236 100644 | |||
887 | --- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | |||
888 | +++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | |||
889 | @@ -60,143 +60,79 @@ | |||
890 | 60 | #include "iwl-trans.h" | 60 | #include "iwl-trans.h" |
891 | 61 | #include "iwl-dbg-tlv.h" | 61 | #include "iwl-dbg-tlv.h" |
892 | 62 | 62 | ||
895 | 63 | void iwl_fw_dbg_copy_tlv(struct iwl_trans *trans, struct iwl_ucode_tlv *tlv, | 63 | void iwl_dbg_tlv_copy(struct iwl_trans *trans, struct iwl_ucode_tlv *tlv, |
896 | 64 | bool ext) | 64 | bool ext) |
897 | 65 | { | 65 | { |
899 | 66 | struct iwl_apply_point_data *data; | 66 | struct iwl_apply_point_data *dbg_cfg, *tlv_copy; |
900 | 67 | struct iwl_fw_ini_header *header = (void *)&tlv->data[0]; | 67 | struct iwl_fw_ini_header *header = (void *)&tlv->data[0]; |
901 | 68 | u32 tlv_type = le32_to_cpu(tlv->type); | ||
902 | 69 | u32 len = le32_to_cpu(tlv->length); | ||
903 | 68 | u32 apply_point = le32_to_cpu(header->apply_point); | 70 | u32 apply_point = le32_to_cpu(header->apply_point); |
904 | 69 | 71 | ||
905 | 70 | int copy_size = le32_to_cpu(tlv->length) + sizeof(*tlv); | ||
906 | 71 | int offset_size = copy_size; | ||
907 | 72 | |||
908 | 73 | if (le32_to_cpu(header->tlv_version) != 1) | 72 | if (le32_to_cpu(header->tlv_version) != 1) |
909 | 74 | return; | 73 | return; |
910 | 75 | 74 | ||
911 | 76 | if (WARN_ONCE(apply_point >= IWL_FW_INI_APPLY_NUM, | 75 | if (WARN_ONCE(apply_point >= IWL_FW_INI_APPLY_NUM, |
913 | 77 | "Invalid apply point id %d\n", apply_point)) | 76 | "Invalid apply point %d\n", apply_point)) |
914 | 78 | return; | 77 | return; |
915 | 79 | 78 | ||
916 | 79 | IWL_DEBUG_FW(trans, "WRT: read TLV 0x%x, apply point %d\n", | ||
917 | 80 | tlv_type, apply_point); | ||
918 | 81 | |||
919 | 80 | if (ext) | 82 | if (ext) |
921 | 81 | data = &trans->dbg.apply_points_ext[apply_point]; | 83 | dbg_cfg = &trans->dbg.apply_points_ext[apply_point]; |
922 | 82 | else | 84 | else |
932 | 83 | data = &trans->dbg.apply_points[apply_point]; | 85 | dbg_cfg = &trans->dbg.apply_points[apply_point]; |
924 | 84 | |||
925 | 85 | /* add room for is_alloc field in &iwl_fw_ini_allocation_data struct */ | ||
926 | 86 | if (le32_to_cpu(tlv->type) == IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION) { | ||
927 | 87 | struct iwl_fw_ini_allocation_data *buf_alloc = | ||
928 | 88 | (void *)tlv->data; | ||
929 | 89 | |||
930 | 90 | offset_size += sizeof(buf_alloc->is_alloc); | ||
931 | 91 | } | ||
933 | 92 | 86 | ||
941 | 93 | /* | 87 | tlv_copy = kzalloc(sizeof(*tlv_copy) + len, GFP_KERNEL); |
942 | 94 | * Make sure we still have room to copy this TLV. Offset points to the | 88 | if (!tlv_copy) { |
943 | 95 | * location the last copy ended. | 89 | IWL_ERR(trans, "WRT: No memory for TLV 0x%x, apply point %d\n", |
944 | 96 | */ | 90 | tlv_type, apply_point); |
938 | 97 | if (WARN_ONCE(data->offset + offset_size > data->size, | ||
939 | 98 | "Not enough memory for apply point %d\n", | ||
940 | 99 | apply_point)) | ||
945 | 100 | return; | 91 | return; |
946 | 101 | |||
947 | 102 | memcpy(data->data + data->offset, (void *)tlv, copy_size); | ||
948 | 103 | data->offset += offset_size; | ||
949 | 104 | } | ||
950 | 105 | |||
951 | 106 | void iwl_alloc_dbg_tlv(struct iwl_trans *trans, size_t len, const u8 *data, | ||
952 | 107 | bool ext) | ||
953 | 108 | { | ||
954 | 109 | struct iwl_ucode_tlv *tlv; | ||
955 | 110 | u32 size[IWL_FW_INI_APPLY_NUM] = {0}; | ||
956 | 111 | int i; | ||
957 | 112 | |||
958 | 113 | while (len >= sizeof(*tlv)) { | ||
959 | 114 | u32 tlv_len, tlv_type, apply; | ||
960 | 115 | struct iwl_fw_ini_header *hdr; | ||
961 | 116 | |||
962 | 117 | len -= sizeof(*tlv); | ||
963 | 118 | tlv = (void *)data; | ||
964 | 119 | |||
965 | 120 | tlv_len = le32_to_cpu(tlv->length); | ||
966 | 121 | tlv_type = le32_to_cpu(tlv->type); | ||
967 | 122 | |||
968 | 123 | if (len < tlv_len) | ||
969 | 124 | return; | ||
970 | 125 | |||
971 | 126 | len -= ALIGN(tlv_len, 4); | ||
972 | 127 | data += sizeof(*tlv) + ALIGN(tlv_len, 4); | ||
973 | 128 | |||
974 | 129 | if (tlv_type < IWL_UCODE_TLV_DEBUG_BASE || | ||
975 | 130 | tlv_type > IWL_UCODE_TLV_DEBUG_MAX) | ||
976 | 131 | continue; | ||
977 | 132 | |||
978 | 133 | hdr = (void *)&tlv->data[0]; | ||
979 | 134 | apply = le32_to_cpu(hdr->apply_point); | ||
980 | 135 | |||
981 | 136 | if (le32_to_cpu(hdr->tlv_version) != 1) | ||
982 | 137 | continue; | ||
983 | 138 | |||
984 | 139 | IWL_DEBUG_FW(trans, "WRT: read TLV 0x%x, apply point %d\n", | ||
985 | 140 | le32_to_cpu(tlv->type), apply); | ||
986 | 141 | |||
987 | 142 | if (WARN_ON(apply >= IWL_FW_INI_APPLY_NUM)) | ||
988 | 143 | continue; | ||
989 | 144 | |||
990 | 145 | /* add room for is_alloc field in &iwl_fw_ini_allocation_data | ||
991 | 146 | * struct | ||
992 | 147 | */ | ||
993 | 148 | if (tlv_type == IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION) { | ||
994 | 149 | struct iwl_fw_ini_allocation_data *buf_alloc = | ||
995 | 150 | (void *)tlv->data; | ||
996 | 151 | |||
997 | 152 | size[apply] += sizeof(buf_alloc->is_alloc); | ||
998 | 153 | } | ||
999 | 154 | |||
1000 | 155 | size[apply] += sizeof(*tlv) + tlv_len; | ||
1001 | 156 | } | 92 | } |
1002 | 157 | 93 | ||
1005 | 158 | for (i = 0; i < ARRAY_SIZE(size); i++) { | 94 | INIT_LIST_HEAD(&tlv_copy->list); |
1006 | 159 | void *mem; | 95 | memcpy(&tlv_copy->tlv, tlv, sizeof(*tlv) + len); |
1007 | 160 | 96 | ||
1010 | 161 | if (!size[i]) | 97 | if (!dbg_cfg->list.next) |
1011 | 162 | continue; | 98 | INIT_LIST_HEAD(&dbg_cfg->list); |
1012 | 163 | 99 | ||
1014 | 164 | mem = kzalloc(size[i], GFP_KERNEL); | 100 | list_add_tail(&tlv_copy->list, &dbg_cfg->list); |
1015 | 165 | 101 | ||
1020 | 166 | if (!mem) { | 102 | trans->dbg.ini_valid = true; |
1021 | 167 | IWL_ERR(trans, "No memory for apply point %d\n", i); | 103 | } |
1018 | 168 | return; | ||
1019 | 169 | } | ||
1022 | 170 | 104 | ||
1030 | 171 | if (ext) { | 105 | static void iwl_dbg_tlv_free_list(struct list_head *list) |
1031 | 172 | trans->dbg.apply_points_ext[i].data = mem; | 106 | { |
1032 | 173 | trans->dbg.apply_points_ext[i].size = size[i]; | 107 | if (!list || !list->next) |
1033 | 174 | } else { | 108 | return; |
1027 | 175 | trans->dbg.apply_points[i].data = mem; | ||
1028 | 176 | trans->dbg.apply_points[i].size = size[i]; | ||
1029 | 177 | } | ||
1034 | 178 | 109 | ||
1036 | 179 | trans->dbg.ini_valid = true; | 110 | while (!list_empty(list)) { |
1037 | 111 | struct iwl_apply_point_data *node = | ||
1038 | 112 | list_entry(list->next, typeof(*node), list); | ||
1039 | 113 | |||
1040 | 114 | list_del(&node->list); | ||
1041 | 115 | kfree(node); | ||
1042 | 180 | } | 116 | } |
1043 | 181 | } | 117 | } |
1044 | 182 | 118 | ||
1046 | 183 | void iwl_fw_dbg_free(struct iwl_trans *trans) | 119 | void iwl_dbg_tlv_free(struct iwl_trans *trans) |
1047 | 184 | { | 120 | { |
1048 | 185 | int i; | 121 | int i; |
1049 | 186 | 122 | ||
1050 | 187 | for (i = 0; i < ARRAY_SIZE(trans->dbg.apply_points); i++) { | 123 | for (i = 0; i < ARRAY_SIZE(trans->dbg.apply_points); i++) { |
1054 | 188 | kfree(trans->dbg.apply_points[i].data); | 124 | struct iwl_apply_point_data *data; |
1055 | 189 | trans->dbg.apply_points[i].size = 0; | 125 | |
1056 | 190 | trans->dbg.apply_points[i].offset = 0; | 126 | data = &trans->dbg.apply_points[i]; |
1057 | 127 | iwl_dbg_tlv_free_list(&data->list); | ||
1058 | 191 | 128 | ||
1062 | 192 | kfree(trans->dbg.apply_points_ext[i].data); | 129 | data = &trans->dbg.apply_points_ext[i]; |
1063 | 193 | trans->dbg.apply_points_ext[i].size = 0; | 130 | iwl_dbg_tlv_free_list(&data->list); |
1061 | 194 | trans->dbg.apply_points_ext[i].offset = 0; | ||
1064 | 195 | } | 131 | } |
1065 | 196 | } | 132 | } |
1066 | 197 | 133 | ||
1069 | 198 | static int iwl_parse_fw_dbg_tlv(struct iwl_trans *trans, const u8 *data, | 134 | static int iwl_dbg_tlv_parse_bin(struct iwl_trans *trans, const u8 *data, |
1070 | 199 | size_t len) | 135 | size_t len) |
1071 | 200 | { | 136 | { |
1072 | 201 | struct iwl_ucode_tlv *tlv; | 137 | struct iwl_ucode_tlv *tlv; |
1073 | 202 | enum iwl_ucode_tlv_type tlv_type; | 138 | enum iwl_ucode_tlv_type tlv_type; |
1074 | @@ -224,7 +160,7 @@ static int iwl_parse_fw_dbg_tlv(struct iwl_trans *trans, const u8 *data, | |||
1075 | 224 | case IWL_UCODE_TLV_TYPE_REGIONS: | 160 | case IWL_UCODE_TLV_TYPE_REGIONS: |
1076 | 225 | case IWL_UCODE_TLV_TYPE_TRIGGERS: | 161 | case IWL_UCODE_TLV_TYPE_TRIGGERS: |
1077 | 226 | case IWL_UCODE_TLV_TYPE_DEBUG_FLOW: | 162 | case IWL_UCODE_TLV_TYPE_DEBUG_FLOW: |
1079 | 227 | iwl_fw_dbg_copy_tlv(trans, tlv, true); | 163 | iwl_dbg_tlv_copy(trans, tlv, true); |
1080 | 228 | break; | 164 | break; |
1081 | 229 | default: | 165 | default: |
1082 | 230 | WARN_ONCE(1, "Invalid TLV %x\n", tlv_type); | 166 | WARN_ONCE(1, "Invalid TLV %x\n", tlv_type); |
1083 | @@ -235,7 +171,7 @@ static int iwl_parse_fw_dbg_tlv(struct iwl_trans *trans, const u8 *data, | |||
1084 | 235 | return 0; | 171 | return 0; |
1085 | 236 | } | 172 | } |
1086 | 237 | 173 | ||
1088 | 238 | void iwl_load_fw_dbg_tlv(struct device *dev, struct iwl_trans *trans) | 174 | void iwl_dbg_tlv_load_bin(struct device *dev, struct iwl_trans *trans) |
1089 | 239 | { | 175 | { |
1090 | 240 | const struct firmware *fw; | 176 | const struct firmware *fw; |
1091 | 241 | int res; | 177 | int res; |
1092 | @@ -247,8 +183,7 @@ void iwl_load_fw_dbg_tlv(struct device *dev, struct iwl_trans *trans) | |||
1093 | 247 | if (res) | 183 | if (res) |
1094 | 248 | return; | 184 | return; |
1095 | 249 | 185 | ||
1098 | 250 | iwl_alloc_dbg_tlv(trans, fw->size, fw->data, true); | 186 | iwl_dbg_tlv_parse_bin(trans, fw->data, fw->size); |
1097 | 251 | iwl_parse_fw_dbg_tlv(trans, fw->data, fw->size); | ||
1099 | 252 | 187 | ||
1100 | 253 | trans->dbg.external_ini_loaded = true; | 188 | trans->dbg.external_ini_loaded = true; |
1101 | 254 | release_firmware(fw); | 189 | release_firmware(fw); |
1102 | diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.h b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.h | |||
1103 | index ee416f4..20c60a9 100644 | |||
1104 | --- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.h | |||
1105 | +++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.h | |||
1106 | @@ -5,7 +5,7 @@ | |||
1107 | 5 | * | 5 | * |
1108 | 6 | * GPL LICENSE SUMMARY | 6 | * GPL LICENSE SUMMARY |
1109 | 7 | * | 7 | * |
1111 | 8 | * Copyright (C) 2018 Intel Corporation | 8 | * Copyright (C) 2018 - 2019 Intel Corporation |
1112 | 9 | * | 9 | * |
1113 | 10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
1114 | 11 | * it under the terms of version 2 of the GNU General Public License as | 11 | * it under the terms of version 2 of the GNU General Public License as |
1115 | @@ -25,7 +25,7 @@ | |||
1116 | 25 | * | 25 | * |
1117 | 26 | * BSD LICENSE | 26 | * BSD LICENSE |
1118 | 27 | * | 27 | * |
1120 | 28 | * Copyright (C) 2018 Intel Corporation | 28 | * Copyright (C) 2018 - 2019 Intel Corporation |
1121 | 29 | * All rights reserved. | 29 | * All rights reserved. |
1122 | 30 | * | 30 | * |
1123 | 31 | * Redistribution and use in source and binary forms, with or without | 31 | * Redistribution and use in source and binary forms, with or without |
1124 | @@ -63,22 +63,18 @@ | |||
1125 | 63 | 63 | ||
1126 | 64 | /** | 64 | /** |
1127 | 65 | * struct iwl_apply_point_data | 65 | * struct iwl_apply_point_data |
1131 | 66 | * @data: start address of this apply point data | 66 | * @list: list to go through the TLVs of the apply point |
1132 | 67 | * @size total size of the data | 67 | * @tlv: a debug TLV |
1130 | 68 | * @offset: current offset of the copied data | ||
1133 | 69 | */ | 68 | */ |
1134 | 70 | struct iwl_apply_point_data { | 69 | struct iwl_apply_point_data { |
1138 | 71 | void *data; | 70 | struct list_head list; |
1139 | 72 | int size; | 71 | struct iwl_ucode_tlv tlv; |
1137 | 73 | int offset; | ||
1140 | 74 | }; | 72 | }; |
1141 | 75 | 73 | ||
1142 | 76 | struct iwl_trans; | 74 | struct iwl_trans; |
1149 | 77 | void iwl_load_fw_dbg_tlv(struct device *dev, struct iwl_trans *trans); | 75 | void iwl_dbg_tlv_load_bin(struct device *dev, struct iwl_trans *trans); |
1150 | 78 | void iwl_fw_dbg_free(struct iwl_trans *trans); | 76 | void iwl_dbg_tlv_free(struct iwl_trans *trans); |
1151 | 79 | void iwl_fw_dbg_copy_tlv(struct iwl_trans *trans, struct iwl_ucode_tlv *tlv, | 77 | void iwl_dbg_tlv_copy(struct iwl_trans *trans, struct iwl_ucode_tlv *tlv, |
1152 | 80 | bool ext); | 78 | bool ext); |
1147 | 81 | void iwl_alloc_dbg_tlv(struct iwl_trans *trans, size_t len, const u8 *data, | ||
1148 | 82 | bool ext); | ||
1153 | 83 | 79 | ||
1154 | 84 | #endif /* __iwl_dbg_tlv_h__*/ | 80 | #endif /* __iwl_dbg_tlv_h__*/ |
1155 | diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c | |||
1156 | index c4bfbb8..f70a749 100644 | |||
1157 | --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c | |||
1158 | +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c | |||
1159 | @@ -897,9 +897,6 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv, | |||
1160 | 897 | fw_dbg_conf: | 897 | fw_dbg_conf: |
1161 | 898 | #endif | 898 | #endif |
1162 | 899 | 899 | ||
1163 | 900 | if (iwlwifi_mod_params.enable_ini) | ||
1164 | 901 | iwl_alloc_dbg_tlv(drv->trans, len, data, false); | ||
1165 | 902 | |||
1166 | 903 | while (len >= sizeof(*tlv)) { | 900 | while (len >= sizeof(*tlv)) { |
1167 | 904 | len -= sizeof(*tlv); | 901 | len -= sizeof(*tlv); |
1168 | 905 | tlv = (void *)data; | 902 | tlv = (void *)data; |
1169 | @@ -1437,7 +1434,7 @@ fw_dbg_conf: | |||
1170 | 1437 | case IWL_UCODE_TLV_TYPE_TRIGGERS: | 1434 | case IWL_UCODE_TLV_TYPE_TRIGGERS: |
1171 | 1438 | case IWL_UCODE_TLV_TYPE_DEBUG_FLOW: | 1435 | case IWL_UCODE_TLV_TYPE_DEBUG_FLOW: |
1172 | 1439 | if (iwlwifi_mod_params.enable_ini) | 1436 | if (iwlwifi_mod_params.enable_ini) |
1174 | 1440 | iwl_fw_dbg_copy_tlv(drv->trans, tlv, false); | 1437 | iwl_dbg_tlv_copy(drv->trans, tlv, false); |
1175 | 1441 | break; | 1438 | break; |
1176 | 1442 | case IWL_UCODE_TLV_CMD_VERSIONS: | 1439 | case IWL_UCODE_TLV_CMD_VERSIONS: |
1177 | 1443 | if (tlv_len % sizeof(struct iwl_fw_cmd_version)) { | 1440 | if (tlv_len % sizeof(struct iwl_fw_cmd_version)) { |
1178 | @@ -1956,9 +1953,8 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans) | |||
1179 | 1956 | #ifdef CPTCFG_IWLWIFI_SUPPORT_DEBUG_OVERRIDES | 1953 | #ifdef CPTCFG_IWLWIFI_SUPPORT_DEBUG_OVERRIDES |
1180 | 1957 | trans->dbg_cfg = current_dbg_config; | 1954 | trans->dbg_cfg = current_dbg_config; |
1181 | 1958 | iwl_dbg_cfg_load_ini(drv->trans->dev, &drv->trans->dbg_cfg); | 1955 | iwl_dbg_cfg_load_ini(drv->trans->dev, &drv->trans->dbg_cfg); |
1182 | 1959 | |||
1183 | 1960 | iwl_load_fw_dbg_tlv(drv->trans->dev, drv->trans); | ||
1184 | 1961 | #endif | 1956 | #endif |
1185 | 1957 | iwl_dbg_tlv_load_bin(drv->trans->dev, drv->trans); | ||
1186 | 1962 | 1958 | ||
1187 | 1963 | #ifdef CPTCFG_IWLWIFI_DEBUGFS | 1959 | #ifdef CPTCFG_IWLWIFI_DEBUGFS |
1188 | 1964 | /* Create the device debugfs entries. */ | 1960 | /* Create the device debugfs entries. */ |
1189 | @@ -1995,8 +1991,8 @@ err_fw: | |||
1190 | 1995 | #endif | 1991 | #endif |
1191 | 1996 | #ifdef CPTCFG_IWLWIFI_DEBUGFS | 1992 | #ifdef CPTCFG_IWLWIFI_DEBUGFS |
1192 | 1997 | debugfs_remove_recursive(drv->dbgfs_drv); | 1993 | debugfs_remove_recursive(drv->dbgfs_drv); |
1193 | 1998 | iwl_fw_dbg_free(drv->trans); | ||
1194 | 1999 | #endif | 1994 | #endif |
1195 | 1995 | iwl_dbg_tlv_free(drv->trans); | ||
1196 | 2000 | kfree(drv); | 1996 | kfree(drv); |
1197 | 2001 | err: | 1997 | err: |
1198 | 2002 | return ERR_PTR(ret); | 1998 | return ERR_PTR(ret); |
1199 | @@ -2029,7 +2025,7 @@ void iwl_drv_stop(struct iwl_drv *drv) | |||
1200 | 2029 | #ifdef CPTCFG_IWLWIFI_SUPPORT_DEBUG_OVERRIDES | 2025 | #ifdef CPTCFG_IWLWIFI_SUPPORT_DEBUG_OVERRIDES |
1201 | 2030 | iwl_dbg_cfg_free(&drv->trans->dbg_cfg); | 2026 | iwl_dbg_cfg_free(&drv->trans->dbg_cfg); |
1202 | 2031 | #endif | 2027 | #endif |
1204 | 2032 | iwl_fw_dbg_free(drv->trans); | 2028 | iwl_dbg_tlv_free(drv->trans); |
1205 | 2033 | 2029 | ||
1206 | 2034 | #if IS_ENABLED(CPTCFG_IWLXVT) | 2030 | #if IS_ENABLED(CPTCFG_IWLXVT) |
1207 | 2035 | iwl_remove_sysfs_file(drv); | 2031 | iwl_remove_sysfs_file(drv); |
1208 | diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | |||
1209 | index 1b26b5d..c83de0e 100644 | |||
1210 | --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | |||
1211 | +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | |||
1212 | @@ -1232,11 +1232,6 @@ static u32 iwl_nvm_get_regdom_bw_flags(const u16 *nvm_chan, | |||
1213 | 1232 | return flags; | 1232 | return flags; |
1214 | 1233 | } | 1233 | } |
1215 | 1234 | 1234 | ||
1216 | 1235 | struct regdb_ptrs { | ||
1217 | 1236 | struct ieee80211_wmm_rule *rule; | ||
1218 | 1237 | u32 token; | ||
1219 | 1238 | }; | ||
1220 | 1239 | |||
1221 | 1240 | struct ieee80211_regdomain * | 1235 | struct ieee80211_regdomain * |
1222 | 1241 | iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, | 1236 | iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, |
1223 | 1242 | int num_of_ch, __le32 *channels, u16 fw_mcc, | 1237 | int num_of_ch, __le32 *channels, u16 fw_mcc, |
1224 | @@ -1248,7 +1243,6 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, | |||
1225 | 1248 | const u16 *nvm_chan; | 1243 | const u16 *nvm_chan; |
1226 | 1249 | struct ieee80211_regdomain *regd, *copy_rd; | 1244 | struct ieee80211_regdomain *regd, *copy_rd; |
1227 | 1250 | struct ieee80211_reg_rule *rule; | 1245 | struct ieee80211_reg_rule *rule; |
1228 | 1251 | struct regdb_ptrs *regdb_ptrs; | ||
1229 | 1252 | enum nl80211_band band; | 1246 | enum nl80211_band band; |
1230 | 1253 | int center_freq, prev_center_freq = 0; | 1247 | int center_freq, prev_center_freq = 0; |
1231 | 1254 | int valid_rules = 0; | 1248 | int valid_rules = 0; |
1232 | @@ -1280,12 +1274,6 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, | |||
1233 | 1280 | if (!regd) | 1274 | if (!regd) |
1234 | 1281 | return ERR_PTR(-ENOMEM); | 1275 | return ERR_PTR(-ENOMEM); |
1235 | 1282 | 1276 | ||
1236 | 1283 | regdb_ptrs = kcalloc(num_of_ch, sizeof(*regdb_ptrs), GFP_KERNEL); | ||
1237 | 1284 | if (!regdb_ptrs) { | ||
1238 | 1285 | copy_rd = ERR_PTR(-ENOMEM); | ||
1239 | 1286 | goto out; | ||
1240 | 1287 | } | ||
1241 | 1288 | |||
1242 | 1289 | /* set alpha2 from FW. */ | 1277 | /* set alpha2 from FW. */ |
1243 | 1290 | regd->alpha2[0] = fw_mcc >> 8; | 1278 | regd->alpha2[0] = fw_mcc >> 8; |
1244 | 1291 | regd->alpha2[1] = fw_mcc & 0xff; | 1279 | regd->alpha2[1] = fw_mcc & 0xff; |
1245 | @@ -1357,8 +1345,6 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, | |||
1246 | 1357 | if (!copy_rd) | 1345 | if (!copy_rd) |
1247 | 1358 | copy_rd = ERR_PTR(-ENOMEM); | 1346 | copy_rd = ERR_PTR(-ENOMEM); |
1248 | 1359 | 1347 | ||
1249 | 1360 | out: | ||
1250 | 1361 | kfree(regdb_ptrs); | ||
1251 | 1362 | kfree(regd); | 1348 | kfree(regd); |
1252 | 1363 | return copy_rd; | 1349 | return copy_rd; |
1253 | 1364 | } | 1350 | } |
1254 | diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-tm-gnl.c b/drivers/net/wireless/intel/iwlwifi/iwl-tm-gnl.c | |||
1255 | index 79be4e6..55358f5 100644 | |||
1256 | --- a/drivers/net/wireless/intel/iwlwifi/iwl-tm-gnl.c | |||
1257 | +++ b/drivers/net/wireless/intel/iwlwifi/iwl-tm-gnl.c | |||
1258 | @@ -5,10 +5,9 @@ | |||
1259 | 5 | * | 5 | * |
1260 | 6 | * GPL LICENSE SUMMARY | 6 | * GPL LICENSE SUMMARY |
1261 | 7 | * | 7 | * |
1263 | 8 | * Copyright(c) 2010 - 2014 Intel Corporation. All rights reserved. | 8 | * Copyright(c) 2010 - 2014, 2018 - 2019 Intel Corporation |
1264 | 9 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH | 9 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH |
1265 | 10 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH | 10 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
1266 | 11 | * Copyright(c) 2018 Intel Corporation | ||
1267 | 12 | * | 11 | * |
1268 | 13 | * This program is free software; you can redistribute it and/or modify | 12 | * This program is free software; you can redistribute it and/or modify |
1269 | 14 | * it under the terms of version 2 of the GNU General Public License as | 13 | * it under the terms of version 2 of the GNU General Public License as |
1270 | @@ -28,10 +27,9 @@ | |||
1271 | 28 | * | 27 | * |
1272 | 29 | * BSD LICENSE | 28 | * BSD LICENSE |
1273 | 30 | * | 29 | * |
1275 | 31 | * Copyright(c) 2010 - 2014 Intel Corporation. All rights reserved. | 30 | * Copyright(c) 2010 - 2014, 2018 - 2019 Intel Corporation |
1276 | 32 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH | 31 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH |
1277 | 33 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH | 32 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
1278 | 34 | * Copyright(c) 2018 Intel Corporation | ||
1279 | 35 | * All rights reserved. | 33 | * All rights reserved. |
1280 | 36 | * | 34 | * |
1281 | 37 | * Redistribution and use in source and binary forms, with or without | 35 | * Redistribution and use in source and binary forms, with or without |
1282 | @@ -1081,14 +1079,20 @@ static int iwl_tm_gnl_cmd_subscribe(struct sk_buff *skb, struct genl_info *info) | |||
1283 | 1081 | static __genl_const struct genl_ops iwl_tm_gnl_ops[] = { | 1079 | static __genl_const struct genl_ops iwl_tm_gnl_ops[] = { |
1284 | 1082 | { | 1080 | { |
1285 | 1083 | .cmd = IWL_TM_GNL_CMD_EXECUTE, | 1081 | .cmd = IWL_TM_GNL_CMD_EXECUTE, |
1287 | 1084 | .policy = iwl_tm_gnl_msg_policy, | 1082 | #if LINUX_VERSION_IS_GEQ(5,2,0) |
1288 | 1083 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
1289 | 1084 | #endif | ||
1290 | 1085 | |||
1291 | 1085 | .doit = iwl_tm_gnl_cmd_do, | 1086 | .doit = iwl_tm_gnl_cmd_do, |
1292 | 1086 | .dumpit = iwl_tm_gnl_dump, | 1087 | .dumpit = iwl_tm_gnl_dump, |
1293 | 1087 | .done = iwl_tm_gnl_done, | 1088 | .done = iwl_tm_gnl_done, |
1294 | 1088 | }, | 1089 | }, |
1295 | 1089 | { | 1090 | { |
1296 | 1090 | .cmd = IWL_TM_GNL_CMD_SUBSCRIBE_EVENTS, | 1091 | .cmd = IWL_TM_GNL_CMD_SUBSCRIBE_EVENTS, |
1298 | 1091 | .policy = iwl_tm_gnl_msg_policy, | 1092 | #if LINUX_VERSION_IS_GEQ(5,2,0) |
1299 | 1093 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
1300 | 1094 | #endif | ||
1301 | 1095 | |||
1302 | 1092 | .doit = iwl_tm_gnl_cmd_subscribe, | 1096 | .doit = iwl_tm_gnl_cmd_subscribe, |
1303 | 1093 | }, | 1097 | }, |
1304 | 1094 | }; | 1098 | }; |
1305 | @@ -1098,6 +1102,7 @@ static struct genl_family iwl_tm_gnl_family __genl_ro_after_init = { | |||
1306 | 1098 | .name = IWL_TM_GNL_FAMILY_NAME, | 1102 | .name = IWL_TM_GNL_FAMILY_NAME, |
1307 | 1099 | .version = IWL_TM_GNL_VERSION_NR, | 1103 | .version = IWL_TM_GNL_VERSION_NR, |
1308 | 1100 | .maxattr = IWL_TM_GNL_MSG_ATTR_MAX, | 1104 | .maxattr = IWL_TM_GNL_MSG_ATTR_MAX, |
1309 | 1105 | .policy = iwl_tm_gnl_msg_policy, | ||
1310 | 1101 | .module = THIS_MODULE, | 1106 | .module = THIS_MODULE, |
1311 | 1102 | .ops = iwl_tm_gnl_ops, | 1107 | .ops = iwl_tm_gnl_ops, |
1312 | 1103 | .n_ops = ARRAY_SIZE(iwl_tm_gnl_ops), | 1108 | .n_ops = ARRAY_SIZE(iwl_tm_gnl_ops), |
1313 | diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h | |||
1314 | index 6d156ee..6d0403a 100644 | |||
1315 | --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h | |||
1316 | +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h | |||
1317 | @@ -708,6 +708,7 @@ struct iwl_self_init_dram { | |||
1318 | 708 | * @ini_valid: indicates if debug ini mode is on | 708 | * @ini_valid: indicates if debug ini mode is on |
1319 | 709 | * @num_blocks: number of blocks in fw_mon | 709 | * @num_blocks: number of blocks in fw_mon |
1320 | 710 | * @fw_mon: address of the buffers for firmware monitor | 710 | * @fw_mon: address of the buffers for firmware monitor |
1321 | 711 | * @is_alloc: bit i is set if buffer i was allocated | ||
1322 | 711 | * @hw_error: equals true if hw error interrupt was received from the FW | 712 | * @hw_error: equals true if hw error interrupt was received from the FW |
1323 | 712 | * @ini_dest: debug monitor destination uses &enum iwl_fw_ini_buffer_location | 713 | * @ini_dest: debug monitor destination uses &enum iwl_fw_ini_buffer_location |
1324 | 713 | */ | 714 | */ |
1325 | @@ -730,7 +731,8 @@ struct iwl_trans_debug { | |||
1326 | 730 | struct iwl_apply_point_data apply_points_ext[IWL_FW_INI_APPLY_NUM]; | 731 | struct iwl_apply_point_data apply_points_ext[IWL_FW_INI_APPLY_NUM]; |
1327 | 731 | 732 | ||
1328 | 732 | int num_blocks; | 733 | int num_blocks; |
1330 | 733 | struct iwl_dram_data fw_mon[IWL_FW_INI_APPLY_NUM]; | 734 | struct iwl_dram_data fw_mon[IWL_FW_INI_ALLOCATION_NUM]; |
1331 | 735 | u32 is_alloc; | ||
1332 | 734 | 736 | ||
1333 | 735 | bool hw_error; | 737 | bool hw_error; |
1334 | 736 | enum iwl_fw_ini_buffer_location ini_dest; | 738 | enum iwl_fw_ini_buffer_location ini_dest; |
1335 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c | |||
1336 | index 5e6cd75..dfc553e 100644 | |||
1337 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c | |||
1338 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c | |||
1339 | @@ -1965,6 +1965,9 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test) | |||
1340 | 1965 | */ | 1965 | */ |
1341 | 1966 | iwl_mvm_update_changed_regdom(mvm); | 1966 | iwl_mvm_update_changed_regdom(mvm); |
1342 | 1967 | 1967 | ||
1343 | 1968 | /* Re-configure PPAG settings */ | ||
1344 | 1969 | iwl_mvm_ppag_send_cmd(mvm); | ||
1345 | 1970 | |||
1346 | 1968 | if (!unified_image) | 1971 | if (!unified_image) |
1347 | 1969 | /* Re-configure default SAR profile */ | 1972 | /* Re-configure default SAR profile */ |
1348 | 1970 | iwl_mvm_sar_select_profile(mvm, 1, 1); | 1973 | iwl_mvm_sar_select_profile(mvm, 1, 1); |
1349 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c | |||
1350 | index bb2ad8b..e413f0a 100644 | |||
1351 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c | |||
1352 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c | |||
1353 | @@ -987,6 +987,17 @@ int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b) | |||
1354 | 987 | return iwl_mvm_send_cmd_pdu(mvm, REDUCE_TX_POWER_CMD, 0, len, &cmd); | 987 | return iwl_mvm_send_cmd_pdu(mvm, REDUCE_TX_POWER_CMD, 0, len, &cmd); |
1355 | 988 | } | 988 | } |
1356 | 989 | 989 | ||
1357 | 990 | static bool iwl_mvm_sar_geo_support(struct iwl_mvm *mvm) | ||
1358 | 991 | { | ||
1359 | 992 | /* | ||
1360 | 993 | * The GEO_TX_POWER_LIMIT command is not supported on earlier | ||
1361 | 994 | * firmware versions. Unfortunately, we don't have a TLV API | ||
1362 | 995 | * flag to rely on, so rely on the major version which is in | ||
1363 | 996 | * the first byte of ucode_ver. | ||
1364 | 997 | */ | ||
1365 | 998 | return IWL_UCODE_SERIAL(mvm->fw->ucode_ver) >= 41; | ||
1366 | 999 | } | ||
1367 | 1000 | |||
1368 | 990 | int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm) | 1001 | int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm) |
1369 | 991 | { | 1002 | { |
1370 | 992 | struct iwl_geo_tx_power_profiles_resp *resp; | 1003 | struct iwl_geo_tx_power_profiles_resp *resp; |
1371 | @@ -1016,6 +1027,9 @@ int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm) | |||
1372 | 1016 | .data = { data }, | 1027 | .data = { data }, |
1373 | 1017 | }; | 1028 | }; |
1374 | 1018 | 1029 | ||
1375 | 1030 | if (!iwl_mvm_sar_geo_support(mvm)) | ||
1376 | 1031 | return -EOPNOTSUPP; | ||
1377 | 1032 | |||
1378 | 1019 | ret = iwl_mvm_send_cmd(mvm, &cmd); | 1033 | ret = iwl_mvm_send_cmd(mvm, &cmd); |
1379 | 1020 | if (ret) { | 1034 | if (ret) { |
1380 | 1021 | IWL_ERR(mvm, "Failed to get geographic profile info %d\n", ret); | 1035 | IWL_ERR(mvm, "Failed to get geographic profile info %d\n", ret); |
1381 | @@ -1041,13 +1055,7 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm) | |||
1382 | 1041 | int ret, i, j; | 1055 | int ret, i, j; |
1383 | 1042 | u16 cmd_wide_id = WIDE_ID(PHY_OPS_GROUP, GEO_TX_POWER_LIMIT); | 1056 | u16 cmd_wide_id = WIDE_ID(PHY_OPS_GROUP, GEO_TX_POWER_LIMIT); |
1384 | 1043 | 1057 | ||
1392 | 1044 | /* | 1058 | if (!iwl_mvm_sar_geo_support(mvm)) |
1386 | 1045 | * This command is not supported on earlier firmware versions. | ||
1387 | 1046 | * Unfortunately, we don't have a TLV API flag to rely on, so | ||
1388 | 1047 | * rely on the major version which is in the first byte of | ||
1389 | 1048 | * ucode_ver. | ||
1390 | 1049 | */ | ||
1391 | 1050 | if (IWL_UCODE_SERIAL(mvm->fw->ucode_ver) < 41) | ||
1393 | 1051 | return 0; | 1059 | return 0; |
1394 | 1052 | 1060 | ||
1395 | 1053 | ret = iwl_mvm_sar_get_wgds_table(mvm); | 1061 | ret = iwl_mvm_sar_get_wgds_table(mvm); |
1396 | @@ -1096,6 +1104,113 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm) | |||
1397 | 1096 | return iwl_mvm_send_cmd_pdu(mvm, cmd_wide_id, 0, sizeof(cmd), &cmd); | 1104 | return iwl_mvm_send_cmd_pdu(mvm, cmd_wide_id, 0, sizeof(cmd), &cmd); |
1398 | 1097 | } | 1105 | } |
1399 | 1098 | 1106 | ||
1400 | 1107 | static int iwl_mvm_get_ppag_table(struct iwl_mvm *mvm) | ||
1401 | 1108 | { | ||
1402 | 1109 | union acpi_object *wifi_pkg, *data, *enabled; | ||
1403 | 1110 | int i, j, ret, tbl_rev; | ||
1404 | 1111 | int idx = 2; | ||
1405 | 1112 | |||
1406 | 1113 | mvm->ppag_table.enabled = cpu_to_le32(0); | ||
1407 | 1114 | data = iwl_acpi_get_object(mvm->dev, ACPI_PPAG_METHOD); | ||
1408 | 1115 | if (IS_ERR(data)) | ||
1409 | 1116 | return PTR_ERR(data); | ||
1410 | 1117 | |||
1411 | 1118 | wifi_pkg = iwl_acpi_get_wifi_pkg(mvm->dev, data, | ||
1412 | 1119 | ACPI_PPAG_WIFI_DATA_SIZE, &tbl_rev); | ||
1413 | 1120 | |||
1414 | 1121 | if (IS_ERR(wifi_pkg) || tbl_rev != 0) { | ||
1415 | 1122 | ret = PTR_ERR(wifi_pkg); | ||
1416 | 1123 | goto out_free; | ||
1417 | 1124 | } | ||
1418 | 1125 | |||
1419 | 1126 | enabled = &wifi_pkg->package.elements[1]; | ||
1420 | 1127 | if (enabled->type != ACPI_TYPE_INTEGER || | ||
1421 | 1128 | (enabled->integer.value != 0 && enabled->integer.value != 1)) { | ||
1422 | 1129 | ret = -EINVAL; | ||
1423 | 1130 | goto out_free; | ||
1424 | 1131 | } | ||
1425 | 1132 | |||
1426 | 1133 | mvm->ppag_table.enabled = cpu_to_le32(enabled->integer.value); | ||
1427 | 1134 | if (!mvm->ppag_table.enabled) { | ||
1428 | 1135 | ret = 0; | ||
1429 | 1136 | goto out_free; | ||
1430 | 1137 | } | ||
1431 | 1138 | |||
1432 | 1139 | /* | ||
1433 | 1140 | * read, verify gain values and save them into the PPAG table. | ||
1434 | 1141 | * first sub-band (j=0) corresponds to Low-Band (2.4GHz), and the | ||
1435 | 1142 | * following sub-bands to High-Band (5GHz). | ||
1436 | 1143 | */ | ||
1437 | 1144 | for (i = 0; i < ACPI_PPAG_NUM_CHAINS; i++) { | ||
1438 | 1145 | for (j = 0; j < ACPI_PPAG_NUM_SUB_BANDS; j++) { | ||
1439 | 1146 | union acpi_object *ent; | ||
1440 | 1147 | |||
1441 | 1148 | ent = &wifi_pkg->package.elements[idx++]; | ||
1442 | 1149 | if (ent->type != ACPI_TYPE_INTEGER || | ||
1443 | 1150 | (j == 0 && ent->integer.value > ACPI_PPAG_MAX_LB) || | ||
1444 | 1151 | (j == 0 && ent->integer.value < ACPI_PPAG_MIN_LB) || | ||
1445 | 1152 | (j != 0 && ent->integer.value > ACPI_PPAG_MAX_HB) || | ||
1446 | 1153 | (j != 0 && ent->integer.value < ACPI_PPAG_MIN_HB)) { | ||
1447 | 1154 | mvm->ppag_table.enabled = cpu_to_le32(0); | ||
1448 | 1155 | ret = -EINVAL; | ||
1449 | 1156 | goto out_free; | ||
1450 | 1157 | } | ||
1451 | 1158 | mvm->ppag_table.gain[i][j] = ent->integer.value; | ||
1452 | 1159 | } | ||
1453 | 1160 | } | ||
1454 | 1161 | ret = 0; | ||
1455 | 1162 | out_free: | ||
1456 | 1163 | kfree(data); | ||
1457 | 1164 | return ret; | ||
1458 | 1165 | } | ||
1459 | 1166 | |||
1460 | 1167 | int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm) | ||
1461 | 1168 | { | ||
1462 | 1169 | int i, j, ret; | ||
1463 | 1170 | |||
1464 | 1171 | if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_SET_PPAG)) { | ||
1465 | 1172 | IWL_DEBUG_RADIO(mvm, | ||
1466 | 1173 | "PPAG capability not supported by FW, command not sent.\n"); | ||
1467 | 1174 | return 0; | ||
1468 | 1175 | } | ||
1469 | 1176 | |||
1470 | 1177 | IWL_DEBUG_RADIO(mvm, "Sending PER_PLATFORM_ANT_GAIN_CMD\n"); | ||
1471 | 1178 | IWL_DEBUG_RADIO(mvm, "PPAG is %s\n", | ||
1472 | 1179 | mvm->ppag_table.enabled ? "enabled" : "disabled"); | ||
1473 | 1180 | |||
1474 | 1181 | for (i = 0; i < ACPI_PPAG_NUM_CHAINS; i++) { | ||
1475 | 1182 | for (j = 0; j < ACPI_PPAG_NUM_SUB_BANDS; j++) { | ||
1476 | 1183 | IWL_DEBUG_RADIO(mvm, | ||
1477 | 1184 | "PPAG table: chain[%d] band[%d]: gain = %d\n", | ||
1478 | 1185 | i, j, mvm->ppag_table.gain[i][j]); | ||
1479 | 1186 | } | ||
1480 | 1187 | } | ||
1481 | 1188 | |||
1482 | 1189 | ret = iwl_mvm_send_cmd_pdu(mvm, WIDE_ID(PHY_OPS_GROUP, | ||
1483 | 1190 | PER_PLATFORM_ANT_GAIN_CMD), | ||
1484 | 1191 | 0, sizeof(mvm->ppag_table), | ||
1485 | 1192 | &mvm->ppag_table); | ||
1486 | 1193 | if (ret < 0) | ||
1487 | 1194 | IWL_ERR(mvm, "failed to send PER_PLATFORM_ANT_GAIN_CMD (%d)\n", | ||
1488 | 1195 | ret); | ||
1489 | 1196 | |||
1490 | 1197 | return ret; | ||
1491 | 1198 | } | ||
1492 | 1199 | |||
1493 | 1200 | static int iwl_mvm_ppag_init(struct iwl_mvm *mvm) | ||
1494 | 1201 | { | ||
1495 | 1202 | int ret; | ||
1496 | 1203 | |||
1497 | 1204 | ret = iwl_mvm_get_ppag_table(mvm); | ||
1498 | 1205 | if (ret < 0) { | ||
1499 | 1206 | IWL_DEBUG_RADIO(mvm, | ||
1500 | 1207 | "PPAG BIOS table invalid or unavailable. (%d)\n", | ||
1501 | 1208 | ret); | ||
1502 | 1209 | return 0; | ||
1503 | 1210 | } | ||
1504 | 1211 | return iwl_mvm_ppag_send_cmd(mvm); | ||
1505 | 1212 | } | ||
1506 | 1213 | |||
1507 | 1099 | #else /* CONFIG_ACPI */ | 1214 | #else /* CONFIG_ACPI */ |
1508 | 1100 | static int iwl_mvm_sar_get_wrds_table(struct iwl_mvm *mvm) | 1215 | static int iwl_mvm_sar_get_wrds_table(struct iwl_mvm *mvm) |
1509 | 1101 | { | 1216 | { |
1510 | @@ -1127,6 +1242,21 @@ int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm) | |||
1511 | 1127 | { | 1242 | { |
1512 | 1128 | return -ENOENT; | 1243 | return -ENOENT; |
1513 | 1129 | } | 1244 | } |
1514 | 1245 | |||
1515 | 1246 | static int iwl_mvm_get_ppag_table(struct iwl_mvm *mvm) | ||
1516 | 1247 | { | ||
1517 | 1248 | return -ENOENT; | ||
1518 | 1249 | } | ||
1519 | 1250 | |||
1520 | 1251 | static int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm) | ||
1521 | 1252 | { | ||
1522 | 1253 | return -ENOENT; | ||
1523 | 1254 | } | ||
1524 | 1255 | |||
1525 | 1256 | static int iwl_mvm_ppag_init(struct iwl_mvm *mvm) | ||
1526 | 1257 | { | ||
1527 | 1258 | return -ENOENT; | ||
1528 | 1259 | } | ||
1529 | 1130 | #endif /* CONFIG_ACPI */ | 1260 | #endif /* CONFIG_ACPI */ |
1530 | 1131 | 1261 | ||
1531 | 1132 | void iwl_mvm_send_recovery_cmd(struct iwl_mvm *mvm, u32 flags) | 1262 | void iwl_mvm_send_recovery_cmd(struct iwl_mvm *mvm, u32 flags) |
1532 | @@ -1497,6 +1627,10 @@ int iwl_mvm_up(struct iwl_mvm *mvm) | |||
1533 | 1497 | if (iwl_acpi_get_eckv(mvm->dev, &mvm->ext_clock_valid)) | 1627 | if (iwl_acpi_get_eckv(mvm->dev, &mvm->ext_clock_valid)) |
1534 | 1498 | IWL_DEBUG_INFO(mvm, "ECKV table doesn't exist in BIOS\n"); | 1628 | IWL_DEBUG_INFO(mvm, "ECKV table doesn't exist in BIOS\n"); |
1535 | 1499 | 1629 | ||
1536 | 1630 | ret = iwl_mvm_ppag_init(mvm); | ||
1537 | 1631 | if (ret) | ||
1538 | 1632 | goto error; | ||
1539 | 1633 | |||
1540 | 1500 | ret = iwl_mvm_sar_init(mvm); | 1634 | ret = iwl_mvm_sar_init(mvm); |
1541 | 1501 | if (ret == 0) { | 1635 | if (ret == 0) { |
1542 | 1502 | ret = iwl_mvm_sar_geo_init(mvm); | 1636 | ret = iwl_mvm_sar_geo_init(mvm); |
1543 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | |||
1544 | index ebcacd1..69dc7d1 100644 | |||
1545 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | |||
1546 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | |||
1547 | @@ -1623,7 +1623,9 @@ void iwl_mvm_channel_switch_noa_notif(struct iwl_mvm *mvm, | |||
1548 | 1623 | RCU_INIT_POINTER(mvm->csa_vif, NULL); | 1623 | RCU_INIT_POINTER(mvm->csa_vif, NULL); |
1549 | 1624 | return; | 1624 | return; |
1550 | 1625 | case NL80211_IFTYPE_STATION: | 1625 | case NL80211_IFTYPE_STATION: |
1552 | 1626 | iwl_mvm_csa_client_absent(mvm, vif); | 1626 | if (!fw_has_capa(&mvm->fw->ucode_capa, |
1553 | 1627 | IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD)) | ||
1554 | 1628 | iwl_mvm_csa_client_absent(mvm, vif); | ||
1555 | 1627 | cancel_delayed_work(&mvmvif->csa_work); | 1629 | cancel_delayed_work(&mvmvif->csa_work); |
1556 | 1628 | ieee80211_chswitch_done(vif, true); | 1630 | ieee80211_chswitch_done(vif, true); |
1557 | 1629 | break; | 1631 | break; |
1558 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | |||
1559 | index c610056..3ab1876 100644 | |||
1560 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | |||
1561 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | |||
1562 | @@ -246,11 +246,11 @@ static const struct cfg80211_pmsr_capabilities iwl_mvm_pmsr_capa = { | |||
1563 | 246 | }, | 246 | }, |
1564 | 247 | }; | 247 | }; |
1565 | 248 | 248 | ||
1571 | 249 | static int iwl_mvm_mac_set_key(struct ieee80211_hw *hw, | 249 | static int __iwl_mvm_mac_set_key(struct ieee80211_hw *hw, |
1572 | 250 | enum set_key_cmd cmd, | 250 | enum set_key_cmd cmd, |
1573 | 251 | struct ieee80211_vif *vif, | 251 | struct ieee80211_vif *vif, |
1574 | 252 | struct ieee80211_sta *sta, | 252 | struct ieee80211_sta *sta, |
1575 | 253 | struct ieee80211_key_conf *key); | 253 | struct ieee80211_key_conf *key); |
1576 | 254 | 254 | ||
1577 | 255 | static void iwl_mvm_reset_phy_ctxts(struct iwl_mvm *mvm) | 255 | static void iwl_mvm_reset_phy_ctxts(struct iwl_mvm *mvm) |
1578 | 256 | { | 256 | { |
1579 | @@ -1401,15 +1401,20 @@ static int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw, | |||
1580 | 1401 | goto out_unlock; | 1401 | goto out_unlock; |
1581 | 1402 | } | 1402 | } |
1582 | 1403 | 1403 | ||
1584 | 1404 | iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, false); | 1404 | if (!fw_has_capa(&mvm->fw->ucode_capa, |
1585 | 1405 | IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD)) | ||
1586 | 1406 | iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, false); | ||
1587 | 1405 | 1407 | ||
1588 | 1406 | iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL); | 1408 | iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL); |
1589 | 1407 | 1409 | ||
1593 | 1408 | ret = iwl_mvm_enable_beacon_filter(mvm, vif, 0); | 1410 | if (!fw_has_capa(&mvm->fw->ucode_capa, |
1594 | 1409 | if (ret) | 1411 | IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD)) { |
1595 | 1410 | goto out_unlock; | 1412 | ret = iwl_mvm_enable_beacon_filter(mvm, vif, 0); |
1596 | 1413 | if (ret) | ||
1597 | 1414 | goto out_unlock; | ||
1598 | 1411 | 1415 | ||
1600 | 1412 | iwl_mvm_stop_session_protection(mvm, vif); | 1416 | iwl_mvm_stop_session_protection(mvm, vif); |
1601 | 1417 | } | ||
1602 | 1413 | } | 1418 | } |
1603 | 1414 | 1419 | ||
1604 | 1415 | mvmvif->ps_disabled = false; | 1420 | mvmvif->ps_disabled = false; |
1605 | @@ -2640,7 +2645,7 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw, | |||
1606 | 2640 | 2645 | ||
1607 | 2641 | mvmvif->ap_early_keys[i] = NULL; | 2646 | mvmvif->ap_early_keys[i] = NULL; |
1608 | 2642 | 2647 | ||
1610 | 2643 | ret = iwl_mvm_mac_set_key(hw, SET_KEY, vif, NULL, key); | 2648 | ret = __iwl_mvm_mac_set_key(hw, SET_KEY, vif, NULL, key); |
1611 | 2644 | if (ret) | 2649 | if (ret) |
1612 | 2645 | goto out_quota_failed; | 2650 | goto out_quota_failed; |
1613 | 2646 | } | 2651 | } |
1614 | @@ -3445,11 +3450,11 @@ static int iwl_mvm_mac_sched_scan_stop(struct ieee80211_hw *hw, | |||
1615 | 3445 | return ret; | 3450 | return ret; |
1616 | 3446 | } | 3451 | } |
1617 | 3447 | 3452 | ||
1623 | 3448 | static int iwl_mvm_mac_set_key(struct ieee80211_hw *hw, | 3453 | static int __iwl_mvm_mac_set_key(struct ieee80211_hw *hw, |
1624 | 3449 | enum set_key_cmd cmd, | 3454 | enum set_key_cmd cmd, |
1625 | 3450 | struct ieee80211_vif *vif, | 3455 | struct ieee80211_vif *vif, |
1626 | 3451 | struct ieee80211_sta *sta, | 3456 | struct ieee80211_sta *sta, |
1627 | 3452 | struct ieee80211_key_conf *key) | 3457 | struct ieee80211_key_conf *key) |
1628 | 3453 | { | 3458 | { |
1629 | 3454 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); | 3459 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
1630 | 3455 | struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); | 3460 | struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); |
1631 | @@ -3504,8 +3509,6 @@ static int iwl_mvm_mac_set_key(struct ieee80211_hw *hw, | |||
1632 | 3504 | return -EOPNOTSUPP; | 3509 | return -EOPNOTSUPP; |
1633 | 3505 | } | 3510 | } |
1634 | 3506 | 3511 | ||
1635 | 3507 | mutex_lock(&mvm->mutex); | ||
1636 | 3508 | |||
1637 | 3509 | switch (cmd) { | 3512 | switch (cmd) { |
1638 | 3510 | case SET_KEY: | 3513 | case SET_KEY: |
1639 | 3511 | if ((vif->type == NL80211_IFTYPE_ADHOC || | 3514 | if ((vif->type == NL80211_IFTYPE_ADHOC || |
1640 | @@ -3651,7 +3654,22 @@ static int iwl_mvm_mac_set_key(struct ieee80211_hw *hw, | |||
1641 | 3651 | ret = -EINVAL; | 3654 | ret = -EINVAL; |
1642 | 3652 | } | 3655 | } |
1643 | 3653 | 3656 | ||
1644 | 3657 | return ret; | ||
1645 | 3658 | } | ||
1646 | 3659 | |||
1647 | 3660 | static int iwl_mvm_mac_set_key(struct ieee80211_hw *hw, | ||
1648 | 3661 | enum set_key_cmd cmd, | ||
1649 | 3662 | struct ieee80211_vif *vif, | ||
1650 | 3663 | struct ieee80211_sta *sta, | ||
1651 | 3664 | struct ieee80211_key_conf *key) | ||
1652 | 3665 | { | ||
1653 | 3666 | struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); | ||
1654 | 3667 | int ret; | ||
1655 | 3668 | |||
1656 | 3669 | mutex_lock(&mvm->mutex); | ||
1657 | 3670 | ret = __iwl_mvm_mac_set_key(hw, cmd, vif, sta, key); | ||
1658 | 3654 | mutex_unlock(&mvm->mutex); | 3671 | mutex_unlock(&mvm->mutex); |
1659 | 3672 | |||
1660 | 3655 | return ret; | 3673 | return ret; |
1661 | 3656 | } | 3674 | } |
1662 | 3657 | 3675 | ||
1663 | @@ -4554,6 +4572,42 @@ static int iwl_mvm_schedule_client_csa(struct iwl_mvm *mvm, | |||
1664 | 4554 | 0, sizeof(cmd), &cmd); | 4572 | 0, sizeof(cmd), &cmd); |
1665 | 4555 | } | 4573 | } |
1666 | 4556 | 4574 | ||
1667 | 4575 | static int iwl_mvm_old_pre_chan_sw_sta(struct iwl_mvm *mvm, | ||
1668 | 4576 | struct ieee80211_vif *vif, | ||
1669 | 4577 | struct ieee80211_channel_switch *chsw) | ||
1670 | 4578 | { | ||
1671 | 4579 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); | ||
1672 | 4580 | u32 apply_time; | ||
1673 | 4581 | |||
1674 | 4582 | /* Schedule the time event to a bit before beacon 1, | ||
1675 | 4583 | * to make sure we're in the new channel when the | ||
1676 | 4584 | * GO/AP arrives. In case count <= 1 immediately schedule the | ||
1677 | 4585 | * TE (this might result with some packet loss or connection | ||
1678 | 4586 | * loss). | ||
1679 | 4587 | */ | ||
1680 | 4588 | if (chsw->count <= 1) | ||
1681 | 4589 | apply_time = 0; | ||
1682 | 4590 | else | ||
1683 | 4591 | apply_time = chsw->device_timestamp + | ||
1684 | 4592 | ((vif->bss_conf.beacon_int * (chsw->count - 1) - | ||
1685 | 4593 | IWL_MVM_CHANNEL_SWITCH_TIME_CLIENT) * 1024); | ||
1686 | 4594 | |||
1687 | 4595 | if (chsw->block_tx) | ||
1688 | 4596 | iwl_mvm_csa_client_absent(mvm, vif); | ||
1689 | 4597 | |||
1690 | 4598 | if (mvmvif->bf_data.bf_enabled) { | ||
1691 | 4599 | int ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0); | ||
1692 | 4600 | |||
1693 | 4601 | if (ret) | ||
1694 | 4602 | return ret; | ||
1695 | 4603 | } | ||
1696 | 4604 | |||
1697 | 4605 | iwl_mvm_schedule_csa_period(mvm, vif, vif->bss_conf.beacon_int, | ||
1698 | 4606 | apply_time); | ||
1699 | 4607 | |||
1700 | 4608 | return 0; | ||
1701 | 4609 | } | ||
1702 | 4610 | |||
1703 | 4557 | #define IWL_MAX_CSA_BLOCK_TX 1500 | 4611 | #define IWL_MAX_CSA_BLOCK_TX 1500 |
1704 | 4558 | static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw, | 4612 | static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw, |
1705 | 4559 | struct ieee80211_vif *vif, | 4613 | struct ieee80211_vif *vif, |
1706 | @@ -4562,7 +4616,6 @@ static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw, | |||
1707 | 4562 | struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); | 4616 | struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); |
1708 | 4563 | struct ieee80211_vif *csa_vif; | 4617 | struct ieee80211_vif *csa_vif; |
1709 | 4564 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); | 4618 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
1710 | 4565 | u32 apply_time; | ||
1711 | 4566 | int ret; | 4619 | int ret; |
1712 | 4567 | 4620 | ||
1713 | 4568 | mutex_lock(&mvm->mutex); | 4621 | mutex_lock(&mvm->mutex); |
1714 | @@ -4606,21 +4659,7 @@ static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw, | |||
1715 | 4606 | 4659 | ||
1716 | 4607 | break; | 4660 | break; |
1717 | 4608 | case NL80211_IFTYPE_STATION: | 4661 | case NL80211_IFTYPE_STATION: |
1718 | 4609 | /* Schedule the time event to a bit before beacon 1, | ||
1719 | 4610 | * to make sure we're in the new channel when the | ||
1720 | 4611 | * GO/AP arrives. In case count <= 1 immediately schedule the | ||
1721 | 4612 | * TE (this might result with some packet loss or connection | ||
1722 | 4613 | * loss). | ||
1723 | 4614 | */ | ||
1724 | 4615 | if (chsw->count <= 1) | ||
1725 | 4616 | apply_time = 0; | ||
1726 | 4617 | else | ||
1727 | 4618 | apply_time = chsw->device_timestamp + | ||
1728 | 4619 | ((vif->bss_conf.beacon_int * (chsw->count - 1) - | ||
1729 | 4620 | IWL_MVM_CHANNEL_SWITCH_TIME_CLIENT) * 1024); | ||
1730 | 4621 | |||
1731 | 4622 | if (chsw->block_tx) { | 4662 | if (chsw->block_tx) { |
1732 | 4623 | iwl_mvm_csa_client_absent(mvm, vif); | ||
1733 | 4624 | /* | 4663 | /* |
1734 | 4625 | * In case of undetermined / long time with immediate | 4664 | * In case of undetermined / long time with immediate |
1735 | 4626 | * quiet monitor status to gracefully disconnect | 4665 | * quiet monitor status to gracefully disconnect |
1736 | @@ -4632,19 +4671,14 @@ static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw, | |||
1737 | 4632 | msecs_to_jiffies(IWL_MAX_CSA_BLOCK_TX)); | 4671 | msecs_to_jiffies(IWL_MAX_CSA_BLOCK_TX)); |
1738 | 4633 | } | 4672 | } |
1739 | 4634 | 4673 | ||
1742 | 4635 | if (mvmvif->bf_data.bf_enabled) { | 4674 | if (!fw_has_capa(&mvm->fw->ucode_capa, |
1743 | 4636 | ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0); | 4675 | IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD)) { |
1744 | 4676 | ret = iwl_mvm_old_pre_chan_sw_sta(mvm, vif, chsw); | ||
1745 | 4637 | if (ret) | 4677 | if (ret) |
1746 | 4638 | goto out_unlock; | 4678 | goto out_unlock; |
1751 | 4639 | } | 4679 | } else { |
1748 | 4640 | |||
1749 | 4641 | if (fw_has_capa(&mvm->fw->ucode_capa, | ||
1750 | 4642 | IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD)) | ||
1752 | 4643 | iwl_mvm_schedule_client_csa(mvm, vif, chsw); | 4680 | iwl_mvm_schedule_client_csa(mvm, vif, chsw); |
1757 | 4644 | else | 4681 | } |
1754 | 4645 | iwl_mvm_schedule_csa_period(mvm, vif, | ||
1755 | 4646 | vif->bss_conf.beacon_int, | ||
1756 | 4647 | apply_time); | ||
1758 | 4648 | 4682 | ||
1759 | 4649 | mvmvif->csa_count = chsw->count; | 4683 | mvmvif->csa_count = chsw->count; |
1760 | 4650 | mvmvif->csa_misbehave = false; | 4684 | mvmvif->csa_misbehave = false; |
1761 | @@ -5246,7 +5280,8 @@ void iwl_mvm_sync_rx_queues_internal(struct iwl_mvm *mvm, | |||
1762 | 5246 | atomic_set(&mvm->queue_sync_counter, | 5280 | atomic_set(&mvm->queue_sync_counter, |
1763 | 5247 | mvm->trans->num_rx_queues); | 5281 | mvm->trans->num_rx_queues); |
1764 | 5248 | 5282 | ||
1766 | 5249 | ret = iwl_mvm_notify_rx_queue(mvm, qmask, (u8 *)notif, size); | 5283 | ret = iwl_mvm_notify_rx_queue(mvm, qmask, (u8 *)notif, |
1767 | 5284 | size, !notif->sync); | ||
1768 | 5250 | if (ret) { | 5285 | if (ret) { |
1769 | 5251 | IWL_ERR(mvm, "Failed to trigger RX queues sync (%d)\n", ret); | 5286 | IWL_ERR(mvm, "Failed to trigger RX queues sync (%d)\n", ret); |
1770 | 5252 | goto out; | 5287 | goto out; |
1771 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | |||
1772 | index e140a1f..c9f8c5d 100644 | |||
1773 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | |||
1774 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | |||
1775 | @@ -1227,6 +1227,8 @@ struct iwl_mvm { | |||
1776 | 1227 | #endif | 1227 | #endif |
1777 | 1228 | struct iwl_mvm_geo_profile geo_profiles[ACPI_NUM_GEO_PROFILES]; | 1228 | struct iwl_mvm_geo_profile geo_profiles[ACPI_NUM_GEO_PROFILES]; |
1778 | 1229 | u32 geo_rev; | 1229 | u32 geo_rev; |
1779 | 1230 | struct iwl_ppag_table_cmd ppag_table; | ||
1780 | 1231 | u32 ppag_rev; | ||
1781 | 1230 | #endif | 1232 | #endif |
1782 | 1231 | 1233 | ||
1783 | 1232 | }; | 1234 | }; |
1784 | @@ -1698,9 +1700,9 @@ void iwl_mvm_rx_monitor_no_data(struct iwl_mvm *mvm, struct napi_struct *napi, | |||
1785 | 1698 | void iwl_mvm_rx_frame_release(struct iwl_mvm *mvm, struct napi_struct *napi, | 1700 | void iwl_mvm_rx_frame_release(struct iwl_mvm *mvm, struct napi_struct *napi, |
1786 | 1699 | struct iwl_rx_cmd_buffer *rxb, int queue); | 1701 | struct iwl_rx_cmd_buffer *rxb, int queue); |
1787 | 1700 | int iwl_mvm_notify_rx_queue(struct iwl_mvm *mvm, u32 rxq_mask, | 1702 | int iwl_mvm_notify_rx_queue(struct iwl_mvm *mvm, u32 rxq_mask, |
1791 | 1701 | const u8 *data, u32 count); | 1703 | const u8 *data, u32 count, bool async); |
1792 | 1702 | void iwl_mvm_rx_queue_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb, | 1704 | void iwl_mvm_rx_queue_notif(struct iwl_mvm *mvm, struct napi_struct *napi, |
1793 | 1703 | int queue); | 1705 | struct iwl_rx_cmd_buffer *rxb, int queue); |
1794 | 1704 | void iwl_mvm_rx_tx_cmd(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb); | 1706 | void iwl_mvm_rx_tx_cmd(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb); |
1795 | 1705 | void iwl_mvm_mfu_assert_dump_notif(struct iwl_mvm *mvm, | 1707 | void iwl_mvm_mfu_assert_dump_notif(struct iwl_mvm *mvm, |
1796 | 1706 | struct iwl_rx_cmd_buffer *rxb); | 1708 | struct iwl_rx_cmd_buffer *rxb); |
1797 | @@ -1847,7 +1849,7 @@ iwl_mvm_vif_dbgfs_clean(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
1798 | 1847 | #endif /* CPTCFG_IWLWIFI_DEBUGFS */ | 1849 | #endif /* CPTCFG_IWLWIFI_DEBUGFS */ |
1799 | 1848 | 1850 | ||
1800 | 1849 | /* rate scaling */ | 1851 | /* rate scaling */ |
1802 | 1850 | int iwl_mvm_send_lq_cmd(struct iwl_mvm *mvm, struct iwl_lq_cmd *lq, bool sync); | 1852 | int iwl_mvm_send_lq_cmd(struct iwl_mvm *mvm, struct iwl_lq_cmd *lq); |
1803 | 1851 | void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg); | 1853 | void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg); |
1804 | 1852 | int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate); | 1854 | int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate); |
1805 | 1853 | void rs_update_last_rssi(struct iwl_mvm *mvm, | 1855 | void rs_update_last_rssi(struct iwl_mvm *mvm, |
1806 | @@ -2199,6 +2201,7 @@ int iwl_mvm_nan_config_nan_faw_cmd(struct iwl_mvm *mvm, | |||
1807 | 2199 | 2201 | ||
1808 | 2200 | int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b); | 2202 | int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b); |
1809 | 2201 | int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm); | 2203 | int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm); |
1810 | 2204 | int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm); | ||
1811 | 2202 | #ifdef CPTCFG_IWLWIFI_DEBUGFS | 2205 | #ifdef CPTCFG_IWLWIFI_DEBUGFS |
1812 | 2203 | void iwl_mvm_sta_add_debugfs(struct ieee80211_hw *hw, | 2206 | void iwl_mvm_sta_add_debugfs(struct ieee80211_hw *hw, |
1813 | 2204 | struct ieee80211_vif *vif, | 2207 | struct ieee80211_vif *vif, |
1814 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | |||
1815 | index 5a81722..cd3b5d6 100644 | |||
1816 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | |||
1817 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | |||
1818 | @@ -620,7 +620,7 @@ void iwl_mvm_rx_chub_update_mcc(struct iwl_mvm *mvm, | |||
1819 | 620 | enum iwl_mcc_source src; | 620 | enum iwl_mcc_source src; |
1820 | 621 | char mcc[3]; | 621 | char mcc[3]; |
1821 | 622 | struct ieee80211_regdomain *regd; | 622 | struct ieee80211_regdomain *regd; |
1823 | 623 | u32 wgds_tbl_idx; | 623 | int wgds_tbl_idx; |
1824 | 624 | 624 | ||
1825 | 625 | lockdep_assert_held(&mvm->mutex); | 625 | lockdep_assert_held(&mvm->mutex); |
1826 | 626 | 626 | ||
1827 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |||
1828 | index ca25c5c..7ef326e 100644 | |||
1829 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |||
1830 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |||
1831 | @@ -1260,7 +1260,7 @@ static void iwl_mvm_rx_mq(struct iwl_op_mode *op_mode, | |||
1832 | 1260 | iwl_mvm_rx_mpdu_mq(mvm, napi, rxb, 0); | 1260 | iwl_mvm_rx_mpdu_mq(mvm, napi, rxb, 0); |
1833 | 1261 | else if (unlikely(cmd == WIDE_ID(DATA_PATH_GROUP, | 1261 | else if (unlikely(cmd == WIDE_ID(DATA_PATH_GROUP, |
1834 | 1262 | RX_QUEUES_NOTIFICATION))) | 1262 | RX_QUEUES_NOTIFICATION))) |
1836 | 1263 | iwl_mvm_rx_queue_notif(mvm, rxb, 0); | 1263 | iwl_mvm_rx_queue_notif(mvm, napi, rxb, 0); |
1837 | 1264 | else if (cmd == WIDE_ID(LEGACY_GROUP, FRAME_RELEASE)) | 1264 | else if (cmd == WIDE_ID(LEGACY_GROUP, FRAME_RELEASE)) |
1838 | 1265 | iwl_mvm_rx_frame_release(mvm, napi, rxb, 0); | 1265 | iwl_mvm_rx_frame_release(mvm, napi, rxb, 0); |
1839 | 1266 | else if (cmd == WIDE_ID(DATA_PATH_GROUP, RX_NO_DATA_NOTIF)) | 1266 | else if (cmd == WIDE_ID(DATA_PATH_GROUP, RX_NO_DATA_NOTIF)) |
1840 | @@ -1489,18 +1489,19 @@ void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error) | |||
1841 | 1489 | IWL_ERR(mvm, "HW restart already requested, but not started\n"); | 1489 | IWL_ERR(mvm, "HW restart already requested, but not started\n"); |
1842 | 1490 | } else if (mvm->fwrt.cur_fw_img == IWL_UCODE_REGULAR && | 1490 | } else if (mvm->fwrt.cur_fw_img == IWL_UCODE_REGULAR && |
1843 | 1491 | mvm->hw_registered && | 1491 | mvm->hw_registered && |
1856 | 1492 | !test_bit(STATUS_TRANS_DEAD, &mvm->trans->status) && | 1492 | !test_bit(STATUS_TRANS_DEAD, &mvm->trans->status)) { |
1857 | 1493 | mvm->fw->ucode_capa.error_log_size) { | 1493 | if (mvm->fw->ucode_capa.error_log_size) { |
1858 | 1494 | u32 src_size = mvm->fw->ucode_capa.error_log_size; | 1494 | u32 src_size = mvm->fw->ucode_capa.error_log_size; |
1859 | 1495 | u32 src_addr = mvm->fw->ucode_capa.error_log_addr; | 1495 | u32 src_addr = mvm->fw->ucode_capa.error_log_addr; |
1860 | 1496 | u8 *recover_buf = kzalloc(src_size, GFP_ATOMIC); | 1496 | u8 *recover_buf = kzalloc(src_size, GFP_ATOMIC); |
1861 | 1497 | 1497 | ||
1862 | 1498 | if (recover_buf) { | 1498 | if (recover_buf) { |
1863 | 1499 | mvm->error_recovery_buf = recover_buf; | 1499 | mvm->error_recovery_buf = recover_buf; |
1864 | 1500 | iwl_trans_read_mem_bytes(mvm->trans, | 1500 | iwl_trans_read_mem_bytes(mvm->trans, |
1865 | 1501 | src_addr, | 1501 | src_addr, |
1866 | 1502 | recover_buf, | 1502 | recover_buf, |
1867 | 1503 | src_size); | 1503 | src_size); |
1868 | 1504 | } | ||
1869 | 1504 | } | 1505 | } |
1870 | 1505 | 1506 | ||
1871 | 1506 | iwl_fw_error_collect(&mvm->fwrt); | 1507 | iwl_fw_error_collect(&mvm->fwrt); |
1872 | @@ -1574,7 +1575,7 @@ static void iwl_mvm_rx_mq_rss(struct iwl_op_mode *op_mode, | |||
1873 | 1574 | iwl_mvm_rx_frame_release(mvm, napi, rxb, queue); | 1575 | iwl_mvm_rx_frame_release(mvm, napi, rxb, queue); |
1874 | 1575 | else if (unlikely(cmd == WIDE_ID(DATA_PATH_GROUP, | 1576 | else if (unlikely(cmd == WIDE_ID(DATA_PATH_GROUP, |
1875 | 1576 | RX_QUEUES_NOTIFICATION))) | 1577 | RX_QUEUES_NOTIFICATION))) |
1877 | 1577 | iwl_mvm_rx_queue_notif(mvm, rxb, queue); | 1578 | iwl_mvm_rx_queue_notif(mvm, napi, rxb, queue); |
1878 | 1578 | else if (likely(cmd == WIDE_ID(LEGACY_GROUP, REPLY_RX_MPDU_CMD))) | 1579 | else if (likely(cmd == WIDE_ID(LEGACY_GROUP, REPLY_RX_MPDU_CMD))) |
1879 | 1579 | iwl_mvm_rx_mpdu_mq(mvm, napi, rxb, queue); | 1580 | iwl_mvm_rx_mpdu_mq(mvm, napi, rxb, queue); |
1880 | 1580 | } | 1581 | } |
1881 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c | |||
1882 | index 190c514..8cb07f4 100644 | |||
1883 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c | |||
1884 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c | |||
1885 | @@ -1208,240 +1208,6 @@ static u8 rs_get_tid(struct ieee80211_hdr *hdr) | |||
1886 | 1208 | return tid; | 1208 | return tid; |
1887 | 1209 | } | 1209 | } |
1888 | 1210 | 1210 | ||
1889 | 1211 | void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | ||
1890 | 1212 | int tid, struct ieee80211_tx_info *info, bool ndp) | ||
1891 | 1213 | { | ||
1892 | 1214 | int legacy_success; | ||
1893 | 1215 | int retries; | ||
1894 | 1216 | int i; | ||
1895 | 1217 | struct iwl_lq_cmd *table; | ||
1896 | 1218 | u32 lq_hwrate; | ||
1897 | 1219 | struct rs_rate lq_rate, tx_resp_rate; | ||
1898 | 1220 | struct iwl_scale_tbl_info *curr_tbl, *other_tbl, *tmp_tbl; | ||
1899 | 1221 | u32 tlc_info = (uintptr_t)info->status.status_driver_data[0]; | ||
1900 | 1222 | u8 reduced_txp = tlc_info & RS_DRV_DATA_TXP_MSK; | ||
1901 | 1223 | u8 lq_color = RS_DRV_DATA_LQ_COLOR_GET(tlc_info); | ||
1902 | 1224 | u32 tx_resp_hwrate = (uintptr_t)info->status.status_driver_data[1]; | ||
1903 | 1225 | struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); | ||
1904 | 1226 | struct iwl_lq_sta *lq_sta = &mvmsta->lq_sta.rs_drv; | ||
1905 | 1227 | |||
1906 | 1228 | /* Treat uninitialized rate scaling data same as non-existing. */ | ||
1907 | 1229 | if (!lq_sta) { | ||
1908 | 1230 | IWL_DEBUG_RATE(mvm, "Station rate scaling not created yet.\n"); | ||
1909 | 1231 | return; | ||
1910 | 1232 | } else if (!lq_sta->pers.drv) { | ||
1911 | 1233 | IWL_DEBUG_RATE(mvm, "Rate scaling not initialized yet.\n"); | ||
1912 | 1234 | return; | ||
1913 | 1235 | } | ||
1914 | 1236 | |||
1915 | 1237 | /* This packet was aggregated but doesn't carry status info */ | ||
1916 | 1238 | if ((info->flags & IEEE80211_TX_CTL_AMPDU) && | ||
1917 | 1239 | !(info->flags & IEEE80211_TX_STAT_AMPDU)) | ||
1918 | 1240 | return; | ||
1919 | 1241 | |||
1920 | 1242 | if (rs_rate_from_ucode_rate(tx_resp_hwrate, info->band, | ||
1921 | 1243 | &tx_resp_rate)) { | ||
1922 | 1244 | WARN_ON_ONCE(1); | ||
1923 | 1245 | return; | ||
1924 | 1246 | } | ||
1925 | 1247 | |||
1926 | 1248 | #ifdef CPTCFG_MAC80211_DEBUGFS | ||
1927 | 1249 | /* Disable last tx check if we are debugging with fixed rate but | ||
1928 | 1250 | * update tx stats */ | ||
1929 | 1251 | if (lq_sta->pers.dbg_fixed_rate) { | ||
1930 | 1252 | int index = tx_resp_rate.index; | ||
1931 | 1253 | enum rs_column column; | ||
1932 | 1254 | int attempts, success; | ||
1933 | 1255 | |||
1934 | 1256 | column = rs_get_column_from_rate(&tx_resp_rate); | ||
1935 | 1257 | if (WARN_ONCE(column == RS_COLUMN_INVALID, | ||
1936 | 1258 | "Can't map rate 0x%x to column", | ||
1937 | 1259 | tx_resp_hwrate)) | ||
1938 | 1260 | return; | ||
1939 | 1261 | |||
1940 | 1262 | if (info->flags & IEEE80211_TX_STAT_AMPDU) { | ||
1941 | 1263 | attempts = info->status.ampdu_len; | ||
1942 | 1264 | success = info->status.ampdu_ack_len; | ||
1943 | 1265 | } else { | ||
1944 | 1266 | attempts = info->status.rates[0].count; | ||
1945 | 1267 | success = !!(info->flags & IEEE80211_TX_STAT_ACK); | ||
1946 | 1268 | } | ||
1947 | 1269 | |||
1948 | 1270 | lq_sta->pers.tx_stats[column][index].total += attempts; | ||
1949 | 1271 | lq_sta->pers.tx_stats[column][index].success += success; | ||
1950 | 1272 | |||
1951 | 1273 | IWL_DEBUG_RATE(mvm, "Fixed rate 0x%x success %d attempts %d\n", | ||
1952 | 1274 | tx_resp_hwrate, success, attempts); | ||
1953 | 1275 | return; | ||
1954 | 1276 | } | ||
1955 | 1277 | #endif | ||
1956 | 1278 | |||
1957 | 1279 | if (time_after(jiffies, | ||
1958 | 1280 | (unsigned long)(lq_sta->last_tx + | ||
1959 | 1281 | (IWL_MVM_RS_IDLE_TIMEOUT * HZ)))) { | ||
1960 | 1282 | IWL_DEBUG_RATE(mvm, "Tx idle for too long. reinit rs\n"); | ||
1961 | 1283 | iwl_mvm_rs_rate_init(mvm, sta, info->band, true); | ||
1962 | 1284 | return; | ||
1963 | 1285 | } | ||
1964 | 1286 | lq_sta->last_tx = jiffies; | ||
1965 | 1287 | |||
1966 | 1288 | /* Ignore this Tx frame response if its initial rate doesn't match | ||
1967 | 1289 | * that of latest Link Quality command. There may be stragglers | ||
1968 | 1290 | * from a previous Link Quality command, but we're no longer interested | ||
1969 | 1291 | * in those; they're either from the "active" mode while we're trying | ||
1970 | 1292 | * to check "search" mode, or a prior "search" mode after we've moved | ||
1971 | 1293 | * to a new "search" mode (which might become the new "active" mode). | ||
1972 | 1294 | */ | ||
1973 | 1295 | table = &lq_sta->lq; | ||
1974 | 1296 | lq_hwrate = le32_to_cpu(table->rs_table[0]); | ||
1975 | 1297 | if (rs_rate_from_ucode_rate(lq_hwrate, info->band, &lq_rate)) { | ||
1976 | 1298 | WARN_ON_ONCE(1); | ||
1977 | 1299 | return; | ||
1978 | 1300 | } | ||
1979 | 1301 | |||
1980 | 1302 | /* Here we actually compare this rate to the latest LQ command */ | ||
1981 | 1303 | if (lq_color != LQ_FLAG_COLOR_GET(table->flags)) { | ||
1982 | 1304 | IWL_DEBUG_RATE(mvm, | ||
1983 | 1305 | "tx resp color 0x%x does not match 0x%x\n", | ||
1984 | 1306 | lq_color, LQ_FLAG_COLOR_GET(table->flags)); | ||
1985 | 1307 | |||
1986 | 1308 | /* | ||
1987 | 1309 | * Since rates mis-match, the last LQ command may have failed. | ||
1988 | 1310 | * After IWL_MISSED_RATE_MAX mis-matches, resync the uCode with | ||
1989 | 1311 | * ... driver. | ||
1990 | 1312 | */ | ||
1991 | 1313 | lq_sta->missed_rate_counter++; | ||
1992 | 1314 | if (lq_sta->missed_rate_counter > IWL_MVM_RS_MISSED_RATE_MAX) { | ||
1993 | 1315 | lq_sta->missed_rate_counter = 0; | ||
1994 | 1316 | IWL_DEBUG_RATE(mvm, | ||
1995 | 1317 | "Too many rates mismatch. Send sync LQ. rs_state %d\n", | ||
1996 | 1318 | lq_sta->rs_state); | ||
1997 | 1319 | iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq, false); | ||
1998 | 1320 | } | ||
1999 | 1321 | /* Regardless, ignore this status info for outdated rate */ | ||
2000 | 1322 | return; | ||
2001 | 1323 | } else | ||
2002 | 1324 | /* Rate did match, so reset the missed_rate_counter */ | ||
2003 | 1325 | lq_sta->missed_rate_counter = 0; | ||
2004 | 1326 | |||
2005 | 1327 | if (!lq_sta->search_better_tbl) { | ||
2006 | 1328 | curr_tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); | ||
2007 | 1329 | other_tbl = &(lq_sta->lq_info[1 - lq_sta->active_tbl]); | ||
2008 | 1330 | } else { | ||
2009 | 1331 | curr_tbl = &(lq_sta->lq_info[1 - lq_sta->active_tbl]); | ||
2010 | 1332 | other_tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); | ||
2011 | 1333 | } | ||
2012 | 1334 | |||
2013 | 1335 | if (WARN_ON_ONCE(!rs_rate_column_match(&lq_rate, &curr_tbl->rate))) { | ||
2014 | 1336 | IWL_DEBUG_RATE(mvm, | ||
2015 | 1337 | "Neither active nor search matches tx rate\n"); | ||
2016 | 1338 | tmp_tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); | ||
2017 | 1339 | rs_dump_rate(mvm, &tmp_tbl->rate, "ACTIVE"); | ||
2018 | 1340 | tmp_tbl = &(lq_sta->lq_info[1 - lq_sta->active_tbl]); | ||
2019 | 1341 | rs_dump_rate(mvm, &tmp_tbl->rate, "SEARCH"); | ||
2020 | 1342 | rs_dump_rate(mvm, &lq_rate, "ACTUAL"); | ||
2021 | 1343 | |||
2022 | 1344 | /* | ||
2023 | 1345 | * no matching table found, let's by-pass the data collection | ||
2024 | 1346 | * and continue to perform rate scale to find the rate table | ||
2025 | 1347 | */ | ||
2026 | 1348 | rs_stay_in_table(lq_sta, true); | ||
2027 | 1349 | goto done; | ||
2028 | 1350 | } | ||
2029 | 1351 | |||
2030 | 1352 | /* | ||
2031 | 1353 | * Updating the frame history depends on whether packets were | ||
2032 | 1354 | * aggregated. | ||
2033 | 1355 | * | ||
2034 | 1356 | * For aggregation, all packets were transmitted at the same rate, the | ||
2035 | 1357 | * first index into rate scale table. | ||
2036 | 1358 | */ | ||
2037 | 1359 | if (info->flags & IEEE80211_TX_STAT_AMPDU) { | ||
2038 | 1360 | rs_collect_tpc_data(mvm, lq_sta, curr_tbl, tx_resp_rate.index, | ||
2039 | 1361 | info->status.ampdu_len, | ||
2040 | 1362 | info->status.ampdu_ack_len, | ||
2041 | 1363 | reduced_txp); | ||
2042 | 1364 | |||
2043 | 1365 | /* ampdu_ack_len = 0 marks no BA was received. For TLC, treat | ||
2044 | 1366 | * it as a single frame loss as we don't want the success ratio | ||
2045 | 1367 | * to dip too quickly because a BA wasn't received. | ||
2046 | 1368 | * For TPC, there's no need for this optimisation since we want | ||
2047 | 1369 | * to recover very quickly from a bad power reduction and, | ||
2048 | 1370 | * therefore we'd like the success ratio to get an immediate hit | ||
2049 | 1371 | * when failing to get a BA, so we'd switch back to a lower or | ||
2050 | 1372 | * zero power reduction. When FW transmits agg with a rate | ||
2051 | 1373 | * different from the initial rate, it will not use reduced txp | ||
2052 | 1374 | * and will send BA notification twice (one empty with reduced | ||
2053 | 1375 | * txp equal to the value from LQ and one with reduced txp 0). | ||
2054 | 1376 | * We need to update counters for each txp level accordingly. | ||
2055 | 1377 | */ | ||
2056 | 1378 | if (info->status.ampdu_ack_len == 0) | ||
2057 | 1379 | info->status.ampdu_len = 1; | ||
2058 | 1380 | |||
2059 | 1381 | rs_collect_tlc_data(mvm, mvmsta, tid, curr_tbl, | ||
2060 | 1382 | tx_resp_rate.index, | ||
2061 | 1383 | info->status.ampdu_len, | ||
2062 | 1384 | info->status.ampdu_ack_len); | ||
2063 | 1385 | |||
2064 | 1386 | /* Update success/fail counts if not searching for new mode */ | ||
2065 | 1387 | if (lq_sta->rs_state == RS_STATE_STAY_IN_COLUMN) { | ||
2066 | 1388 | lq_sta->total_success += info->status.ampdu_ack_len; | ||
2067 | 1389 | lq_sta->total_failed += (info->status.ampdu_len - | ||
2068 | 1390 | info->status.ampdu_ack_len); | ||
2069 | 1391 | } | ||
2070 | 1392 | } else { | ||
2071 | 1393 | /* For legacy, update frame history with for each Tx retry. */ | ||
2072 | 1394 | retries = info->status.rates[0].count - 1; | ||
2073 | 1395 | /* HW doesn't send more than 15 retries */ | ||
2074 | 1396 | retries = min(retries, 15); | ||
2075 | 1397 | |||
2076 | 1398 | /* The last transmission may have been successful */ | ||
2077 | 1399 | legacy_success = !!(info->flags & IEEE80211_TX_STAT_ACK); | ||
2078 | 1400 | /* Collect data for each rate used during failed TX attempts */ | ||
2079 | 1401 | for (i = 0; i <= retries; ++i) { | ||
2080 | 1402 | lq_hwrate = le32_to_cpu(table->rs_table[i]); | ||
2081 | 1403 | if (rs_rate_from_ucode_rate(lq_hwrate, info->band, | ||
2082 | 1404 | &lq_rate)) { | ||
2083 | 1405 | WARN_ON_ONCE(1); | ||
2084 | 1406 | return; | ||
2085 | 1407 | } | ||
2086 | 1408 | |||
2087 | 1409 | /* | ||
2088 | 1410 | * Only collect stats if retried rate is in the same RS | ||
2089 | 1411 | * table as active/search. | ||
2090 | 1412 | */ | ||
2091 | 1413 | if (rs_rate_column_match(&lq_rate, &curr_tbl->rate)) | ||
2092 | 1414 | tmp_tbl = curr_tbl; | ||
2093 | 1415 | else if (rs_rate_column_match(&lq_rate, | ||
2094 | 1416 | &other_tbl->rate)) | ||
2095 | 1417 | tmp_tbl = other_tbl; | ||
2096 | 1418 | else | ||
2097 | 1419 | continue; | ||
2098 | 1420 | |||
2099 | 1421 | rs_collect_tpc_data(mvm, lq_sta, tmp_tbl, | ||
2100 | 1422 | tx_resp_rate.index, 1, | ||
2101 | 1423 | i < retries ? 0 : legacy_success, | ||
2102 | 1424 | reduced_txp); | ||
2103 | 1425 | rs_collect_tlc_data(mvm, mvmsta, tid, tmp_tbl, | ||
2104 | 1426 | tx_resp_rate.index, 1, | ||
2105 | 1427 | i < retries ? 0 : legacy_success); | ||
2106 | 1428 | } | ||
2107 | 1429 | |||
2108 | 1430 | /* Update success/fail counts if not searching for new mode */ | ||
2109 | 1431 | if (lq_sta->rs_state == RS_STATE_STAY_IN_COLUMN) { | ||
2110 | 1432 | lq_sta->total_success += legacy_success; | ||
2111 | 1433 | lq_sta->total_failed += retries + (1 - legacy_success); | ||
2112 | 1434 | } | ||
2113 | 1435 | } | ||
2114 | 1436 | /* The last TX rate is cached in lq_sta; it's set in if/else above */ | ||
2115 | 1437 | lq_sta->last_rate_n_flags = lq_hwrate; | ||
2116 | 1438 | IWL_DEBUG_RATE(mvm, "reduced txpower: %d\n", reduced_txp); | ||
2117 | 1439 | done: | ||
2118 | 1440 | /* See if there's a better rate or modulation mode to try. */ | ||
2119 | 1441 | if (sta->supp_rates[info->band]) | ||
2120 | 1442 | rs_rate_scale_perform(mvm, sta, lq_sta, tid, ndp); | ||
2121 | 1443 | } | ||
2122 | 1444 | |||
2123 | 1445 | /* | 1211 | /* |
2124 | 1446 | * mac80211 sends us Tx status | 1212 | * mac80211 sends us Tx status |
2125 | 1447 | */ | 1213 | */ |
2126 | @@ -1454,8 +1220,9 @@ static void rs_drv_mac80211_tx_status(void *mvm_r, | |||
2127 | 1454 | struct iwl_op_mode *op_mode = mvm_r; | 1220 | struct iwl_op_mode *op_mode = mvm_r; |
2128 | 1455 | struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode); | 1221 | struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode); |
2129 | 1456 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 1222 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
2130 | 1223 | struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); | ||
2131 | 1457 | 1224 | ||
2133 | 1458 | if (!iwl_mvm_sta_from_mac80211(sta)->vif) | 1225 | if (!mvmsta->vif) |
2134 | 1459 | return; | 1226 | return; |
2135 | 1460 | 1227 | ||
2136 | 1461 | if (!ieee80211_is_data(hdr->frame_control) || | 1228 | if (!ieee80211_is_data(hdr->frame_control) || |
2137 | @@ -1806,7 +1573,7 @@ static void rs_update_rate_tbl(struct iwl_mvm *mvm, | |||
2138 | 1806 | struct iwl_scale_tbl_info *tbl) | 1573 | struct iwl_scale_tbl_info *tbl) |
2139 | 1807 | { | 1574 | { |
2140 | 1808 | rs_fill_lq_cmd(mvm, sta, lq_sta, &tbl->rate); | 1575 | rs_fill_lq_cmd(mvm, sta, lq_sta, &tbl->rate); |
2142 | 1809 | iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq, false); | 1576 | iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq); |
2143 | 1810 | } | 1577 | } |
2144 | 1811 | 1578 | ||
2145 | 1812 | static bool rs_tweak_rate_tbl(struct iwl_mvm *mvm, | 1579 | static bool rs_tweak_rate_tbl(struct iwl_mvm *mvm, |
2146 | @@ -2908,7 +2675,7 @@ void rs_update_last_rssi(struct iwl_mvm *mvm, | |||
2147 | 2908 | static void rs_initialize_lq(struct iwl_mvm *mvm, | 2675 | static void rs_initialize_lq(struct iwl_mvm *mvm, |
2148 | 2909 | struct ieee80211_sta *sta, | 2676 | struct ieee80211_sta *sta, |
2149 | 2910 | struct iwl_lq_sta *lq_sta, | 2677 | struct iwl_lq_sta *lq_sta, |
2151 | 2911 | enum nl80211_band band, bool update) | 2678 | enum nl80211_band band) |
2152 | 2912 | { | 2679 | { |
2153 | 2913 | struct iwl_scale_tbl_info *tbl; | 2680 | struct iwl_scale_tbl_info *tbl; |
2154 | 2914 | struct rs_rate *rate; | 2681 | struct rs_rate *rate; |
2155 | @@ -2938,7 +2705,7 @@ static void rs_initialize_lq(struct iwl_mvm *mvm, | |||
2156 | 2938 | rs_set_expected_tpt_table(lq_sta, tbl); | 2705 | rs_set_expected_tpt_table(lq_sta, tbl); |
2157 | 2939 | rs_fill_lq_cmd(mvm, sta, lq_sta, rate); | 2706 | rs_fill_lq_cmd(mvm, sta, lq_sta, rate); |
2158 | 2940 | /* TODO restore station should remember the lq cmd */ | 2707 | /* TODO restore station should remember the lq cmd */ |
2160 | 2941 | iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq, !update); | 2708 | iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq); |
2161 | 2942 | } | 2709 | } |
2162 | 2943 | 2710 | ||
2163 | 2944 | static void rs_drv_get_rate(void *mvm_r, struct ieee80211_sta *sta, | 2711 | static void rs_drv_get_rate(void *mvm_r, struct ieee80211_sta *sta, |
2164 | @@ -3187,7 +2954,7 @@ void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg) | |||
2165 | 3187 | * Called after adding a new station to initialize rate scaling | 2954 | * Called after adding a new station to initialize rate scaling |
2166 | 3188 | */ | 2955 | */ |
2167 | 3189 | static void rs_drv_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | 2956 | static void rs_drv_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta, |
2169 | 3190 | enum nl80211_band band, bool update) | 2957 | enum nl80211_band band) |
2170 | 3191 | { | 2958 | { |
2171 | 3192 | int i, j; | 2959 | int i, j; |
2172 | 3193 | struct ieee80211_hw *hw = mvm->hw; | 2960 | struct ieee80211_hw *hw = mvm->hw; |
2173 | @@ -3198,6 +2965,8 @@ static void rs_drv_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | |||
2174 | 3198 | struct ieee80211_supported_band *sband; | 2965 | struct ieee80211_supported_band *sband; |
2175 | 3199 | unsigned long supp; /* must be unsigned long for for_each_set_bit */ | 2966 | unsigned long supp; /* must be unsigned long for for_each_set_bit */ |
2176 | 3200 | 2967 | ||
2177 | 2968 | lockdep_assert_held(&mvmsta->lq_sta.rs_drv.pers.lock); | ||
2178 | 2969 | |||
2179 | 3201 | /* clear all non-persistent lq data */ | 2970 | /* clear all non-persistent lq data */ |
2180 | 3202 | memset(lq_sta, 0, offsetof(typeof(*lq_sta), pers)); | 2971 | memset(lq_sta, 0, offsetof(typeof(*lq_sta), pers)); |
2181 | 3203 | 2972 | ||
2182 | @@ -3267,7 +3036,7 @@ static void rs_drv_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | |||
2183 | 3267 | #ifdef CPTCFG_IWLWIFI_DEBUGFS | 3036 | #ifdef CPTCFG_IWLWIFI_DEBUGFS |
2184 | 3268 | iwl_mvm_reset_frame_stats(mvm); | 3037 | iwl_mvm_reset_frame_stats(mvm); |
2185 | 3269 | #endif | 3038 | #endif |
2187 | 3270 | rs_initialize_lq(mvm, sta, lq_sta, band, update); | 3039 | rs_initialize_lq(mvm, sta, lq_sta, band); |
2188 | 3271 | } | 3040 | } |
2189 | 3272 | 3041 | ||
2190 | 3273 | static void rs_drv_rate_update(void *mvm_r, | 3042 | static void rs_drv_rate_update(void *mvm_r, |
2191 | @@ -3290,6 +3059,254 @@ static void rs_drv_rate_update(void *mvm_r, | |||
2192 | 3290 | iwl_mvm_rs_rate_init(mvm, sta, sband->band, true); | 3059 | iwl_mvm_rs_rate_init(mvm, sta, sband->band, true); |
2193 | 3291 | } | 3060 | } |
2194 | 3292 | 3061 | ||
2195 | 3062 | static void __iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, | ||
2196 | 3063 | struct ieee80211_sta *sta, | ||
2197 | 3064 | int tid, struct ieee80211_tx_info *info, | ||
2198 | 3065 | bool ndp) | ||
2199 | 3066 | { | ||
2200 | 3067 | int legacy_success; | ||
2201 | 3068 | int retries; | ||
2202 | 3069 | int i; | ||
2203 | 3070 | struct iwl_lq_cmd *table; | ||
2204 | 3071 | u32 lq_hwrate; | ||
2205 | 3072 | struct rs_rate lq_rate, tx_resp_rate; | ||
2206 | 3073 | struct iwl_scale_tbl_info *curr_tbl, *other_tbl, *tmp_tbl; | ||
2207 | 3074 | u32 tlc_info = (uintptr_t)info->status.status_driver_data[0]; | ||
2208 | 3075 | u8 reduced_txp = tlc_info & RS_DRV_DATA_TXP_MSK; | ||
2209 | 3076 | u8 lq_color = RS_DRV_DATA_LQ_COLOR_GET(tlc_info); | ||
2210 | 3077 | u32 tx_resp_hwrate = (uintptr_t)info->status.status_driver_data[1]; | ||
2211 | 3078 | struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); | ||
2212 | 3079 | struct iwl_lq_sta *lq_sta = &mvmsta->lq_sta.rs_drv; | ||
2213 | 3080 | |||
2214 | 3081 | if (!lq_sta->pers.drv) { | ||
2215 | 3082 | IWL_DEBUG_RATE(mvm, "Rate scaling not initialized yet.\n"); | ||
2216 | 3083 | return; | ||
2217 | 3084 | } | ||
2218 | 3085 | |||
2219 | 3086 | /* This packet was aggregated but doesn't carry status info */ | ||
2220 | 3087 | if ((info->flags & IEEE80211_TX_CTL_AMPDU) && | ||
2221 | 3088 | !(info->flags & IEEE80211_TX_STAT_AMPDU)) | ||
2222 | 3089 | return; | ||
2223 | 3090 | |||
2224 | 3091 | if (rs_rate_from_ucode_rate(tx_resp_hwrate, info->band, | ||
2225 | 3092 | &tx_resp_rate)) { | ||
2226 | 3093 | WARN_ON_ONCE(1); | ||
2227 | 3094 | return; | ||
2228 | 3095 | } | ||
2229 | 3096 | |||
2230 | 3097 | #ifdef CPTCFG_MAC80211_DEBUGFS | ||
2231 | 3098 | /* Disable last tx check if we are debugging with fixed rate but | ||
2232 | 3099 | * update tx stats | ||
2233 | 3100 | */ | ||
2234 | 3101 | if (lq_sta->pers.dbg_fixed_rate) { | ||
2235 | 3102 | int index = tx_resp_rate.index; | ||
2236 | 3103 | enum rs_column column; | ||
2237 | 3104 | int attempts, success; | ||
2238 | 3105 | |||
2239 | 3106 | column = rs_get_column_from_rate(&tx_resp_rate); | ||
2240 | 3107 | if (WARN_ONCE(column == RS_COLUMN_INVALID, | ||
2241 | 3108 | "Can't map rate 0x%x to column", | ||
2242 | 3109 | tx_resp_hwrate)) | ||
2243 | 3110 | return; | ||
2244 | 3111 | |||
2245 | 3112 | if (info->flags & IEEE80211_TX_STAT_AMPDU) { | ||
2246 | 3113 | attempts = info->status.ampdu_len; | ||
2247 | 3114 | success = info->status.ampdu_ack_len; | ||
2248 | 3115 | } else { | ||
2249 | 3116 | attempts = info->status.rates[0].count; | ||
2250 | 3117 | success = !!(info->flags & IEEE80211_TX_STAT_ACK); | ||
2251 | 3118 | } | ||
2252 | 3119 | |||
2253 | 3120 | lq_sta->pers.tx_stats[column][index].total += attempts; | ||
2254 | 3121 | lq_sta->pers.tx_stats[column][index].success += success; | ||
2255 | 3122 | |||
2256 | 3123 | IWL_DEBUG_RATE(mvm, "Fixed rate 0x%x success %d attempts %d\n", | ||
2257 | 3124 | tx_resp_hwrate, success, attempts); | ||
2258 | 3125 | return; | ||
2259 | 3126 | } | ||
2260 | 3127 | #endif | ||
2261 | 3128 | |||
2262 | 3129 | if (time_after(jiffies, | ||
2263 | 3130 | (unsigned long)(lq_sta->last_tx + | ||
2264 | 3131 | (IWL_MVM_RS_IDLE_TIMEOUT * HZ)))) { | ||
2265 | 3132 | IWL_DEBUG_RATE(mvm, "Tx idle for too long. reinit rs\n"); | ||
2266 | 3133 | /* reach here only in case of driver RS, call directly | ||
2267 | 3134 | * the unlocked version | ||
2268 | 3135 | */ | ||
2269 | 3136 | rs_drv_rate_init(mvm, sta, info->band); | ||
2270 | 3137 | return; | ||
2271 | 3138 | } | ||
2272 | 3139 | lq_sta->last_tx = jiffies; | ||
2273 | 3140 | |||
2274 | 3141 | /* Ignore this Tx frame response if its initial rate doesn't match | ||
2275 | 3142 | * that of latest Link Quality command. There may be stragglers | ||
2276 | 3143 | * from a previous Link Quality command, but we're no longer interested | ||
2277 | 3144 | * in those; they're either from the "active" mode while we're trying | ||
2278 | 3145 | * to check "search" mode, or a prior "search" mode after we've moved | ||
2279 | 3146 | * to a new "search" mode (which might become the new "active" mode). | ||
2280 | 3147 | */ | ||
2281 | 3148 | table = &lq_sta->lq; | ||
2282 | 3149 | lq_hwrate = le32_to_cpu(table->rs_table[0]); | ||
2283 | 3150 | if (rs_rate_from_ucode_rate(lq_hwrate, info->band, &lq_rate)) { | ||
2284 | 3151 | WARN_ON_ONCE(1); | ||
2285 | 3152 | return; | ||
2286 | 3153 | } | ||
2287 | 3154 | |||
2288 | 3155 | /* Here we actually compare this rate to the latest LQ command */ | ||
2289 | 3156 | if (lq_color != LQ_FLAG_COLOR_GET(table->flags)) { | ||
2290 | 3157 | IWL_DEBUG_RATE(mvm, | ||
2291 | 3158 | "tx resp color 0x%x does not match 0x%x\n", | ||
2292 | 3159 | lq_color, LQ_FLAG_COLOR_GET(table->flags)); | ||
2293 | 3160 | |||
2294 | 3161 | /* Since rates mis-match, the last LQ command may have failed. | ||
2295 | 3162 | * After IWL_MISSED_RATE_MAX mis-matches, resync the uCode with | ||
2296 | 3163 | * ... driver. | ||
2297 | 3164 | */ | ||
2298 | 3165 | lq_sta->missed_rate_counter++; | ||
2299 | 3166 | if (lq_sta->missed_rate_counter > IWL_MVM_RS_MISSED_RATE_MAX) { | ||
2300 | 3167 | lq_sta->missed_rate_counter = 0; | ||
2301 | 3168 | IWL_DEBUG_RATE(mvm, | ||
2302 | 3169 | "Too many rates mismatch. Send sync LQ. rs_state %d\n", | ||
2303 | 3170 | lq_sta->rs_state); | ||
2304 | 3171 | iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq); | ||
2305 | 3172 | } | ||
2306 | 3173 | /* Regardless, ignore this status info for outdated rate */ | ||
2307 | 3174 | return; | ||
2308 | 3175 | } | ||
2309 | 3176 | |||
2310 | 3177 | /* Rate did match, so reset the missed_rate_counter */ | ||
2311 | 3178 | lq_sta->missed_rate_counter = 0; | ||
2312 | 3179 | |||
2313 | 3180 | if (!lq_sta->search_better_tbl) { | ||
2314 | 3181 | curr_tbl = &lq_sta->lq_info[lq_sta->active_tbl]; | ||
2315 | 3182 | other_tbl = &lq_sta->lq_info[1 - lq_sta->active_tbl]; | ||
2316 | 3183 | } else { | ||
2317 | 3184 | curr_tbl = &lq_sta->lq_info[1 - lq_sta->active_tbl]; | ||
2318 | 3185 | other_tbl = &lq_sta->lq_info[lq_sta->active_tbl]; | ||
2319 | 3186 | } | ||
2320 | 3187 | |||
2321 | 3188 | if (WARN_ON_ONCE(!rs_rate_column_match(&lq_rate, &curr_tbl->rate))) { | ||
2322 | 3189 | IWL_DEBUG_RATE(mvm, | ||
2323 | 3190 | "Neither active nor search matches tx rate\n"); | ||
2324 | 3191 | tmp_tbl = &lq_sta->lq_info[lq_sta->active_tbl]; | ||
2325 | 3192 | rs_dump_rate(mvm, &tmp_tbl->rate, "ACTIVE"); | ||
2326 | 3193 | tmp_tbl = &lq_sta->lq_info[1 - lq_sta->active_tbl]; | ||
2327 | 3194 | rs_dump_rate(mvm, &tmp_tbl->rate, "SEARCH"); | ||
2328 | 3195 | rs_dump_rate(mvm, &lq_rate, "ACTUAL"); | ||
2329 | 3196 | |||
2330 | 3197 | /* no matching table found, let's by-pass the data collection | ||
2331 | 3198 | * and continue to perform rate scale to find the rate table | ||
2332 | 3199 | */ | ||
2333 | 3200 | rs_stay_in_table(lq_sta, true); | ||
2334 | 3201 | goto done; | ||
2335 | 3202 | } | ||
2336 | 3203 | |||
2337 | 3204 | /* Updating the frame history depends on whether packets were | ||
2338 | 3205 | * aggregated. | ||
2339 | 3206 | * | ||
2340 | 3207 | * For aggregation, all packets were transmitted at the same rate, the | ||
2341 | 3208 | * first index into rate scale table. | ||
2342 | 3209 | */ | ||
2343 | 3210 | if (info->flags & IEEE80211_TX_STAT_AMPDU) { | ||
2344 | 3211 | rs_collect_tpc_data(mvm, lq_sta, curr_tbl, tx_resp_rate.index, | ||
2345 | 3212 | info->status.ampdu_len, | ||
2346 | 3213 | info->status.ampdu_ack_len, | ||
2347 | 3214 | reduced_txp); | ||
2348 | 3215 | |||
2349 | 3216 | /* ampdu_ack_len = 0 marks no BA was received. For TLC, treat | ||
2350 | 3217 | * it as a single frame loss as we don't want the success ratio | ||
2351 | 3218 | * to dip too quickly because a BA wasn't received. | ||
2352 | 3219 | * For TPC, there's no need for this optimisation since we want | ||
2353 | 3220 | * to recover very quickly from a bad power reduction and, | ||
2354 | 3221 | * therefore we'd like the success ratio to get an immediate hit | ||
2355 | 3222 | * when failing to get a BA, so we'd switch back to a lower or | ||
2356 | 3223 | * zero power reduction. When FW transmits agg with a rate | ||
2357 | 3224 | * different from the initial rate, it will not use reduced txp | ||
2358 | 3225 | * and will send BA notification twice (one empty with reduced | ||
2359 | 3226 | * txp equal to the value from LQ and one with reduced txp 0). | ||
2360 | 3227 | * We need to update counters for each txp level accordingly. | ||
2361 | 3228 | */ | ||
2362 | 3229 | if (info->status.ampdu_ack_len == 0) | ||
2363 | 3230 | info->status.ampdu_len = 1; | ||
2364 | 3231 | |||
2365 | 3232 | rs_collect_tlc_data(mvm, mvmsta, tid, curr_tbl, | ||
2366 | 3233 | tx_resp_rate.index, | ||
2367 | 3234 | info->status.ampdu_len, | ||
2368 | 3235 | info->status.ampdu_ack_len); | ||
2369 | 3236 | |||
2370 | 3237 | /* Update success/fail counts if not searching for new mode */ | ||
2371 | 3238 | if (lq_sta->rs_state == RS_STATE_STAY_IN_COLUMN) { | ||
2372 | 3239 | lq_sta->total_success += info->status.ampdu_ack_len; | ||
2373 | 3240 | lq_sta->total_failed += (info->status.ampdu_len - | ||
2374 | 3241 | info->status.ampdu_ack_len); | ||
2375 | 3242 | } | ||
2376 | 3243 | } else { | ||
2377 | 3244 | /* For legacy, update frame history with for each Tx retry. */ | ||
2378 | 3245 | retries = info->status.rates[0].count - 1; | ||
2379 | 3246 | /* HW doesn't send more than 15 retries */ | ||
2380 | 3247 | retries = min(retries, 15); | ||
2381 | 3248 | |||
2382 | 3249 | /* The last transmission may have been successful */ | ||
2383 | 3250 | legacy_success = !!(info->flags & IEEE80211_TX_STAT_ACK); | ||
2384 | 3251 | /* Collect data for each rate used during failed TX attempts */ | ||
2385 | 3252 | for (i = 0; i <= retries; ++i) { | ||
2386 | 3253 | lq_hwrate = le32_to_cpu(table->rs_table[i]); | ||
2387 | 3254 | if (rs_rate_from_ucode_rate(lq_hwrate, info->band, | ||
2388 | 3255 | &lq_rate)) { | ||
2389 | 3256 | WARN_ON_ONCE(1); | ||
2390 | 3257 | return; | ||
2391 | 3258 | } | ||
2392 | 3259 | |||
2393 | 3260 | /* Only collect stats if retried rate is in the same RS | ||
2394 | 3261 | * table as active/search. | ||
2395 | 3262 | */ | ||
2396 | 3263 | if (rs_rate_column_match(&lq_rate, &curr_tbl->rate)) | ||
2397 | 3264 | tmp_tbl = curr_tbl; | ||
2398 | 3265 | else if (rs_rate_column_match(&lq_rate, | ||
2399 | 3266 | &other_tbl->rate)) | ||
2400 | 3267 | tmp_tbl = other_tbl; | ||
2401 | 3268 | else | ||
2402 | 3269 | continue; | ||
2403 | 3270 | |||
2404 | 3271 | rs_collect_tpc_data(mvm, lq_sta, tmp_tbl, | ||
2405 | 3272 | tx_resp_rate.index, 1, | ||
2406 | 3273 | i < retries ? 0 : legacy_success, | ||
2407 | 3274 | reduced_txp); | ||
2408 | 3275 | rs_collect_tlc_data(mvm, mvmsta, tid, tmp_tbl, | ||
2409 | 3276 | tx_resp_rate.index, 1, | ||
2410 | 3277 | i < retries ? 0 : legacy_success); | ||
2411 | 3278 | } | ||
2412 | 3279 | |||
2413 | 3280 | /* Update success/fail counts if not searching for new mode */ | ||
2414 | 3281 | if (lq_sta->rs_state == RS_STATE_STAY_IN_COLUMN) { | ||
2415 | 3282 | lq_sta->total_success += legacy_success; | ||
2416 | 3283 | lq_sta->total_failed += retries + (1 - legacy_success); | ||
2417 | 3284 | } | ||
2418 | 3285 | } | ||
2419 | 3286 | /* The last TX rate is cached in lq_sta; it's set in if/else above */ | ||
2420 | 3287 | lq_sta->last_rate_n_flags = lq_hwrate; | ||
2421 | 3288 | IWL_DEBUG_RATE(mvm, "reduced txpower: %d\n", reduced_txp); | ||
2422 | 3289 | done: | ||
2423 | 3290 | /* See if there's a better rate or modulation mode to try. */ | ||
2424 | 3291 | if (sta->supp_rates[info->band]) | ||
2425 | 3292 | rs_rate_scale_perform(mvm, sta, lq_sta, tid, ndp); | ||
2426 | 3293 | } | ||
2427 | 3294 | |||
2428 | 3295 | void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | ||
2429 | 3296 | int tid, struct ieee80211_tx_info *info, bool ndp) | ||
2430 | 3297 | { | ||
2431 | 3298 | struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); | ||
2432 | 3299 | |||
2433 | 3300 | /* If it's locked we are in middle of init flow | ||
2434 | 3301 | * just wait for next tx status to update the lq_sta data | ||
2435 | 3302 | */ | ||
2436 | 3303 | if (!spin_trylock(&mvmsta->lq_sta.rs_drv.pers.lock)) | ||
2437 | 3304 | return; | ||
2438 | 3305 | |||
2439 | 3306 | __iwl_mvm_rs_tx_status(mvm, sta, tid, info, ndp); | ||
2440 | 3307 | spin_unlock(&mvmsta->lq_sta.rs_drv.pers.lock); | ||
2441 | 3308 | } | ||
2442 | 3309 | |||
2443 | 3293 | #ifdef CPTCFG_MAC80211_DEBUGFS | 3310 | #ifdef CPTCFG_MAC80211_DEBUGFS |
2444 | 3294 | static void rs_build_rates_table_from_fixed(struct iwl_mvm *mvm, | 3311 | static void rs_build_rates_table_from_fixed(struct iwl_mvm *mvm, |
2445 | 3295 | struct iwl_lq_cmd *lq_cmd, | 3312 | struct iwl_lq_cmd *lq_cmd, |
2446 | @@ -3581,7 +3598,7 @@ static void rs_set_lq_ss_params(struct iwl_mvm *mvm, | |||
2447 | 3581 | 3598 | ||
2448 | 3582 | bfersta_ss_params &= ~LQ_SS_BFER_ALLOWED; | 3599 | bfersta_ss_params &= ~LQ_SS_BFER_ALLOWED; |
2449 | 3583 | bfersta_lq_cmd->ss_params = cpu_to_le32(bfersta_ss_params); | 3600 | bfersta_lq_cmd->ss_params = cpu_to_le32(bfersta_ss_params); |
2451 | 3584 | iwl_mvm_send_lq_cmd(mvm, bfersta_lq_cmd, false); | 3601 | iwl_mvm_send_lq_cmd(mvm, bfersta_lq_cmd); |
2452 | 3585 | 3602 | ||
2453 | 3586 | ss_params |= LQ_SS_BFER_ALLOWED; | 3603 | ss_params |= LQ_SS_BFER_ALLOWED; |
2454 | 3587 | IWL_DEBUG_RATE(mvm, | 3604 | IWL_DEBUG_RATE(mvm, |
2455 | @@ -3747,7 +3764,7 @@ static void rs_program_fix_rate(struct iwl_mvm *mvm, | |||
2456 | 3747 | 3764 | ||
2457 | 3748 | if (lq_sta->pers.dbg_fixed_rate) { | 3765 | if (lq_sta->pers.dbg_fixed_rate) { |
2458 | 3749 | rs_fill_lq_cmd(mvm, NULL, lq_sta, NULL); | 3766 | rs_fill_lq_cmd(mvm, NULL, lq_sta, NULL); |
2460 | 3750 | iwl_mvm_send_lq_cmd(lq_sta->pers.drv, &lq_sta->lq, false); | 3767 | iwl_mvm_send_lq_cmd(lq_sta->pers.drv, &lq_sta->lq); |
2461 | 3751 | } | 3768 | } |
2462 | 3752 | } | 3769 | } |
2463 | 3753 | 3770 | ||
2464 | @@ -4105,10 +4122,6 @@ static void rs_drv_add_sta_debugfs(void *mvm, void *priv_sta, | |||
2465 | 4105 | 4122 | ||
2466 | 4106 | MVM_DEBUGFS_ADD_FILE_RS(ss_force, dir, 0600); | 4123 | MVM_DEBUGFS_ADD_FILE_RS(ss_force, dir, 0600); |
2467 | 4107 | } | 4124 | } |
2468 | 4108 | |||
2469 | 4109 | void rs_remove_sta_debugfs(void *mvm, void *mvm_sta) | ||
2470 | 4110 | { | ||
2471 | 4111 | } | ||
2472 | 4112 | #endif | 4125 | #endif |
2473 | 4113 | 4126 | ||
2474 | 4114 | /* | 4127 | /* |
2475 | @@ -4136,7 +4149,6 @@ static const struct rate_control_ops rs_mvm_ops_drv = { | |||
2476 | 4136 | .rate_update = rs_drv_rate_update, | 4149 | .rate_update = rs_drv_rate_update, |
2477 | 4137 | #ifdef CPTCFG_MAC80211_DEBUGFS | 4150 | #ifdef CPTCFG_MAC80211_DEBUGFS |
2478 | 4138 | .add_sta_debugfs = rs_drv_add_sta_debugfs, | 4151 | .add_sta_debugfs = rs_drv_add_sta_debugfs, |
2479 | 4139 | .remove_sta_debugfs = rs_remove_sta_debugfs, | ||
2480 | 4140 | #endif | 4152 | #endif |
2481 | 4141 | .capa = RATE_CTRL_CAPA_VHT_EXT_NSS_BW, | 4153 | .capa = RATE_CTRL_CAPA_VHT_EXT_NSS_BW, |
2482 | 4142 | }; | 4154 | }; |
2483 | @@ -4144,10 +4156,15 @@ static const struct rate_control_ops rs_mvm_ops_drv = { | |||
2484 | 4144 | void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | 4156 | void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta, |
2485 | 4145 | enum nl80211_band band, bool update) | 4157 | enum nl80211_band band, bool update) |
2486 | 4146 | { | 4158 | { |
2488 | 4147 | if (iwl_mvm_has_tlc_offload(mvm)) | 4159 | if (iwl_mvm_has_tlc_offload(mvm)) { |
2489 | 4148 | rs_fw_rate_init(mvm, sta, band, update); | 4160 | rs_fw_rate_init(mvm, sta, band, update); |
2492 | 4149 | else | 4161 | } else { |
2493 | 4150 | rs_drv_rate_init(mvm, sta, band, update); | 4162 | struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); |
2494 | 4163 | |||
2495 | 4164 | spin_lock(&mvmsta->lq_sta.rs_drv.pers.lock); | ||
2496 | 4165 | rs_drv_rate_init(mvm, sta, band); | ||
2497 | 4166 | spin_unlock(&mvmsta->lq_sta.rs_drv.pers.lock); | ||
2498 | 4167 | } | ||
2499 | 4151 | } | 4168 | } |
2500 | 4152 | 4169 | ||
2501 | 4153 | int iwl_mvm_rate_control_register(void) | 4170 | int iwl_mvm_rate_control_register(void) |
2502 | @@ -4177,7 +4194,7 @@ static int rs_drv_tx_protection(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta, | |||
2503 | 4177 | lq->flags &= ~LQ_FLAG_USE_RTS_MSK; | 4194 | lq->flags &= ~LQ_FLAG_USE_RTS_MSK; |
2504 | 4178 | } | 4195 | } |
2505 | 4179 | 4196 | ||
2507 | 4180 | return iwl_mvm_send_lq_cmd(mvm, lq, false); | 4197 | return iwl_mvm_send_lq_cmd(mvm, lq); |
2508 | 4181 | } | 4198 | } |
2509 | 4182 | 4199 | ||
2510 | 4183 | /** | 4200 | /** |
2511 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.h b/drivers/net/wireless/intel/iwlwifi/mvm/rs.h | |||
2512 | index b80eebc..b199b43 100644 | |||
2513 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.h | |||
2514 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.h | |||
2515 | @@ -3,7 +3,7 @@ | |||
2516 | 3 | * Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved. | 3 | * Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved. |
2517 | 4 | * Copyright(c) 2015 Intel Mobile Communications GmbH | 4 | * Copyright(c) 2015 Intel Mobile Communications GmbH |
2518 | 5 | * Copyright(c) 2017 Intel Deutschland GmbH | 5 | * Copyright(c) 2017 Intel Deutschland GmbH |
2520 | 6 | * Copyright(c) 2018 Intel Corporation | 6 | * Copyright(c) 2018 - 2019 Intel Corporation |
2521 | 7 | * | 7 | * |
2522 | 8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
2523 | 9 | * under the terms of version 2 of the GNU General Public License as | 9 | * under the terms of version 2 of the GNU General Public License as |
2524 | @@ -396,6 +396,7 @@ struct iwl_lq_sta { | |||
2525 | 396 | s8 last_rssi; | 396 | s8 last_rssi; |
2526 | 397 | struct rs_rate_stats tx_stats[RS_COLUMN_COUNT][IWL_RATE_COUNT]; | 397 | struct rs_rate_stats tx_stats[RS_COLUMN_COUNT][IWL_RATE_COUNT]; |
2527 | 398 | struct iwl_mvm *drv; | 398 | struct iwl_mvm *drv; |
2528 | 399 | spinlock_t lock; /* for races in reinit/update table */ | ||
2529 | 399 | } pers; | 400 | } pers; |
2530 | 400 | }; | 401 | }; |
2531 | 401 | 402 | ||
2532 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | |||
2533 | index c35c3dd..6eadeb7 100644 | |||
2534 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | |||
2535 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | |||
2536 | @@ -462,20 +462,22 @@ static bool iwl_mvm_is_dup(struct ieee80211_sta *sta, int queue, | |||
2537 | 462 | } | 462 | } |
2538 | 463 | 463 | ||
2539 | 464 | int iwl_mvm_notify_rx_queue(struct iwl_mvm *mvm, u32 rxq_mask, | 464 | int iwl_mvm_notify_rx_queue(struct iwl_mvm *mvm, u32 rxq_mask, |
2541 | 465 | const u8 *data, u32 count) | 465 | const u8 *data, u32 count, bool async) |
2542 | 466 | { | 466 | { |
2544 | 467 | struct iwl_rxq_sync_cmd *cmd; | 467 | u8 buf[sizeof(struct iwl_rxq_sync_cmd) + |
2545 | 468 | sizeof(struct iwl_mvm_rss_sync_notif)]; | ||
2546 | 469 | struct iwl_rxq_sync_cmd *cmd = (void *)buf; | ||
2547 | 468 | u32 data_size = sizeof(*cmd) + count; | 470 | u32 data_size = sizeof(*cmd) + count; |
2548 | 469 | int ret; | 471 | int ret; |
2549 | 470 | 472 | ||
2552 | 471 | /* should be DWORD aligned */ | 473 | /* |
2553 | 472 | if (WARN_ON(count & 3 || count > IWL_MULTI_QUEUE_SYNC_MSG_MAX_SIZE)) | 474 | * size must be a multiple of DWORD |
2554 | 475 | * Ensure we don't overflow buf | ||
2555 | 476 | */ | ||
2556 | 477 | if (WARN_ON(count & 3 || | ||
2557 | 478 | count > sizeof(struct iwl_mvm_rss_sync_notif))) | ||
2558 | 473 | return -EINVAL; | 479 | return -EINVAL; |
2559 | 474 | 480 | ||
2560 | 475 | cmd = kzalloc(data_size, GFP_KERNEL); | ||
2561 | 476 | if (!cmd) | ||
2562 | 477 | return -ENOMEM; | ||
2563 | 478 | |||
2564 | 479 | cmd->rxq_mask = cpu_to_le32(rxq_mask); | 481 | cmd->rxq_mask = cpu_to_le32(rxq_mask); |
2565 | 480 | cmd->count = cpu_to_le32(count); | 482 | cmd->count = cpu_to_le32(count); |
2566 | 481 | cmd->flags = 0; | 483 | cmd->flags = 0; |
2567 | @@ -484,9 +486,8 @@ int iwl_mvm_notify_rx_queue(struct iwl_mvm *mvm, u32 rxq_mask, | |||
2568 | 484 | ret = iwl_mvm_send_cmd_pdu(mvm, | 486 | ret = iwl_mvm_send_cmd_pdu(mvm, |
2569 | 485 | WIDE_ID(DATA_PATH_GROUP, | 487 | WIDE_ID(DATA_PATH_GROUP, |
2570 | 486 | TRIGGER_RX_QUEUES_NOTIF_CMD), | 488 | TRIGGER_RX_QUEUES_NOTIF_CMD), |
2572 | 487 | 0, data_size, cmd); | 489 | async ? CMD_ASYNC : 0, data_size, cmd); |
2573 | 488 | 490 | ||
2574 | 489 | kfree(cmd); | ||
2575 | 490 | return ret; | 491 | return ret; |
2576 | 491 | } | 492 | } |
2577 | 492 | 493 | ||
2578 | @@ -502,14 +503,31 @@ static bool iwl_mvm_is_sn_less(u16 sn1, u16 sn2, u16 buffer_size) | |||
2579 | 502 | !ieee80211_sn_less(sn1, sn2 - buffer_size); | 503 | !ieee80211_sn_less(sn1, sn2 - buffer_size); |
2580 | 503 | } | 504 | } |
2581 | 504 | 505 | ||
2582 | 506 | static void iwl_mvm_sync_nssn(struct iwl_mvm *mvm, u8 baid, u16 nssn) | ||
2583 | 507 | { | ||
2584 | 508 | struct iwl_mvm_rss_sync_notif notif = { | ||
2585 | 509 | .metadata.type = IWL_MVM_RXQ_NSSN_SYNC, | ||
2586 | 510 | .metadata.sync = 0, | ||
2587 | 511 | .nssn_sync.baid = baid, | ||
2588 | 512 | .nssn_sync.nssn = nssn, | ||
2589 | 513 | }; | ||
2590 | 514 | |||
2591 | 515 | iwl_mvm_sync_rx_queues_internal(mvm, (void *)¬if, sizeof(notif)); | ||
2592 | 516 | } | ||
2593 | 517 | |||
2594 | 505 | #define RX_REORDER_BUF_TIMEOUT_MQ (HZ / 10) | 518 | #define RX_REORDER_BUF_TIMEOUT_MQ (HZ / 10) |
2595 | 506 | 519 | ||
2596 | 520 | enum iwl_mvm_release_flags { | ||
2597 | 521 | IWL_MVM_RELEASE_SEND_RSS_SYNC = BIT(0), | ||
2598 | 522 | IWL_MVM_RELEASE_FROM_RSS_SYNC = BIT(1), | ||
2599 | 523 | }; | ||
2600 | 524 | |||
2601 | 507 | static void iwl_mvm_release_frames(struct iwl_mvm *mvm, | 525 | static void iwl_mvm_release_frames(struct iwl_mvm *mvm, |
2602 | 508 | struct ieee80211_sta *sta, | 526 | struct ieee80211_sta *sta, |
2603 | 509 | struct napi_struct *napi, | 527 | struct napi_struct *napi, |
2604 | 510 | struct iwl_mvm_baid_data *baid_data, | 528 | struct iwl_mvm_baid_data *baid_data, |
2605 | 511 | struct iwl_mvm_reorder_buffer *reorder_buf, | 529 | struct iwl_mvm_reorder_buffer *reorder_buf, |
2607 | 512 | u16 nssn) | 530 | u16 nssn, u32 flags) |
2608 | 513 | { | 531 | { |
2609 | 514 | struct iwl_mvm_reorder_buf_entry *entries = | 532 | struct iwl_mvm_reorder_buf_entry *entries = |
2610 | 515 | &baid_data->entries[reorder_buf->queue * | 533 | &baid_data->entries[reorder_buf->queue * |
2611 | @@ -518,6 +536,18 @@ static void iwl_mvm_release_frames(struct iwl_mvm *mvm, | |||
2612 | 518 | 536 | ||
2613 | 519 | lockdep_assert_held(&reorder_buf->lock); | 537 | lockdep_assert_held(&reorder_buf->lock); |
2614 | 520 | 538 | ||
2615 | 539 | /* | ||
2616 | 540 | * We keep the NSSN not too far behind, if we are sync'ing it and it | ||
2617 | 541 | * is more than 2048 ahead of us, it must be behind us. Discard it. | ||
2618 | 542 | * This can happen if the queue that hit the 0 / 2048 seqno was lagging | ||
2619 | 543 | * behind and this queue already processed packets. The next if | ||
2620 | 544 | * would have caught cases where this queue would have processed less | ||
2621 | 545 | * than 64 packets, but it may have processed more than 64 packets. | ||
2622 | 546 | */ | ||
2623 | 547 | if ((flags & IWL_MVM_RELEASE_FROM_RSS_SYNC) && | ||
2624 | 548 | ieee80211_sn_less(nssn, ssn)) | ||
2625 | 549 | goto set_timer; | ||
2626 | 550 | |||
2627 | 521 | /* ignore nssn smaller than head sn - this can happen due to timeout */ | 551 | /* ignore nssn smaller than head sn - this can happen due to timeout */ |
2628 | 522 | if (iwl_mvm_is_sn_less(nssn, ssn, reorder_buf->buf_size)) | 552 | if (iwl_mvm_is_sn_less(nssn, ssn, reorder_buf->buf_size)) |
2629 | 523 | goto set_timer; | 553 | goto set_timer; |
2630 | @@ -528,6 +558,9 @@ static void iwl_mvm_release_frames(struct iwl_mvm *mvm, | |||
2631 | 528 | struct sk_buff *skb; | 558 | struct sk_buff *skb; |
2632 | 529 | 559 | ||
2633 | 530 | ssn = ieee80211_sn_inc(ssn); | 560 | ssn = ieee80211_sn_inc(ssn); |
2634 | 561 | if ((flags & IWL_MVM_RELEASE_SEND_RSS_SYNC) && | ||
2635 | 562 | (ssn == 2048 || ssn == 0)) | ||
2636 | 563 | iwl_mvm_sync_nssn(mvm, baid_data->baid, ssn); | ||
2637 | 531 | 564 | ||
2638 | 532 | /* | 565 | /* |
2639 | 533 | * Empty the list. Will have more than one frame for A-MSDU. | 566 | * Empty the list. Will have more than one frame for A-MSDU. |
2640 | @@ -614,7 +647,8 @@ void iwl_mvm_reorder_timer_expired(struct timer_list *t) | |||
2641 | 614 | sta_id, sn); | 647 | sta_id, sn); |
2642 | 615 | iwl_mvm_event_frame_timeout_callback(buf->mvm, mvmsta->vif, | 648 | iwl_mvm_event_frame_timeout_callback(buf->mvm, mvmsta->vif, |
2643 | 616 | sta, baid_data->tid); | 649 | sta, baid_data->tid); |
2645 | 617 | iwl_mvm_release_frames(buf->mvm, sta, NULL, baid_data, buf, sn); | 650 | iwl_mvm_release_frames(buf->mvm, sta, NULL, baid_data, |
2646 | 651 | buf, sn, IWL_MVM_RELEASE_SEND_RSS_SYNC); | ||
2647 | 618 | rcu_read_unlock(); | 652 | rcu_read_unlock(); |
2648 | 619 | } else { | 653 | } else { |
2649 | 620 | /* | 654 | /* |
2650 | @@ -656,7 +690,8 @@ static void iwl_mvm_del_ba(struct iwl_mvm *mvm, int queue, | |||
2651 | 656 | spin_lock_bh(&reorder_buf->lock); | 690 | spin_lock_bh(&reorder_buf->lock); |
2652 | 657 | iwl_mvm_release_frames(mvm, sta, NULL, ba_data, reorder_buf, | 691 | iwl_mvm_release_frames(mvm, sta, NULL, ba_data, reorder_buf, |
2653 | 658 | ieee80211_sn_add(reorder_buf->head_sn, | 692 | ieee80211_sn_add(reorder_buf->head_sn, |
2655 | 659 | reorder_buf->buf_size)); | 693 | reorder_buf->buf_size), |
2656 | 694 | 0); | ||
2657 | 660 | spin_unlock_bh(&reorder_buf->lock); | 695 | spin_unlock_bh(&reorder_buf->lock); |
2658 | 661 | del_timer_sync(&reorder_buf->reorder_timer); | 696 | del_timer_sync(&reorder_buf->reorder_timer); |
2659 | 662 | 697 | ||
2660 | @@ -664,8 +699,54 @@ out: | |||
2661 | 664 | rcu_read_unlock(); | 699 | rcu_read_unlock(); |
2662 | 665 | } | 700 | } |
2663 | 666 | 701 | ||
2666 | 667 | void iwl_mvm_rx_queue_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb, | 702 | static void iwl_mvm_release_frames_from_notif(struct iwl_mvm *mvm, |
2667 | 668 | int queue) | 703 | struct napi_struct *napi, |
2668 | 704 | u8 baid, u16 nssn, int queue, | ||
2669 | 705 | u32 flags) | ||
2670 | 706 | { | ||
2671 | 707 | struct ieee80211_sta *sta; | ||
2672 | 708 | struct iwl_mvm_reorder_buffer *reorder_buf; | ||
2673 | 709 | struct iwl_mvm_baid_data *ba_data; | ||
2674 | 710 | |||
2675 | 711 | IWL_DEBUG_HT(mvm, "Frame release notification for BAID %u, NSSN %d\n", | ||
2676 | 712 | baid, nssn); | ||
2677 | 713 | |||
2678 | 714 | if (WARN_ON_ONCE(baid == IWL_RX_REORDER_DATA_INVALID_BAID || | ||
2679 | 715 | baid >= ARRAY_SIZE(mvm->baid_map))) | ||
2680 | 716 | return; | ||
2681 | 717 | |||
2682 | 718 | rcu_read_lock(); | ||
2683 | 719 | |||
2684 | 720 | ba_data = rcu_dereference(mvm->baid_map[baid]); | ||
2685 | 721 | if (WARN_ON_ONCE(!ba_data)) | ||
2686 | 722 | goto out; | ||
2687 | 723 | |||
2688 | 724 | sta = rcu_dereference(mvm->fw_id_to_mac_id[ba_data->sta_id]); | ||
2689 | 725 | if (WARN_ON_ONCE(IS_ERR_OR_NULL(sta))) | ||
2690 | 726 | goto out; | ||
2691 | 727 | |||
2692 | 728 | reorder_buf = &ba_data->reorder_buf[queue]; | ||
2693 | 729 | |||
2694 | 730 | spin_lock_bh(&reorder_buf->lock); | ||
2695 | 731 | iwl_mvm_release_frames(mvm, sta, napi, ba_data, | ||
2696 | 732 | reorder_buf, nssn, flags); | ||
2697 | 733 | spin_unlock_bh(&reorder_buf->lock); | ||
2698 | 734 | |||
2699 | 735 | out: | ||
2700 | 736 | rcu_read_unlock(); | ||
2701 | 737 | } | ||
2702 | 738 | |||
2703 | 739 | static void iwl_mvm_nssn_sync(struct iwl_mvm *mvm, | ||
2704 | 740 | struct napi_struct *napi, int queue, | ||
2705 | 741 | const struct iwl_mvm_nssn_sync_data *data) | ||
2706 | 742 | { | ||
2707 | 743 | iwl_mvm_release_frames_from_notif(mvm, napi, data->baid, | ||
2708 | 744 | data->nssn, queue, | ||
2709 | 745 | IWL_MVM_RELEASE_FROM_RSS_SYNC); | ||
2710 | 746 | } | ||
2711 | 747 | |||
2712 | 748 | void iwl_mvm_rx_queue_notif(struct iwl_mvm *mvm, struct napi_struct *napi, | ||
2713 | 749 | struct iwl_rx_cmd_buffer *rxb, int queue) | ||
2714 | 669 | { | 750 | { |
2715 | 670 | struct iwl_rx_packet *pkt = rxb_addr(rxb); | 751 | struct iwl_rx_packet *pkt = rxb_addr(rxb); |
2716 | 671 | struct iwl_rxq_sync_notification *notif; | 752 | struct iwl_rxq_sync_notification *notif; |
2717 | @@ -686,6 +767,10 @@ void iwl_mvm_rx_queue_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb, | |||
2718 | 686 | case IWL_MVM_RXQ_NOTIF_DEL_BA: | 767 | case IWL_MVM_RXQ_NOTIF_DEL_BA: |
2719 | 687 | iwl_mvm_del_ba(mvm, queue, (void *)internal_notif->data); | 768 | iwl_mvm_del_ba(mvm, queue, (void *)internal_notif->data); |
2720 | 688 | break; | 769 | break; |
2721 | 770 | case IWL_MVM_RXQ_NSSN_SYNC: | ||
2722 | 771 | iwl_mvm_nssn_sync(mvm, napi, queue, | ||
2723 | 772 | (void *)internal_notif->data); | ||
2724 | 773 | break; | ||
2725 | 689 | default: | 774 | default: |
2726 | 690 | WARN_ONCE(1, "Invalid identifier %d", internal_notif->type); | 775 | WARN_ONCE(1, "Invalid identifier %d", internal_notif->type); |
2727 | 691 | } | 776 | } |
2728 | @@ -784,7 +869,8 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm, | |||
2729 | 784 | } | 869 | } |
2730 | 785 | 870 | ||
2731 | 786 | if (ieee80211_is_back_req(hdr->frame_control)) { | 871 | if (ieee80211_is_back_req(hdr->frame_control)) { |
2733 | 787 | iwl_mvm_release_frames(mvm, sta, napi, baid_data, buffer, nssn); | 872 | iwl_mvm_release_frames(mvm, sta, napi, baid_data, |
2734 | 873 | buffer, nssn, 0); | ||
2735 | 788 | goto drop; | 874 | goto drop; |
2736 | 789 | } | 875 | } |
2737 | 790 | 876 | ||
2738 | @@ -793,7 +879,10 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm, | |||
2739 | 793 | * If the SN is smaller than the NSSN it might need to first go into | 879 | * If the SN is smaller than the NSSN it might need to first go into |
2740 | 794 | * the reorder buffer, in which case we just release up to it and the | 880 | * the reorder buffer, in which case we just release up to it and the |
2741 | 795 | * rest of the function will take care of storing it and releasing up to | 881 | * rest of the function will take care of storing it and releasing up to |
2743 | 796 | * the nssn | 882 | * the nssn. |
2744 | 883 | * This should not happen. This queue has been lagging and it should | ||
2745 | 884 | * have been updated by a IWL_MVM_RXQ_NSSN_SYNC notification. Be nice | ||
2746 | 885 | * and update the other queues. | ||
2747 | 797 | */ | 886 | */ |
2748 | 798 | if (!iwl_mvm_is_sn_less(nssn, buffer->head_sn + buffer->buf_size, | 887 | if (!iwl_mvm_is_sn_less(nssn, buffer->head_sn + buffer->buf_size, |
2749 | 799 | buffer->buf_size) || | 888 | buffer->buf_size) || |
2750 | @@ -801,7 +890,7 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm, | |||
2751 | 801 | u16 min_sn = ieee80211_sn_less(sn, nssn) ? sn : nssn; | 890 | u16 min_sn = ieee80211_sn_less(sn, nssn) ? sn : nssn; |
2752 | 802 | 891 | ||
2753 | 803 | iwl_mvm_release_frames(mvm, sta, napi, baid_data, buffer, | 892 | iwl_mvm_release_frames(mvm, sta, napi, baid_data, buffer, |
2755 | 804 | min_sn); | 893 | min_sn, IWL_MVM_RELEASE_SEND_RSS_SYNC); |
2756 | 805 | } | 894 | } |
2757 | 806 | 895 | ||
2758 | 807 | /* drop any oudated packets */ | 896 | /* drop any oudated packets */ |
2759 | @@ -812,8 +901,23 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm, | |||
2760 | 812 | if (!buffer->num_stored && ieee80211_sn_less(sn, nssn)) { | 901 | if (!buffer->num_stored && ieee80211_sn_less(sn, nssn)) { |
2761 | 813 | if (iwl_mvm_is_sn_less(buffer->head_sn, nssn, | 902 | if (iwl_mvm_is_sn_less(buffer->head_sn, nssn, |
2762 | 814 | buffer->buf_size) && | 903 | buffer->buf_size) && |
2764 | 815 | (!amsdu || last_subframe)) | 904 | (!amsdu || last_subframe)) { |
2765 | 905 | /* | ||
2766 | 906 | * If we crossed the 2048 or 0 SN, notify all the | ||
2767 | 907 | * queues. This is done in order to avoid having a | ||
2768 | 908 | * head_sn that lags behind for too long. When that | ||
2769 | 909 | * happens, we can get to a situation where the head_sn | ||
2770 | 910 | * is within the interval [nssn - buf_size : nssn] | ||
2771 | 911 | * which will make us think that the nssn is a packet | ||
2772 | 912 | * that we already freed because of the reordering | ||
2773 | 913 | * buffer and we will ignore it. So maintain the | ||
2774 | 914 | * head_sn somewhat updated across all the queues: | ||
2775 | 915 | * when it crosses 0 and 2048. | ||
2776 | 916 | */ | ||
2777 | 917 | if (sn == 2048 || sn == 0) | ||
2778 | 918 | iwl_mvm_sync_nssn(mvm, baid, sn); | ||
2779 | 816 | buffer->head_sn = nssn; | 919 | buffer->head_sn = nssn; |
2780 | 920 | } | ||
2781 | 817 | /* No need to update AMSDU last SN - we are moving the head */ | 921 | /* No need to update AMSDU last SN - we are moving the head */ |
2782 | 818 | spin_unlock_bh(&buffer->lock); | 922 | spin_unlock_bh(&buffer->lock); |
2783 | 819 | return false; | 923 | return false; |
2784 | @@ -828,8 +932,11 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm, | |||
2785 | 828 | * while technically there is no hole and we can move forward. | 932 | * while technically there is no hole and we can move forward. |
2786 | 829 | */ | 933 | */ |
2787 | 830 | if (!buffer->num_stored && sn == buffer->head_sn) { | 934 | if (!buffer->num_stored && sn == buffer->head_sn) { |
2789 | 831 | if (!amsdu || last_subframe) | 935 | if (!amsdu || last_subframe) { |
2790 | 936 | if (sn == 2048 || sn == 0) | ||
2791 | 937 | iwl_mvm_sync_nssn(mvm, baid, sn); | ||
2792 | 832 | buffer->head_sn = ieee80211_sn_inc(buffer->head_sn); | 938 | buffer->head_sn = ieee80211_sn_inc(buffer->head_sn); |
2793 | 939 | } | ||
2794 | 833 | /* No need to update AMSDU last SN - we are moving the head */ | 940 | /* No need to update AMSDU last SN - we are moving the head */ |
2795 | 834 | spin_unlock_bh(&buffer->lock); | 941 | spin_unlock_bh(&buffer->lock); |
2796 | 835 | return false; | 942 | return false; |
2797 | @@ -874,7 +981,9 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm, | |||
2798 | 874 | * release notification with up to date NSSN. | 981 | * release notification with up to date NSSN. |
2799 | 875 | */ | 982 | */ |
2800 | 876 | if (!amsdu || last_subframe) | 983 | if (!amsdu || last_subframe) |
2802 | 877 | iwl_mvm_release_frames(mvm, sta, napi, baid_data, buffer, nssn); | 984 | iwl_mvm_release_frames(mvm, sta, napi, baid_data, |
2803 | 985 | buffer, nssn, | ||
2804 | 986 | IWL_MVM_RELEASE_SEND_RSS_SYNC); | ||
2805 | 878 | 987 | ||
2806 | 879 | spin_unlock_bh(&buffer->lock); | 988 | spin_unlock_bh(&buffer->lock); |
2807 | 880 | return true; | 989 | return true; |
2808 | @@ -1843,40 +1952,14 @@ void iwl_mvm_rx_monitor_no_data(struct iwl_mvm *mvm, struct napi_struct *napi, | |||
2809 | 1843 | out: | 1952 | out: |
2810 | 1844 | rcu_read_unlock(); | 1953 | rcu_read_unlock(); |
2811 | 1845 | } | 1954 | } |
2812 | 1955 | |||
2813 | 1846 | void iwl_mvm_rx_frame_release(struct iwl_mvm *mvm, struct napi_struct *napi, | 1956 | void iwl_mvm_rx_frame_release(struct iwl_mvm *mvm, struct napi_struct *napi, |
2814 | 1847 | struct iwl_rx_cmd_buffer *rxb, int queue) | 1957 | struct iwl_rx_cmd_buffer *rxb, int queue) |
2815 | 1848 | { | 1958 | { |
2816 | 1849 | struct iwl_rx_packet *pkt = rxb_addr(rxb); | 1959 | struct iwl_rx_packet *pkt = rxb_addr(rxb); |
2817 | 1850 | struct iwl_frame_release *release = (void *)pkt->data; | 1960 | struct iwl_frame_release *release = (void *)pkt->data; |
2818 | 1851 | struct ieee80211_sta *sta; | ||
2819 | 1852 | struct iwl_mvm_reorder_buffer *reorder_buf; | ||
2820 | 1853 | struct iwl_mvm_baid_data *ba_data; | ||
2821 | 1854 | |||
2822 | 1855 | int baid = release->baid; | ||
2823 | 1856 | |||
2824 | 1857 | IWL_DEBUG_HT(mvm, "Frame release notification for BAID %u, NSSN %d\n", | ||
2825 | 1858 | release->baid, le16_to_cpu(release->nssn)); | ||
2826 | 1859 | 1961 | ||
2849 | 1860 | if (WARN_ON_ONCE(baid == IWL_RX_REORDER_DATA_INVALID_BAID)) | 1962 | iwl_mvm_release_frames_from_notif(mvm, napi, release->baid, |
2850 | 1861 | return; | 1963 | le16_to_cpu(release->nssn), |
2851 | 1862 | 1964 | queue, 0); | |
2830 | 1863 | rcu_read_lock(); | ||
2831 | 1864 | |||
2832 | 1865 | ba_data = rcu_dereference(mvm->baid_map[baid]); | ||
2833 | 1866 | if (WARN_ON_ONCE(!ba_data)) | ||
2834 | 1867 | goto out; | ||
2835 | 1868 | |||
2836 | 1869 | sta = rcu_dereference(mvm->fw_id_to_mac_id[ba_data->sta_id]); | ||
2837 | 1870 | if (WARN_ON_ONCE(IS_ERR_OR_NULL(sta))) | ||
2838 | 1871 | goto out; | ||
2839 | 1872 | |||
2840 | 1873 | reorder_buf = &ba_data->reorder_buf[queue]; | ||
2841 | 1874 | |||
2842 | 1875 | spin_lock_bh(&reorder_buf->lock); | ||
2843 | 1876 | iwl_mvm_release_frames(mvm, sta, napi, ba_data, reorder_buf, | ||
2844 | 1877 | le16_to_cpu(release->nssn)); | ||
2845 | 1878 | spin_unlock_bh(&reorder_buf->lock); | ||
2846 | 1879 | |||
2847 | 1880 | out: | ||
2848 | 1881 | rcu_read_unlock(); | ||
2852 | 1882 | } | 1965 | } |
2853 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c | |||
2854 | index 7d667f3..1cdfebc 100644 | |||
2855 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c | |||
2856 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c | |||
2857 | @@ -1678,6 +1678,8 @@ int iwl_mvm_add_sta(struct iwl_mvm *mvm, | |||
2858 | 1678 | */ | 1678 | */ |
2859 | 1679 | if (iwl_mvm_has_tlc_offload(mvm)) | 1679 | if (iwl_mvm_has_tlc_offload(mvm)) |
2860 | 1680 | iwl_mvm_rs_add_sta(mvm, mvm_sta); | 1680 | iwl_mvm_rs_add_sta(mvm, mvm_sta); |
2861 | 1681 | else | ||
2862 | 1682 | spin_lock_init(&mvm_sta->lq_sta.rs_drv.pers.lock); | ||
2863 | 1681 | 1683 | ||
2864 | 1682 | iwl_mvm_toggle_tx_ant(mvm, &mvm_sta->tx_ant); | 1684 | iwl_mvm_toggle_tx_ant(mvm, &mvm_sta->tx_ant); |
2865 | 1683 | 1685 | ||
2866 | @@ -2411,7 +2413,7 @@ int iwl_mvm_rm_mcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
2867 | 2411 | 2413 | ||
2868 | 2412 | static void iwl_mvm_sync_rxq_del_ba(struct iwl_mvm *mvm, u8 baid) | 2414 | static void iwl_mvm_sync_rxq_del_ba(struct iwl_mvm *mvm, u8 baid) |
2869 | 2413 | { | 2415 | { |
2871 | 2414 | struct iwl_mvm_delba_notif notif = { | 2416 | struct iwl_mvm_rss_sync_notif notif = { |
2872 | 2415 | .metadata.type = IWL_MVM_RXQ_NOTIF_DEL_BA, | 2417 | .metadata.type = IWL_MVM_RXQ_NOTIF_DEL_BA, |
2873 | 2416 | .metadata.sync = 1, | 2418 | .metadata.sync = 1, |
2874 | 2417 | .delba.baid = baid, | 2419 | .delba.baid = baid, |
2875 | @@ -2955,7 +2957,7 @@ out: | |||
2876 | 2955 | IWL_DEBUG_HT(mvm, "Tx aggregation enabled on ra = %pM tid = %d\n", | 2957 | IWL_DEBUG_HT(mvm, "Tx aggregation enabled on ra = %pM tid = %d\n", |
2877 | 2956 | sta->addr, tid); | 2958 | sta->addr, tid); |
2878 | 2957 | 2959 | ||
2880 | 2958 | return iwl_mvm_send_lq_cmd(mvm, &mvmsta->lq_sta.rs_drv.lq, false); | 2960 | return iwl_mvm_send_lq_cmd(mvm, &mvmsta->lq_sta.rs_drv.lq); |
2881 | 2959 | } | 2961 | } |
2882 | 2960 | 2962 | ||
2883 | 2961 | static void iwl_mvm_unreserve_agg_queue(struct iwl_mvm *mvm, | 2963 | static void iwl_mvm_unreserve_agg_queue(struct iwl_mvm *mvm, |
2884 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.h b/drivers/net/wireless/intel/iwlwifi/mvm/sta.h | |||
2885 | index 4487cc3..8d70093 100644 | |||
2886 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.h | |||
2887 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.h | |||
2888 | @@ -343,9 +343,17 @@ struct iwl_mvm_delba_data { | |||
2889 | 343 | u32 baid; | 343 | u32 baid; |
2890 | 344 | } __packed; | 344 | } __packed; |
2891 | 345 | 345 | ||
2893 | 346 | struct iwl_mvm_delba_notif { | 346 | struct iwl_mvm_nssn_sync_data { |
2894 | 347 | u32 baid; | ||
2895 | 348 | u32 nssn; | ||
2896 | 349 | } __packed; | ||
2897 | 350 | |||
2898 | 351 | struct iwl_mvm_rss_sync_notif { | ||
2899 | 347 | struct iwl_mvm_internal_rxq_notif metadata; | 352 | struct iwl_mvm_internal_rxq_notif metadata; |
2901 | 348 | struct iwl_mvm_delba_data delba; | 353 | union { |
2902 | 354 | struct iwl_mvm_delba_data delba; | ||
2903 | 355 | struct iwl_mvm_nssn_sync_data nssn_sync; | ||
2904 | 356 | }; | ||
2905 | 349 | } __packed; | 357 | } __packed; |
2906 | 350 | 358 | ||
2907 | 351 | /** | 359 | /** |
2908 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |||
2909 | index dd65970..99f02f8 100644 | |||
2910 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |||
2911 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |||
2912 | @@ -647,12 +647,12 @@ int iwl_mvm_reconfig_scd(struct iwl_mvm *mvm, int queue, int fifo, int sta_id, | |||
2913 | 647 | * this case to clear the state indicating that station creation is in | 647 | * this case to clear the state indicating that station creation is in |
2914 | 648 | * progress. | 648 | * progress. |
2915 | 649 | */ | 649 | */ |
2917 | 650 | int iwl_mvm_send_lq_cmd(struct iwl_mvm *mvm, struct iwl_lq_cmd *lq, bool sync) | 650 | int iwl_mvm_send_lq_cmd(struct iwl_mvm *mvm, struct iwl_lq_cmd *lq) |
2918 | 651 | { | 651 | { |
2919 | 652 | struct iwl_host_cmd cmd = { | 652 | struct iwl_host_cmd cmd = { |
2920 | 653 | .id = LQ_CMD, | 653 | .id = LQ_CMD, |
2921 | 654 | .len = { sizeof(struct iwl_lq_cmd), }, | 654 | .len = { sizeof(struct iwl_lq_cmd), }, |
2923 | 655 | .flags = sync ? 0 : CMD_ASYNC, | 655 | .flags = CMD_ASYNC, |
2924 | 656 | .data = { lq, }, | 656 | .data = { lq, }, |
2925 | 657 | }; | 657 | }; |
2926 | 658 | 658 | ||
2927 | diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c | |||
2928 | index fee789b..1324f23 100644 | |||
2929 | --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c | |||
2930 | +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c | |||
2931 | @@ -417,6 +417,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = { | |||
2932 | 417 | {IWL_PCI_DEVICE(0x2526, 0x40A4, iwl9460_2ac_cfg)}, | 417 | {IWL_PCI_DEVICE(0x2526, 0x40A4, iwl9460_2ac_cfg)}, |
2933 | 418 | {IWL_PCI_DEVICE(0x2526, 0x4234, iwl9560_2ac_cfg_soc)}, | 418 | {IWL_PCI_DEVICE(0x2526, 0x4234, iwl9560_2ac_cfg_soc)}, |
2934 | 419 | {IWL_PCI_DEVICE(0x2526, 0x42A4, iwl9462_2ac_cfg_soc)}, | 419 | {IWL_PCI_DEVICE(0x2526, 0x42A4, iwl9462_2ac_cfg_soc)}, |
2935 | 420 | {IWL_PCI_DEVICE(0x2526, 0x6014, iwl9260_2ac_160_cfg)}, | ||
2936 | 420 | {IWL_PCI_DEVICE(0x2526, 0x8014, iwl9260_2ac_160_cfg)}, | 421 | {IWL_PCI_DEVICE(0x2526, 0x8014, iwl9260_2ac_160_cfg)}, |
2937 | 421 | {IWL_PCI_DEVICE(0x2526, 0x8010, iwl9260_2ac_160_cfg)}, | 422 | {IWL_PCI_DEVICE(0x2526, 0x8010, iwl9260_2ac_160_cfg)}, |
2938 | 422 | {IWL_PCI_DEVICE(0x2526, 0xA014, iwl9260_2ac_160_cfg)}, | 423 | {IWL_PCI_DEVICE(0x2526, 0xA014, iwl9260_2ac_160_cfg)}, |
2939 | @@ -789,6 +790,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = { | |||
2940 | 789 | {IWL_PCI_DEVICE(0x7A70, 0x0310, iwlax211_2ax_cfg_so_gf_a0)}, | 790 | {IWL_PCI_DEVICE(0x7A70, 0x0310, iwlax211_2ax_cfg_so_gf_a0)}, |
2941 | 790 | {IWL_PCI_DEVICE(0x7A70, 0x0510, iwlax211_2ax_cfg_so_gf_a0)}, | 791 | {IWL_PCI_DEVICE(0x7A70, 0x0510, iwlax211_2ax_cfg_so_gf_a0)}, |
2942 | 791 | {IWL_PCI_DEVICE(0x7A70, 0x0A10, iwlax211_2ax_cfg_so_gf_a0)}, | 792 | {IWL_PCI_DEVICE(0x7A70, 0x0A10, iwlax211_2ax_cfg_so_gf_a0)}, |
2943 | 793 | {IWL_PCI_DEVICE(0x7AF0, 0x0090, iwlax211_2ax_cfg_so_gf_a0)}, | ||
2944 | 792 | {IWL_PCI_DEVICE(0x7AF0, 0x0310, iwlax211_2ax_cfg_so_gf_a0)}, | 794 | {IWL_PCI_DEVICE(0x7AF0, 0x0310, iwlax211_2ax_cfg_so_gf_a0)}, |
2945 | 793 | {IWL_PCI_DEVICE(0x7AF0, 0x0510, iwlax211_2ax_cfg_so_gf_a0)}, | 795 | {IWL_PCI_DEVICE(0x7AF0, 0x0510, iwlax211_2ax_cfg_so_gf_a0)}, |
2946 | 794 | {IWL_PCI_DEVICE(0x7AF0, 0x0A10, iwlax211_2ax_cfg_so_gf_a0)}, | 796 | {IWL_PCI_DEVICE(0x7AF0, 0x0A10, iwlax211_2ax_cfg_so_gf_a0)}, |
2947 | @@ -861,6 +863,27 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2948 | 861 | } | 863 | } |
2949 | 862 | iwl_trans->cfg = cfg; | 864 | iwl_trans->cfg = cfg; |
2950 | 863 | } | 865 | } |
2951 | 866 | |||
2952 | 867 | /* | ||
2953 | 868 | * This is a hack to switch from Qu B0 to Qu C0. We need to | ||
2954 | 869 | * do this for all cfgs that use Qu B0. All this code is in | ||
2955 | 870 | * urgent need for a refactor, but for now this is the easiest | ||
2956 | 871 | * thing to do to support Qu C-step. | ||
2957 | 872 | */ | ||
2958 | 873 | if (iwl_trans->hw_rev == CSR_HW_REV_TYPE_QU_C0) { | ||
2959 | 874 | if (iwl_trans->cfg == &iwl_ax101_cfg_qu_hr) | ||
2960 | 875 | iwl_trans->cfg = &iwl_ax101_cfg_qu_c0_hr_b0; | ||
2961 | 876 | else if (iwl_trans->cfg == &iwl_ax201_cfg_qu_hr) | ||
2962 | 877 | iwl_trans->cfg = &iwl_ax201_cfg_qu_c0_hr_b0; | ||
2963 | 878 | else if (iwl_trans->cfg == &iwl9461_2ac_cfg_qu_b0_jf_b0) | ||
2964 | 879 | iwl_trans->cfg = &iwl9461_2ac_cfg_qu_c0_jf_b0; | ||
2965 | 880 | else if (iwl_trans->cfg == &iwl9462_2ac_cfg_qu_b0_jf_b0) | ||
2966 | 881 | iwl_trans->cfg = &iwl9462_2ac_cfg_qu_c0_jf_b0; | ||
2967 | 882 | else if (iwl_trans->cfg == &iwl9560_2ac_cfg_qu_b0_jf_b0) | ||
2968 | 883 | iwl_trans->cfg = &iwl9560_2ac_cfg_qu_c0_jf_b0; | ||
2969 | 884 | else if (iwl_trans->cfg == &iwl9560_2ac_160_cfg_qu_b0_jf_b0) | ||
2970 | 885 | iwl_trans->cfg = &iwl9560_2ac_160_cfg_qu_c0_jf_b0; | ||
2971 | 886 | } | ||
2972 | 864 | #endif | 887 | #endif |
2973 | 865 | 888 | ||
2974 | 866 | pci_set_drvdata(pdev, iwl_trans); | 889 | pci_set_drvdata(pdev, iwl_trans); |
2975 | diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c | |||
2976 | index 1e63a59..519a421 100644 | |||
2977 | --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c | |||
2978 | +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c | |||
2979 | @@ -218,8 +218,7 @@ static void iwl_pcie_alloc_fw_monitor_block(struct iwl_trans *trans, | |||
2980 | 218 | for (power = max_power; power >= min_power; power--) { | 218 | for (power = max_power; power >= min_power; power--) { |
2981 | 219 | size = BIT(power); | 219 | size = BIT(power); |
2982 | 220 | cpu_addr = dma_alloc_coherent(trans->dev, size, &phys, | 220 | cpu_addr = dma_alloc_coherent(trans->dev, size, &phys, |
2985 | 221 | GFP_KERNEL | __GFP_NOWARN | | 221 | GFP_KERNEL | __GFP_NOWARN); |
2984 | 222 | __GFP_ZERO | __GFP_COMP); | ||
2986 | 223 | if (!cpu_addr) | 222 | if (!cpu_addr) |
2987 | 224 | continue; | 223 | continue; |
2988 | 225 | 224 | ||
2989 | @@ -2140,7 +2139,6 @@ static void iwl_trans_pcie_release_nic_access(struct iwl_trans *trans, | |||
2990 | 2140 | * MAC_ACCESS_REQ bit to be performed before any other writes | 2139 | * MAC_ACCESS_REQ bit to be performed before any other writes |
2991 | 2141 | * scheduled on different CPUs (after we drop reg_lock). | 2140 | * scheduled on different CPUs (after we drop reg_lock). |
2992 | 2142 | */ | 2141 | */ |
2993 | 2143 | mmiowb(); | ||
2994 | 2144 | out: | 2142 | out: |
2995 | 2145 | spin_unlock_irqrestore(&trans_pcie->reg_lock, *flags); | 2143 | spin_unlock_irqrestore(&trans_pcie->reg_lock, *flags); |
2996 | 2146 | } | 2144 | } |
2997 | @@ -3615,8 +3613,9 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, | |||
2998 | 3615 | } else if (CSR_HW_RF_ID_TYPE_CHIP_ID(trans->hw_rf_id) == | 3613 | } else if (CSR_HW_RF_ID_TYPE_CHIP_ID(trans->hw_rf_id) == |
2999 | 3616 | CSR_HW_RF_ID_TYPE_CHIP_ID(CSR_HW_RF_ID_TYPE_HR) && | 3614 | CSR_HW_RF_ID_TYPE_CHIP_ID(CSR_HW_RF_ID_TYPE_HR) && |
3000 | 3617 | ((trans->cfg != &iwl_ax200_cfg_cc && | 3615 | ((trans->cfg != &iwl_ax200_cfg_cc && |
3003 | 3618 | trans->cfg != &killer1650x_2ax_cfg && | 3616 | trans->cfg != &killer1650x_2ax_cfg && |
3004 | 3619 | trans->cfg != &killer1650w_2ax_cfg) || | 3617 | trans->cfg != &killer1650w_2ax_cfg && |
3005 | 3618 | trans->cfg != &iwl_ax201_cfg_quz_hr) || | ||
3006 | 3620 | trans->hw_rev == CSR_HW_REV_TYPE_QNJ_B0)) { | 3619 | trans->hw_rev == CSR_HW_REV_TYPE_QNJ_B0)) { |
3007 | 3621 | u32 hw_status; | 3620 | u32 hw_status; |
3008 | 3622 | 3621 | ||
3009 | diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c | |||
3010 | index 26e4405..880445d 100644 | |||
3011 | --- a/drivers/net/wireless/mac80211_hwsim.c | |||
3012 | +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
3013 | @@ -3654,35 +3654,53 @@ done: | |||
3014 | 3654 | static __genl_const struct genl_ops hwsim_ops[] = { | 3654 | static __genl_const struct genl_ops hwsim_ops[] = { |
3015 | 3655 | { | 3655 | { |
3016 | 3656 | .cmd = HWSIM_CMD_REGISTER, | 3656 | .cmd = HWSIM_CMD_REGISTER, |
3018 | 3657 | .policy = hwsim_genl_policy, | 3657 | #if LINUX_VERSION_IS_GEQ(5,2,0) |
3019 | 3658 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3020 | 3659 | #endif | ||
3021 | 3660 | |||
3022 | 3658 | .doit = hwsim_register_received_nl, | 3661 | .doit = hwsim_register_received_nl, |
3023 | 3659 | .flags = GENL_UNS_ADMIN_PERM, | 3662 | .flags = GENL_UNS_ADMIN_PERM, |
3024 | 3660 | }, | 3663 | }, |
3025 | 3661 | { | 3664 | { |
3026 | 3662 | .cmd = HWSIM_CMD_FRAME, | 3665 | .cmd = HWSIM_CMD_FRAME, |
3028 | 3663 | .policy = hwsim_genl_policy, | 3666 | #if LINUX_VERSION_IS_GEQ(5,2,0) |
3029 | 3667 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3030 | 3668 | #endif | ||
3031 | 3669 | |||
3032 | 3664 | .doit = hwsim_cloned_frame_received_nl, | 3670 | .doit = hwsim_cloned_frame_received_nl, |
3033 | 3665 | }, | 3671 | }, |
3034 | 3666 | { | 3672 | { |
3035 | 3667 | .cmd = HWSIM_CMD_TX_INFO_FRAME, | 3673 | .cmd = HWSIM_CMD_TX_INFO_FRAME, |
3037 | 3668 | .policy = hwsim_genl_policy, | 3674 | #if LINUX_VERSION_IS_GEQ(5,2,0) |
3038 | 3675 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3039 | 3676 | #endif | ||
3040 | 3677 | |||
3041 | 3669 | .doit = hwsim_tx_info_frame_received_nl, | 3678 | .doit = hwsim_tx_info_frame_received_nl, |
3042 | 3670 | }, | 3679 | }, |
3043 | 3671 | { | 3680 | { |
3044 | 3672 | .cmd = HWSIM_CMD_NEW_RADIO, | 3681 | .cmd = HWSIM_CMD_NEW_RADIO, |
3046 | 3673 | .policy = hwsim_genl_policy, | 3682 | #if LINUX_VERSION_IS_GEQ(5,2,0) |
3047 | 3683 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3048 | 3684 | #endif | ||
3049 | 3685 | |||
3050 | 3674 | .doit = hwsim_new_radio_nl, | 3686 | .doit = hwsim_new_radio_nl, |
3051 | 3675 | .flags = GENL_UNS_ADMIN_PERM, | 3687 | .flags = GENL_UNS_ADMIN_PERM, |
3052 | 3676 | }, | 3688 | }, |
3053 | 3677 | { | 3689 | { |
3054 | 3678 | .cmd = HWSIM_CMD_DEL_RADIO, | 3690 | .cmd = HWSIM_CMD_DEL_RADIO, |
3056 | 3679 | .policy = hwsim_genl_policy, | 3691 | #if LINUX_VERSION_IS_GEQ(5,2,0) |
3057 | 3692 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3058 | 3693 | #endif | ||
3059 | 3694 | |||
3060 | 3680 | .doit = hwsim_del_radio_nl, | 3695 | .doit = hwsim_del_radio_nl, |
3061 | 3681 | .flags = GENL_UNS_ADMIN_PERM, | 3696 | .flags = GENL_UNS_ADMIN_PERM, |
3062 | 3682 | }, | 3697 | }, |
3063 | 3683 | { | 3698 | { |
3064 | 3684 | .cmd = HWSIM_CMD_GET_RADIO, | 3699 | .cmd = HWSIM_CMD_GET_RADIO, |
3066 | 3685 | .policy = hwsim_genl_policy, | 3700 | #if LINUX_VERSION_IS_GEQ(5,2,0) |
3067 | 3701 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3068 | 3702 | #endif | ||
3069 | 3703 | |||
3070 | 3686 | .doit = hwsim_get_radio_nl, | 3704 | .doit = hwsim_get_radio_nl, |
3071 | 3687 | .dumpit = hwsim_dump_radio_nl, | 3705 | .dumpit = hwsim_dump_radio_nl, |
3072 | 3688 | }, | 3706 | }, |
3073 | @@ -3692,6 +3710,7 @@ static struct genl_family hwsim_genl_family __genl_ro_after_init = { | |||
3074 | 3692 | .name = "MAC80211_HWSIM", | 3710 | .name = "MAC80211_HWSIM", |
3075 | 3693 | .version = 1, | 3711 | .version = 1, |
3076 | 3694 | .maxattr = HWSIM_ATTR_MAX, | 3712 | .maxattr = HWSIM_ATTR_MAX, |
3077 | 3713 | .policy = hwsim_genl_policy, | ||
3078 | 3695 | .netnsok = true, | 3714 | .netnsok = true, |
3079 | 3696 | .module = THIS_MODULE, | 3715 | .module = THIS_MODULE, |
3080 | 3697 | .ops = hwsim_ops, | 3716 | .ops = hwsim_ops, |
3081 | diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c | |||
3082 | index fc29f99..ba2d64a 100644 | |||
3083 | --- a/net/mac80211/ibss.c | |||
3084 | +++ b/net/mac80211/ibss.c | |||
3085 | @@ -1193,6 +1193,7 @@ void ieee80211_ibss_rx_no_sta(struct ieee80211_sub_if_data *sdata, | |||
3086 | 1193 | { | 1193 | { |
3087 | 1194 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; | 1194 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; |
3088 | 1195 | struct ieee80211_chanctx_conf *chanctx_conf; | 1195 | struct ieee80211_chanctx_conf *chanctx_conf; |
3089 | 1196 | struct sk_buff *skb; | ||
3090 | 1196 | 1197 | ||
3091 | 1197 | if (ifibss->state == IEEE80211_IBSS_MLME_SEARCH) | 1198 | if (ifibss->state == IEEE80211_IBSS_MLME_SEARCH) |
3092 | 1198 | return; | 1199 | return; |
3093 | @@ -1207,9 +1208,12 @@ void ieee80211_ibss_rx_no_sta(struct ieee80211_sub_if_data *sdata, | |||
3094 | 1207 | return; | 1208 | return; |
3095 | 1208 | } | 1209 | } |
3096 | 1209 | 1210 | ||
3100 | 1210 | ieee80211_mlme_send_probe_req(sdata, sdata->vif.addr, addr, | 1211 | skb = ieee80211_build_probe_req(sdata, sdata->vif.addr, addr, bssid, |
3101 | 1211 | sdata->u.ibss.ssid, sdata->u.ibss.ssid_len, | 1212 | (u32)-1, chanctx_conf->def.chan, |
3102 | 1212 | chanctx_conf->def.chan); | 1213 | ifibss->ssid, ifibss->ssid_len, NULL, 0, |
3103 | 1214 | IEEE80211_PROBE_FLAG_DIRECTED); | ||
3104 | 1215 | if (skb) | ||
3105 | 1216 | ieee80211_tx_skb(sdata, skb); | ||
3106 | 1213 | rcu_read_unlock(); | 1217 | rcu_read_unlock(); |
3107 | 1214 | } | 1218 | } |
3108 | 1215 | 1219 | ||
3109 | diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h | |||
3110 | index fca3b96..1c659c7 100644 | |||
3111 | --- a/net/mac80211/ieee80211_i.h | |||
3112 | +++ b/net/mac80211/ieee80211_i.h | |||
3113 | @@ -2212,7 +2212,7 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, | |||
3114 | 2212 | u32 flags); | 2212 | u32 flags); |
3115 | 2213 | struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, | 2213 | struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, |
3116 | 2214 | const u8 *src, const u8 *dst, | 2214 | const u8 *src, const u8 *dst, |
3118 | 2215 | u32 ratemask, | 2215 | const u8 *bssid, u32 ratemask, |
3119 | 2216 | struct ieee80211_channel *chan, | 2216 | struct ieee80211_channel *chan, |
3120 | 2217 | const u8 *ssid, size_t ssid_len, | 2217 | const u8 *ssid, size_t ssid_len, |
3121 | 2218 | const u8 *ie, size_t ie_len, | 2218 | const u8 *ie, size_t ie_len, |
3122 | diff --git a/net/mac80211/main.c b/net/mac80211/main.c | |||
3123 | index e470b33..e6f291e 100644 | |||
3124 | --- a/net/mac80211/main.c | |||
3125 | +++ b/net/mac80211/main.c | |||
3126 | @@ -422,7 +422,20 @@ ieee80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = { | |||
3127 | 422 | }, | 422 | }, |
3128 | 423 | [NL80211_IFTYPE_STATION] = { | 423 | [NL80211_IFTYPE_STATION] = { |
3129 | 424 | .tx = 0xffff, | 424 | .tx = 0xffff, |
3130 | 425 | /* | ||
3131 | 426 | * To support Pre Association Security Negotiation (PASN) while | ||
3132 | 427 | * already associated to one AP, allow user space to register to | ||
3133 | 428 | * Rx authentication frames, so that the user space logic would | ||
3134 | 429 | * be able to receive/handle authentication frames from a | ||
3135 | 430 | * different AP as part of PASN. | ||
3136 | 431 | * It is expected that user space would intelligently register | ||
3137 | 432 | * for Rx authentication frames, i.e., only when PASN is used | ||
3138 | 433 | * and configure a match filter only for PASN authentication | ||
3139 | 434 | * algorithm, as otherwise the MLME functionality of mac80211 | ||
3140 | 435 | * would be broken. | ||
3141 | 436 | */ | ||
3142 | 425 | .rx = BIT(IEEE80211_STYPE_ACTION >> 4) | | 437 | .rx = BIT(IEEE80211_STYPE_ACTION >> 4) | |
3143 | 438 | BIT(IEEE80211_STYPE_AUTH >> 4) | | ||
3144 | 426 | BIT(IEEE80211_STYPE_PROBE_REQ >> 4), | 439 | BIT(IEEE80211_STYPE_PROBE_REQ >> 4), |
3145 | 427 | }, | 440 | }, |
3146 | 428 | [NL80211_IFTYPE_AP] = { | 441 | [NL80211_IFTYPE_AP] = { |
3147 | diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c | |||
3148 | index 7791e4d..b929cb4 100644 | |||
3149 | --- a/net/mac80211/mlme.c | |||
3150 | +++ b/net/mac80211/mlme.c | |||
3151 | @@ -2480,8 +2480,8 @@ void ieee80211_mlme_send_probe_req(struct ieee80211_sub_if_data *sdata, | |||
3152 | 2480 | { | 2480 | { |
3153 | 2481 | struct sk_buff *skb; | 2481 | struct sk_buff *skb; |
3154 | 2482 | 2482 | ||
3157 | 2483 | skb = ieee80211_build_probe_req(sdata, src, dst, (u32)-1, channel, | 2483 | skb = ieee80211_build_probe_req(sdata, src, dst, dst, (u32)-1, |
3158 | 2484 | ssid, ssid_len, NULL, 0, | 2484 | channel, ssid, ssid_len, NULL, 0, |
3159 | 2485 | IEEE80211_PROBE_FLAG_DIRECTED); | 2485 | IEEE80211_PROBE_FLAG_DIRECTED); |
3160 | 2486 | if (skb) | 2486 | if (skb) |
3161 | 2487 | ieee80211_tx_skb(sdata, skb); | 2487 | ieee80211_tx_skb(sdata, skb); |
3162 | @@ -2635,7 +2635,7 @@ struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw, | |||
3163 | 2635 | ssid_len = ssid[1]; | 2635 | ssid_len = ssid[1]; |
3164 | 2636 | 2636 | ||
3165 | 2637 | skb = ieee80211_build_probe_req(sdata, sdata->vif.addr, cbss->bssid, | 2637 | skb = ieee80211_build_probe_req(sdata, sdata->vif.addr, cbss->bssid, |
3167 | 2638 | (u32) -1, cbss->channel, | 2638 | cbss->bssid, (u32)-1, cbss->channel, |
3168 | 2639 | ssid + 2, ssid_len, | 2639 | ssid + 2, ssid_len, |
3169 | 2640 | NULL, 0, IEEE80211_PROBE_FLAG_DIRECTED); | 2640 | NULL, 0, IEEE80211_PROBE_FLAG_DIRECTED); |
3170 | 2641 | rcu_read_unlock(); | 2641 | rcu_read_unlock(); |
3171 | @@ -5308,7 +5308,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
3172 | 5308 | ifmgd->flags |= IEEE80211_STA_DISABLE_VHT; | 5308 | ifmgd->flags |= IEEE80211_STA_DISABLE_VHT; |
3173 | 5309 | ifmgd->flags |= IEEE80211_STA_DISABLE_HE; | 5309 | ifmgd->flags |= IEEE80211_STA_DISABLE_HE; |
3174 | 5310 | netdev_info(sdata->dev, | 5310 | netdev_info(sdata->dev, |
3176 | 5311 | "disabling HE/HT/VHT due to WEP/TKIP use\n"); | 5311 | "disabling HT/VHT/HE due to WEP/TKIP use\n"); |
3177 | 5312 | } | 5312 | } |
3178 | 5313 | } | 5313 | } |
3179 | 5314 | 5314 | ||
3180 | diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c | |||
3181 | index 565bc1e..57ba759 100644 | |||
3182 | --- a/net/mac80211/scan.c | |||
3183 | +++ b/net/mac80211/scan.c | |||
3184 | @@ -565,9 +565,8 @@ static void ieee80211_send_scan_probe_req(struct ieee80211_sub_if_data *sdata, | |||
3185 | 565 | struct sk_buff *skb; | 565 | struct sk_buff *skb; |
3186 | 566 | u32 txdata_flags = 0; | 566 | u32 txdata_flags = 0; |
3187 | 567 | 567 | ||
3191 | 568 | skb = ieee80211_build_probe_req(sdata, src, dst, ratemask, channel, | 568 | skb = ieee80211_build_probe_req(sdata, src, dst, dst, ratemask, channel, |
3192 | 569 | ssid, ssid_len, | 569 | ssid, ssid_len, ie, ie_len, flags); |
3190 | 570 | ie, ie_len, flags); | ||
3193 | 571 | 570 | ||
3194 | 572 | if (skb) { | 571 | if (skb) { |
3195 | 573 | if (flags & IEEE80211_PROBE_FLAG_RANDOM_SN) { | 572 | if (flags & IEEE80211_PROBE_FLAG_RANDOM_SN) { |
3196 | diff --git a/net/mac80211/util.c b/net/mac80211/util.c | |||
3197 | index c8f6405..2a4515c 100644 | |||
3198 | --- a/net/mac80211/util.c | |||
3199 | +++ b/net/mac80211/util.c | |||
3200 | @@ -1857,7 +1857,7 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, | |||
3201 | 1857 | 1857 | ||
3202 | 1858 | struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, | 1858 | struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, |
3203 | 1859 | const u8 *src, const u8 *dst, | 1859 | const u8 *src, const u8 *dst, |
3205 | 1860 | u32 ratemask, | 1860 | const u8 *bssid, u32 ratemask, |
3206 | 1861 | struct ieee80211_channel *chan, | 1861 | struct ieee80211_channel *chan, |
3207 | 1862 | const u8 *ssid, size_t ssid_len, | 1862 | const u8 *ssid, size_t ssid_len, |
3208 | 1863 | const u8 *ie, size_t ie_len, | 1863 | const u8 *ie, size_t ie_len, |
3209 | @@ -1894,11 +1894,12 @@ struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, | |||
3210 | 1894 | rate_masks, &chandef, flags); | 1894 | rate_masks, &chandef, flags); |
3211 | 1895 | skb_put(skb, ies_len); | 1895 | skb_put(skb, ies_len); |
3212 | 1896 | 1896 | ||
3215 | 1897 | if (dst) { | 1897 | mgmt = (void *)skb->data; |
3216 | 1898 | mgmt = (struct ieee80211_mgmt *) skb->data; | 1898 | if (dst) |
3217 | 1899 | memcpy(mgmt->da, dst, ETH_ALEN); | 1899 | memcpy(mgmt->da, dst, ETH_ALEN); |
3220 | 1900 | memcpy(mgmt->bssid, dst, ETH_ALEN); | 1900 | |
3221 | 1901 | } | 1901 | if (bssid) |
3222 | 1902 | memcpy(mgmt->bssid, bssid, ETH_ALEN); | ||
3223 | 1902 | 1903 | ||
3224 | 1903 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; | 1904 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; |
3225 | 1904 | 1905 | ||
3226 | diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c | |||
3227 | index a3547aa..98b8f96 100644 | |||
3228 | --- a/net/wireless/nl80211.c | |||
3229 | +++ b/net/wireless/nl80211.c | |||
3230 | @@ -248,15 +248,13 @@ nl80211_pmsr_ftm_req_attr_policy[NL80211_PMSR_FTM_REQ_ATTR_MAX + 1] = { | |||
3231 | 248 | static const struct nla_policy | 248 | static const struct nla_policy |
3232 | 249 | nl80211_pmsr_req_data_policy[NL80211_PMSR_TYPE_MAX + 1] = { | 249 | nl80211_pmsr_req_data_policy[NL80211_PMSR_TYPE_MAX + 1] = { |
3233 | 250 | [NL80211_PMSR_TYPE_FTM] = | 250 | [NL80211_PMSR_TYPE_FTM] = |
3236 | 251 | NLA_POLICY_NESTED(NL80211_PMSR_FTM_REQ_ATTR_MAX, | 251 | NLA_POLICY_NESTED(nl80211_pmsr_ftm_req_attr_policy), |
3235 | 252 | nl80211_pmsr_ftm_req_attr_policy), | ||
3237 | 253 | }; | 252 | }; |
3238 | 254 | 253 | ||
3239 | 255 | static const struct nla_policy | 254 | static const struct nla_policy |
3240 | 256 | nl80211_pmsr_req_attr_policy[NL80211_PMSR_REQ_ATTR_MAX + 1] = { | 255 | nl80211_pmsr_req_attr_policy[NL80211_PMSR_REQ_ATTR_MAX + 1] = { |
3241 | 257 | [NL80211_PMSR_REQ_ATTR_DATA] = | 256 | [NL80211_PMSR_REQ_ATTR_DATA] = |
3244 | 258 | NLA_POLICY_NESTED(NL80211_PMSR_TYPE_MAX, | 257 | NLA_POLICY_NESTED(nl80211_pmsr_req_data_policy), |
3243 | 259 | nl80211_pmsr_req_data_policy), | ||
3245 | 260 | [NL80211_PMSR_REQ_ATTR_GET_AP_TSF] = { .type = NLA_FLAG }, | 258 | [NL80211_PMSR_REQ_ATTR_GET_AP_TSF] = { .type = NLA_FLAG }, |
3246 | 261 | }; | 259 | }; |
3247 | 262 | 260 | ||
3248 | @@ -269,8 +267,7 @@ nl80211_psmr_peer_attr_policy[NL80211_PMSR_PEER_ATTR_MAX + 1] = { | |||
3249 | 269 | */ | 267 | */ |
3250 | 270 | [NL80211_PMSR_PEER_ATTR_CHAN] = { .type = NLA_NESTED }, | 268 | [NL80211_PMSR_PEER_ATTR_CHAN] = { .type = NLA_NESTED }, |
3251 | 271 | [NL80211_PMSR_PEER_ATTR_REQ] = | 269 | [NL80211_PMSR_PEER_ATTR_REQ] = |
3254 | 272 | NLA_POLICY_NESTED(NL80211_PMSR_REQ_ATTR_MAX, | 270 | NLA_POLICY_NESTED(nl80211_pmsr_req_attr_policy), |
3253 | 273 | nl80211_pmsr_req_attr_policy), | ||
3255 | 274 | [NL80211_PMSR_PEER_ATTR_RESP] = { .type = NLA_REJECT }, | 271 | [NL80211_PMSR_PEER_ATTR_RESP] = { .type = NLA_REJECT }, |
3256 | 275 | }; | 272 | }; |
3257 | 276 | 273 | ||
3258 | @@ -281,8 +278,7 @@ nl80211_pmsr_attr_policy[NL80211_PMSR_ATTR_MAX + 1] = { | |||
3259 | 281 | [NL80211_PMSR_ATTR_RANDOMIZE_MAC_ADDR] = { .type = NLA_REJECT }, | 278 | [NL80211_PMSR_ATTR_RANDOMIZE_MAC_ADDR] = { .type = NLA_REJECT }, |
3260 | 282 | [NL80211_PMSR_ATTR_TYPE_CAPA] = { .type = NLA_REJECT }, | 279 | [NL80211_PMSR_ATTR_TYPE_CAPA] = { .type = NLA_REJECT }, |
3261 | 283 | [NL80211_PMSR_ATTR_PEERS] = | 280 | [NL80211_PMSR_ATTR_PEERS] = |
3264 | 284 | NLA_POLICY_NESTED_ARRAY(NL80211_PMSR_PEER_ATTR_MAX, | 281 | NLA_POLICY_NESTED_ARRAY(nl80211_psmr_peer_attr_policy), |
3263 | 285 | nl80211_psmr_peer_attr_policy), | ||
3265 | 286 | }; | 282 | }; |
3266 | 287 | 283 | ||
3267 | 288 | const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { | 284 | const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { |
3268 | @@ -543,8 +539,7 @@ const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { | |||
3269 | 543 | }, | 539 | }, |
3270 | 544 | [NL80211_ATTR_TIMEOUT] = NLA_POLICY_MIN(NLA_U32, 1), | 540 | [NL80211_ATTR_TIMEOUT] = NLA_POLICY_MIN(NLA_U32, 1), |
3271 | 545 | [NL80211_ATTR_PEER_MEASUREMENTS] = | 541 | [NL80211_ATTR_PEER_MEASUREMENTS] = |
3274 | 546 | NLA_POLICY_NESTED(NL80211_PMSR_FTM_REQ_ATTR_MAX, | 542 | NLA_POLICY_NESTED(nl80211_pmsr_attr_policy), |
3273 | 547 | nl80211_pmsr_attr_policy), | ||
3275 | 548 | 543 | ||
3276 | 549 | [NL80211_ATTR_NAN_CDW_2G] = { .type = NLA_U8 }, | 544 | [NL80211_ATTR_NAN_CDW_2G] = { .type = NLA_U8 }, |
3277 | 550 | [NL80211_ATTR_NAN_CDW_5G] = { .type = NLA_U8 }, | 545 | [NL80211_ATTR_NAN_CDW_5G] = { .type = NLA_U8 }, |
3278 | @@ -13645,66 +13640,90 @@ static void nl80211_post_doit(__genl_const struct genl_ops *ops, | |||
3279 | 13645 | static __genl_const struct genl_ops nl80211_ops[] = { | 13640 | static __genl_const struct genl_ops nl80211_ops[] = { |
3280 | 13646 | { | 13641 | { |
3281 | 13647 | .cmd = NL80211_CMD_GET_WIPHY, | 13642 | .cmd = NL80211_CMD_GET_WIPHY, |
3282 | 13643 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3283 | 13644 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3284 | 13645 | #endif | ||
3285 | 13646 | |||
3286 | 13648 | .doit = nl80211_get_wiphy, | 13647 | .doit = nl80211_get_wiphy, |
3287 | 13649 | .dumpit = nl80211_dump_wiphy, | 13648 | .dumpit = nl80211_dump_wiphy, |
3288 | 13650 | .done = nl80211_dump_wiphy_done, | 13649 | .done = nl80211_dump_wiphy_done, |
3289 | 13651 | .policy = nl80211_policy, | ||
3290 | 13652 | /* can be retrieved by unprivileged users */ | 13650 | /* can be retrieved by unprivileged users */ |
3291 | 13653 | .internal_flags = NL80211_FLAG_NEED_WIPHY | | 13651 | .internal_flags = NL80211_FLAG_NEED_WIPHY | |
3292 | 13654 | NL80211_FLAG_NEED_RTNL, | 13652 | NL80211_FLAG_NEED_RTNL, |
3293 | 13655 | }, | 13653 | }, |
3294 | 13656 | { | 13654 | { |
3295 | 13657 | .cmd = NL80211_CMD_SET_WIPHY, | 13655 | .cmd = NL80211_CMD_SET_WIPHY, |
3296 | 13656 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3297 | 13657 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3298 | 13658 | #endif | ||
3299 | 13659 | |||
3300 | 13658 | .doit = nl80211_set_wiphy, | 13660 | .doit = nl80211_set_wiphy, |
3301 | 13659 | .policy = nl80211_policy, | ||
3302 | 13660 | .flags = GENL_UNS_ADMIN_PERM, | 13661 | .flags = GENL_UNS_ADMIN_PERM, |
3303 | 13661 | .internal_flags = NL80211_FLAG_NEED_RTNL, | 13662 | .internal_flags = NL80211_FLAG_NEED_RTNL, |
3304 | 13662 | }, | 13663 | }, |
3305 | 13663 | { | 13664 | { |
3306 | 13664 | .cmd = NL80211_CMD_GET_INTERFACE, | 13665 | .cmd = NL80211_CMD_GET_INTERFACE, |
3307 | 13666 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3308 | 13667 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3309 | 13668 | #endif | ||
3310 | 13669 | |||
3311 | 13665 | .doit = nl80211_get_interface, | 13670 | .doit = nl80211_get_interface, |
3312 | 13666 | .dumpit = nl80211_dump_interface, | 13671 | .dumpit = nl80211_dump_interface, |
3313 | 13667 | .policy = nl80211_policy, | ||
3314 | 13668 | /* can be retrieved by unprivileged users */ | 13672 | /* can be retrieved by unprivileged users */ |
3315 | 13669 | .internal_flags = NL80211_FLAG_NEED_WDEV | | 13673 | .internal_flags = NL80211_FLAG_NEED_WDEV | |
3316 | 13670 | NL80211_FLAG_NEED_RTNL, | 13674 | NL80211_FLAG_NEED_RTNL, |
3317 | 13671 | }, | 13675 | }, |
3318 | 13672 | { | 13676 | { |
3319 | 13673 | .cmd = NL80211_CMD_SET_INTERFACE, | 13677 | .cmd = NL80211_CMD_SET_INTERFACE, |
3320 | 13678 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3321 | 13679 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3322 | 13680 | #endif | ||
3323 | 13681 | |||
3324 | 13674 | .doit = nl80211_set_interface, | 13682 | .doit = nl80211_set_interface, |
3325 | 13675 | .policy = nl80211_policy, | ||
3326 | 13676 | .flags = GENL_UNS_ADMIN_PERM, | 13683 | .flags = GENL_UNS_ADMIN_PERM, |
3327 | 13677 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 13684 | .internal_flags = NL80211_FLAG_NEED_NETDEV | |
3328 | 13678 | NL80211_FLAG_NEED_RTNL, | 13685 | NL80211_FLAG_NEED_RTNL, |
3329 | 13679 | }, | 13686 | }, |
3330 | 13680 | { | 13687 | { |
3331 | 13681 | .cmd = NL80211_CMD_NEW_INTERFACE, | 13688 | .cmd = NL80211_CMD_NEW_INTERFACE, |
3332 | 13689 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3333 | 13690 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3334 | 13691 | #endif | ||
3335 | 13692 | |||
3336 | 13682 | .doit = nl80211_new_interface, | 13693 | .doit = nl80211_new_interface, |
3337 | 13683 | .policy = nl80211_policy, | ||
3338 | 13684 | .flags = GENL_UNS_ADMIN_PERM, | 13694 | .flags = GENL_UNS_ADMIN_PERM, |
3339 | 13685 | .internal_flags = NL80211_FLAG_NEED_WIPHY | | 13695 | .internal_flags = NL80211_FLAG_NEED_WIPHY | |
3340 | 13686 | NL80211_FLAG_NEED_RTNL, | 13696 | NL80211_FLAG_NEED_RTNL, |
3341 | 13687 | }, | 13697 | }, |
3342 | 13688 | { | 13698 | { |
3343 | 13689 | .cmd = NL80211_CMD_DEL_INTERFACE, | 13699 | .cmd = NL80211_CMD_DEL_INTERFACE, |
3344 | 13700 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3345 | 13701 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3346 | 13702 | #endif | ||
3347 | 13703 | |||
3348 | 13690 | .doit = nl80211_del_interface, | 13704 | .doit = nl80211_del_interface, |
3349 | 13691 | .policy = nl80211_policy, | ||
3350 | 13692 | .flags = GENL_UNS_ADMIN_PERM, | 13705 | .flags = GENL_UNS_ADMIN_PERM, |
3351 | 13693 | .internal_flags = NL80211_FLAG_NEED_WDEV | | 13706 | .internal_flags = NL80211_FLAG_NEED_WDEV | |
3352 | 13694 | NL80211_FLAG_NEED_RTNL, | 13707 | NL80211_FLAG_NEED_RTNL, |
3353 | 13695 | }, | 13708 | }, |
3354 | 13696 | { | 13709 | { |
3355 | 13697 | .cmd = NL80211_CMD_GET_KEY, | 13710 | .cmd = NL80211_CMD_GET_KEY, |
3356 | 13711 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3357 | 13712 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3358 | 13713 | #endif | ||
3359 | 13714 | |||
3360 | 13698 | .doit = nl80211_get_key, | 13715 | .doit = nl80211_get_key, |
3361 | 13699 | .policy = nl80211_policy, | ||
3362 | 13700 | .flags = GENL_UNS_ADMIN_PERM, | 13716 | .flags = GENL_UNS_ADMIN_PERM, |
3363 | 13701 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13717 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3364 | 13702 | NL80211_FLAG_NEED_RTNL, | 13718 | NL80211_FLAG_NEED_RTNL, |
3365 | 13703 | }, | 13719 | }, |
3366 | 13704 | { | 13720 | { |
3367 | 13705 | .cmd = NL80211_CMD_SET_KEY, | 13721 | .cmd = NL80211_CMD_SET_KEY, |
3368 | 13722 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3369 | 13723 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3370 | 13724 | #endif | ||
3371 | 13725 | |||
3372 | 13706 | .doit = nl80211_set_key, | 13726 | .doit = nl80211_set_key, |
3373 | 13707 | .policy = nl80211_policy, | ||
3374 | 13708 | .flags = GENL_UNS_ADMIN_PERM, | 13727 | .flags = GENL_UNS_ADMIN_PERM, |
3375 | 13709 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13728 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3376 | 13710 | NL80211_FLAG_NEED_RTNL | | 13729 | NL80211_FLAG_NEED_RTNL | |
3377 | @@ -13712,8 +13731,11 @@ static __genl_const struct genl_ops nl80211_ops[] = { | |||
3378 | 13712 | }, | 13731 | }, |
3379 | 13713 | { | 13732 | { |
3380 | 13714 | .cmd = NL80211_CMD_NEW_KEY, | 13733 | .cmd = NL80211_CMD_NEW_KEY, |
3381 | 13734 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3382 | 13735 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3383 | 13736 | #endif | ||
3384 | 13737 | |||
3385 | 13715 | .doit = nl80211_new_key, | 13738 | .doit = nl80211_new_key, |
3386 | 13716 | .policy = nl80211_policy, | ||
3387 | 13717 | .flags = GENL_UNS_ADMIN_PERM, | 13739 | .flags = GENL_UNS_ADMIN_PERM, |
3388 | 13718 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13740 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3389 | 13719 | NL80211_FLAG_NEED_RTNL | | 13741 | NL80211_FLAG_NEED_RTNL | |
3390 | @@ -13721,15 +13743,21 @@ static __genl_const struct genl_ops nl80211_ops[] = { | |||
3391 | 13721 | }, | 13743 | }, |
3392 | 13722 | { | 13744 | { |
3393 | 13723 | .cmd = NL80211_CMD_DEL_KEY, | 13745 | .cmd = NL80211_CMD_DEL_KEY, |
3394 | 13746 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3395 | 13747 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3396 | 13748 | #endif | ||
3397 | 13749 | |||
3398 | 13724 | .doit = nl80211_del_key, | 13750 | .doit = nl80211_del_key, |
3399 | 13725 | .policy = nl80211_policy, | ||
3400 | 13726 | .flags = GENL_UNS_ADMIN_PERM, | 13751 | .flags = GENL_UNS_ADMIN_PERM, |
3401 | 13727 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13752 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3402 | 13728 | NL80211_FLAG_NEED_RTNL, | 13753 | NL80211_FLAG_NEED_RTNL, |
3403 | 13729 | }, | 13754 | }, |
3404 | 13730 | { | 13755 | { |
3405 | 13731 | .cmd = NL80211_CMD_SET_BEACON, | 13756 | .cmd = NL80211_CMD_SET_BEACON, |
3407 | 13732 | .policy = nl80211_policy, | 13757 | #if LINUX_VERSION_IS_GEQ(5,2,0) |
3408 | 13758 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3409 | 13759 | #endif | ||
3410 | 13760 | |||
3411 | 13733 | .flags = GENL_UNS_ADMIN_PERM, | 13761 | .flags = GENL_UNS_ADMIN_PERM, |
3412 | 13734 | .doit = nl80211_set_beacon, | 13762 | .doit = nl80211_set_beacon, |
3413 | 13735 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13763 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3414 | @@ -13737,7 +13765,10 @@ static __genl_const struct genl_ops nl80211_ops[] = { | |||
3415 | 13737 | }, | 13765 | }, |
3416 | 13738 | { | 13766 | { |
3417 | 13739 | .cmd = NL80211_CMD_START_AP, | 13767 | .cmd = NL80211_CMD_START_AP, |
3419 | 13740 | .policy = nl80211_policy, | 13768 | #if LINUX_VERSION_IS_GEQ(5,2,0) |
3420 | 13769 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3421 | 13770 | #endif | ||
3422 | 13771 | |||
3423 | 13741 | .flags = GENL_UNS_ADMIN_PERM, | 13772 | .flags = GENL_UNS_ADMIN_PERM, |
3424 | 13742 | .doit = nl80211_start_ap, | 13773 | .doit = nl80211_start_ap, |
3425 | 13743 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13774 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3426 | @@ -13745,7 +13776,10 @@ static __genl_const struct genl_ops nl80211_ops[] = { | |||
3427 | 13745 | }, | 13776 | }, |
3428 | 13746 | { | 13777 | { |
3429 | 13747 | .cmd = NL80211_CMD_STOP_AP, | 13778 | .cmd = NL80211_CMD_STOP_AP, |
3431 | 13748 | .policy = nl80211_policy, | 13779 | #if LINUX_VERSION_IS_GEQ(5,2,0) |
3432 | 13780 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3433 | 13781 | #endif | ||
3434 | 13782 | |||
3435 | 13749 | .flags = GENL_UNS_ADMIN_PERM, | 13783 | .flags = GENL_UNS_ADMIN_PERM, |
3436 | 13750 | .doit = nl80211_stop_ap, | 13784 | .doit = nl80211_stop_ap, |
3437 | 13751 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13785 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3438 | @@ -13753,172 +13787,238 @@ static __genl_const struct genl_ops nl80211_ops[] = { | |||
3439 | 13753 | }, | 13787 | }, |
3440 | 13754 | { | 13788 | { |
3441 | 13755 | .cmd = NL80211_CMD_GET_STATION, | 13789 | .cmd = NL80211_CMD_GET_STATION, |
3442 | 13790 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3443 | 13791 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3444 | 13792 | #endif | ||
3445 | 13793 | |||
3446 | 13756 | .doit = nl80211_get_station, | 13794 | .doit = nl80211_get_station, |
3447 | 13757 | .dumpit = nl80211_dump_station, | 13795 | .dumpit = nl80211_dump_station, |
3448 | 13758 | .policy = nl80211_policy, | ||
3449 | 13759 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 13796 | .internal_flags = NL80211_FLAG_NEED_NETDEV | |
3450 | 13760 | NL80211_FLAG_NEED_RTNL, | 13797 | NL80211_FLAG_NEED_RTNL, |
3451 | 13761 | }, | 13798 | }, |
3452 | 13762 | { | 13799 | { |
3453 | 13763 | .cmd = NL80211_CMD_SET_STATION, | 13800 | .cmd = NL80211_CMD_SET_STATION, |
3454 | 13801 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3455 | 13802 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3456 | 13803 | #endif | ||
3457 | 13804 | |||
3458 | 13764 | .doit = nl80211_set_station, | 13805 | .doit = nl80211_set_station, |
3459 | 13765 | .policy = nl80211_policy, | ||
3460 | 13766 | .flags = GENL_UNS_ADMIN_PERM, | 13806 | .flags = GENL_UNS_ADMIN_PERM, |
3461 | 13767 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13807 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3462 | 13768 | NL80211_FLAG_NEED_RTNL, | 13808 | NL80211_FLAG_NEED_RTNL, |
3463 | 13769 | }, | 13809 | }, |
3464 | 13770 | { | 13810 | { |
3465 | 13771 | .cmd = NL80211_CMD_NEW_STATION, | 13811 | .cmd = NL80211_CMD_NEW_STATION, |
3466 | 13812 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3467 | 13813 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3468 | 13814 | #endif | ||
3469 | 13815 | |||
3470 | 13772 | .doit = nl80211_new_station, | 13816 | .doit = nl80211_new_station, |
3471 | 13773 | .policy = nl80211_policy, | ||
3472 | 13774 | .flags = GENL_UNS_ADMIN_PERM, | 13817 | .flags = GENL_UNS_ADMIN_PERM, |
3473 | 13775 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13818 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3474 | 13776 | NL80211_FLAG_NEED_RTNL, | 13819 | NL80211_FLAG_NEED_RTNL, |
3475 | 13777 | }, | 13820 | }, |
3476 | 13778 | { | 13821 | { |
3477 | 13779 | .cmd = NL80211_CMD_DEL_STATION, | 13822 | .cmd = NL80211_CMD_DEL_STATION, |
3478 | 13823 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3479 | 13824 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3480 | 13825 | #endif | ||
3481 | 13826 | |||
3482 | 13780 | .doit = nl80211_del_station, | 13827 | .doit = nl80211_del_station, |
3483 | 13781 | .policy = nl80211_policy, | ||
3484 | 13782 | .flags = GENL_UNS_ADMIN_PERM, | 13828 | .flags = GENL_UNS_ADMIN_PERM, |
3485 | 13783 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13829 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3486 | 13784 | NL80211_FLAG_NEED_RTNL, | 13830 | NL80211_FLAG_NEED_RTNL, |
3487 | 13785 | }, | 13831 | }, |
3488 | 13786 | { | 13832 | { |
3489 | 13787 | .cmd = NL80211_CMD_GET_MPATH, | 13833 | .cmd = NL80211_CMD_GET_MPATH, |
3490 | 13834 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3491 | 13835 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3492 | 13836 | #endif | ||
3493 | 13837 | |||
3494 | 13788 | .doit = nl80211_get_mpath, | 13838 | .doit = nl80211_get_mpath, |
3495 | 13789 | .dumpit = nl80211_dump_mpath, | 13839 | .dumpit = nl80211_dump_mpath, |
3496 | 13790 | .policy = nl80211_policy, | ||
3497 | 13791 | .flags = GENL_UNS_ADMIN_PERM, | 13840 | .flags = GENL_UNS_ADMIN_PERM, |
3498 | 13792 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13841 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3499 | 13793 | NL80211_FLAG_NEED_RTNL, | 13842 | NL80211_FLAG_NEED_RTNL, |
3500 | 13794 | }, | 13843 | }, |
3501 | 13795 | { | 13844 | { |
3502 | 13796 | .cmd = NL80211_CMD_GET_MPP, | 13845 | .cmd = NL80211_CMD_GET_MPP, |
3503 | 13846 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3504 | 13847 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3505 | 13848 | #endif | ||
3506 | 13849 | |||
3507 | 13797 | .doit = nl80211_get_mpp, | 13850 | .doit = nl80211_get_mpp, |
3508 | 13798 | .dumpit = nl80211_dump_mpp, | 13851 | .dumpit = nl80211_dump_mpp, |
3509 | 13799 | .policy = nl80211_policy, | ||
3510 | 13800 | .flags = GENL_UNS_ADMIN_PERM, | 13852 | .flags = GENL_UNS_ADMIN_PERM, |
3511 | 13801 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13853 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3512 | 13802 | NL80211_FLAG_NEED_RTNL, | 13854 | NL80211_FLAG_NEED_RTNL, |
3513 | 13803 | }, | 13855 | }, |
3514 | 13804 | { | 13856 | { |
3515 | 13805 | .cmd = NL80211_CMD_SET_MPATH, | 13857 | .cmd = NL80211_CMD_SET_MPATH, |
3516 | 13858 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3517 | 13859 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3518 | 13860 | #endif | ||
3519 | 13861 | |||
3520 | 13806 | .doit = nl80211_set_mpath, | 13862 | .doit = nl80211_set_mpath, |
3521 | 13807 | .policy = nl80211_policy, | ||
3522 | 13808 | .flags = GENL_UNS_ADMIN_PERM, | 13863 | .flags = GENL_UNS_ADMIN_PERM, |
3523 | 13809 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13864 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3524 | 13810 | NL80211_FLAG_NEED_RTNL, | 13865 | NL80211_FLAG_NEED_RTNL, |
3525 | 13811 | }, | 13866 | }, |
3526 | 13812 | { | 13867 | { |
3527 | 13813 | .cmd = NL80211_CMD_NEW_MPATH, | 13868 | .cmd = NL80211_CMD_NEW_MPATH, |
3528 | 13869 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3529 | 13870 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3530 | 13871 | #endif | ||
3531 | 13872 | |||
3532 | 13814 | .doit = nl80211_new_mpath, | 13873 | .doit = nl80211_new_mpath, |
3533 | 13815 | .policy = nl80211_policy, | ||
3534 | 13816 | .flags = GENL_UNS_ADMIN_PERM, | 13874 | .flags = GENL_UNS_ADMIN_PERM, |
3535 | 13817 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13875 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3536 | 13818 | NL80211_FLAG_NEED_RTNL, | 13876 | NL80211_FLAG_NEED_RTNL, |
3537 | 13819 | }, | 13877 | }, |
3538 | 13820 | { | 13878 | { |
3539 | 13821 | .cmd = NL80211_CMD_DEL_MPATH, | 13879 | .cmd = NL80211_CMD_DEL_MPATH, |
3540 | 13880 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3541 | 13881 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3542 | 13882 | #endif | ||
3543 | 13883 | |||
3544 | 13822 | .doit = nl80211_del_mpath, | 13884 | .doit = nl80211_del_mpath, |
3545 | 13823 | .policy = nl80211_policy, | ||
3546 | 13824 | .flags = GENL_UNS_ADMIN_PERM, | 13885 | .flags = GENL_UNS_ADMIN_PERM, |
3547 | 13825 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13886 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3548 | 13826 | NL80211_FLAG_NEED_RTNL, | 13887 | NL80211_FLAG_NEED_RTNL, |
3549 | 13827 | }, | 13888 | }, |
3550 | 13828 | { | 13889 | { |
3551 | 13829 | .cmd = NL80211_CMD_SET_BSS, | 13890 | .cmd = NL80211_CMD_SET_BSS, |
3552 | 13891 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3553 | 13892 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3554 | 13893 | #endif | ||
3555 | 13894 | |||
3556 | 13830 | .doit = nl80211_set_bss, | 13895 | .doit = nl80211_set_bss, |
3557 | 13831 | .policy = nl80211_policy, | ||
3558 | 13832 | .flags = GENL_UNS_ADMIN_PERM, | 13896 | .flags = GENL_UNS_ADMIN_PERM, |
3559 | 13833 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13897 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3560 | 13834 | NL80211_FLAG_NEED_RTNL, | 13898 | NL80211_FLAG_NEED_RTNL, |
3561 | 13835 | }, | 13899 | }, |
3562 | 13836 | { | 13900 | { |
3563 | 13837 | .cmd = NL80211_CMD_GET_REG, | 13901 | .cmd = NL80211_CMD_GET_REG, |
3564 | 13902 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3565 | 13903 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3566 | 13904 | #endif | ||
3567 | 13905 | |||
3568 | 13838 | .doit = nl80211_get_reg_do, | 13906 | .doit = nl80211_get_reg_do, |
3569 | 13839 | .dumpit = nl80211_get_reg_dump, | 13907 | .dumpit = nl80211_get_reg_dump, |
3570 | 13840 | .policy = nl80211_policy, | ||
3571 | 13841 | .internal_flags = NL80211_FLAG_NEED_RTNL, | 13908 | .internal_flags = NL80211_FLAG_NEED_RTNL, |
3572 | 13842 | /* can be retrieved by unprivileged users */ | 13909 | /* can be retrieved by unprivileged users */ |
3573 | 13843 | }, | 13910 | }, |
3574 | 13844 | #ifdef CPTCFG_CFG80211_CRDA_SUPPORT | 13911 | #ifdef CPTCFG_CFG80211_CRDA_SUPPORT |
3575 | 13845 | { | 13912 | { |
3576 | 13846 | .cmd = NL80211_CMD_SET_REG, | 13913 | .cmd = NL80211_CMD_SET_REG, |
3577 | 13914 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3578 | 13915 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3579 | 13916 | #endif | ||
3580 | 13917 | |||
3581 | 13847 | .doit = nl80211_set_reg, | 13918 | .doit = nl80211_set_reg, |
3582 | 13848 | .policy = nl80211_policy, | ||
3583 | 13849 | .flags = GENL_ADMIN_PERM, | 13919 | .flags = GENL_ADMIN_PERM, |
3584 | 13850 | .internal_flags = NL80211_FLAG_NEED_RTNL, | 13920 | .internal_flags = NL80211_FLAG_NEED_RTNL, |
3585 | 13851 | }, | 13921 | }, |
3586 | 13852 | #endif | 13922 | #endif |
3587 | 13853 | { | 13923 | { |
3588 | 13854 | .cmd = NL80211_CMD_REQ_SET_REG, | 13924 | .cmd = NL80211_CMD_REQ_SET_REG, |
3589 | 13925 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3590 | 13926 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3591 | 13927 | #endif | ||
3592 | 13928 | |||
3593 | 13855 | .doit = nl80211_req_set_reg, | 13929 | .doit = nl80211_req_set_reg, |
3594 | 13856 | .policy = nl80211_policy, | ||
3595 | 13857 | .flags = GENL_ADMIN_PERM, | 13930 | .flags = GENL_ADMIN_PERM, |
3596 | 13858 | }, | 13931 | }, |
3597 | 13859 | { | 13932 | { |
3598 | 13860 | .cmd = NL80211_CMD_RELOAD_REGDB, | 13933 | .cmd = NL80211_CMD_RELOAD_REGDB, |
3599 | 13934 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3600 | 13935 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3601 | 13936 | #endif | ||
3602 | 13937 | |||
3603 | 13861 | .doit = nl80211_reload_regdb, | 13938 | .doit = nl80211_reload_regdb, |
3604 | 13862 | .policy = nl80211_policy, | ||
3605 | 13863 | .flags = GENL_ADMIN_PERM, | 13939 | .flags = GENL_ADMIN_PERM, |
3606 | 13864 | }, | 13940 | }, |
3607 | 13865 | { | 13941 | { |
3608 | 13866 | .cmd = NL80211_CMD_GET_MESH_CONFIG, | 13942 | .cmd = NL80211_CMD_GET_MESH_CONFIG, |
3609 | 13943 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3610 | 13944 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3611 | 13945 | #endif | ||
3612 | 13946 | |||
3613 | 13867 | .doit = nl80211_get_mesh_config, | 13947 | .doit = nl80211_get_mesh_config, |
3614 | 13868 | .policy = nl80211_policy, | ||
3615 | 13869 | /* can be retrieved by unprivileged users */ | 13948 | /* can be retrieved by unprivileged users */ |
3616 | 13870 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13949 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3617 | 13871 | NL80211_FLAG_NEED_RTNL, | 13950 | NL80211_FLAG_NEED_RTNL, |
3618 | 13872 | }, | 13951 | }, |
3619 | 13873 | { | 13952 | { |
3620 | 13874 | .cmd = NL80211_CMD_SET_MESH_CONFIG, | 13953 | .cmd = NL80211_CMD_SET_MESH_CONFIG, |
3621 | 13954 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3622 | 13955 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3623 | 13956 | #endif | ||
3624 | 13957 | |||
3625 | 13875 | .doit = nl80211_update_mesh_config, | 13958 | .doit = nl80211_update_mesh_config, |
3626 | 13876 | .policy = nl80211_policy, | ||
3627 | 13877 | .flags = GENL_UNS_ADMIN_PERM, | 13959 | .flags = GENL_UNS_ADMIN_PERM, |
3628 | 13878 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 13960 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3629 | 13879 | NL80211_FLAG_NEED_RTNL, | 13961 | NL80211_FLAG_NEED_RTNL, |
3630 | 13880 | }, | 13962 | }, |
3631 | 13881 | { | 13963 | { |
3632 | 13882 | .cmd = NL80211_CMD_TRIGGER_SCAN, | 13964 | .cmd = NL80211_CMD_TRIGGER_SCAN, |
3633 | 13965 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3634 | 13966 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3635 | 13967 | #endif | ||
3636 | 13968 | |||
3637 | 13883 | .doit = nl80211_trigger_scan, | 13969 | .doit = nl80211_trigger_scan, |
3638 | 13884 | .policy = nl80211_policy, | ||
3639 | 13885 | .flags = GENL_UNS_ADMIN_PERM, | 13970 | .flags = GENL_UNS_ADMIN_PERM, |
3640 | 13886 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | | 13971 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | |
3641 | 13887 | NL80211_FLAG_NEED_RTNL, | 13972 | NL80211_FLAG_NEED_RTNL, |
3642 | 13888 | }, | 13973 | }, |
3643 | 13889 | { | 13974 | { |
3644 | 13890 | .cmd = NL80211_CMD_ABORT_SCAN, | 13975 | .cmd = NL80211_CMD_ABORT_SCAN, |
3645 | 13976 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3646 | 13977 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3647 | 13978 | #endif | ||
3648 | 13979 | |||
3649 | 13891 | .doit = nl80211_abort_scan, | 13980 | .doit = nl80211_abort_scan, |
3650 | 13892 | .policy = nl80211_policy, | ||
3651 | 13893 | .flags = GENL_UNS_ADMIN_PERM, | 13981 | .flags = GENL_UNS_ADMIN_PERM, |
3652 | 13894 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | | 13982 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | |
3653 | 13895 | NL80211_FLAG_NEED_RTNL, | 13983 | NL80211_FLAG_NEED_RTNL, |
3654 | 13896 | }, | 13984 | }, |
3655 | 13897 | { | 13985 | { |
3656 | 13898 | .cmd = NL80211_CMD_GET_SCAN, | 13986 | .cmd = NL80211_CMD_GET_SCAN, |
3658 | 13899 | .policy = nl80211_policy, | 13987 | #if LINUX_VERSION_IS_GEQ(5,2,0) |
3659 | 13988 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3660 | 13989 | #endif | ||
3661 | 13990 | |||
3662 | 13900 | .dumpit = nl80211_dump_scan, | 13991 | .dumpit = nl80211_dump_scan, |
3663 | 13901 | }, | 13992 | }, |
3664 | 13902 | { | 13993 | { |
3665 | 13903 | .cmd = NL80211_CMD_START_SCHED_SCAN, | 13994 | .cmd = NL80211_CMD_START_SCHED_SCAN, |
3666 | 13995 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3667 | 13996 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3668 | 13997 | #endif | ||
3669 | 13998 | |||
3670 | 13904 | .doit = nl80211_start_sched_scan, | 13999 | .doit = nl80211_start_sched_scan, |
3671 | 13905 | .policy = nl80211_policy, | ||
3672 | 13906 | .flags = GENL_UNS_ADMIN_PERM, | 14000 | .flags = GENL_UNS_ADMIN_PERM, |
3673 | 13907 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14001 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3674 | 13908 | NL80211_FLAG_NEED_RTNL, | 14002 | NL80211_FLAG_NEED_RTNL, |
3675 | 13909 | }, | 14003 | }, |
3676 | 13910 | { | 14004 | { |
3677 | 13911 | .cmd = NL80211_CMD_STOP_SCHED_SCAN, | 14005 | .cmd = NL80211_CMD_STOP_SCHED_SCAN, |
3678 | 14006 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3679 | 14007 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3680 | 14008 | #endif | ||
3681 | 14009 | |||
3682 | 13912 | .doit = nl80211_stop_sched_scan, | 14010 | .doit = nl80211_stop_sched_scan, |
3683 | 13913 | .policy = nl80211_policy, | ||
3684 | 13914 | .flags = GENL_UNS_ADMIN_PERM, | 14011 | .flags = GENL_UNS_ADMIN_PERM, |
3685 | 13915 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14012 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3686 | 13916 | NL80211_FLAG_NEED_RTNL, | 14013 | NL80211_FLAG_NEED_RTNL, |
3687 | 13917 | }, | 14014 | }, |
3688 | 13918 | { | 14015 | { |
3689 | 13919 | .cmd = NL80211_CMD_AUTHENTICATE, | 14016 | .cmd = NL80211_CMD_AUTHENTICATE, |
3690 | 14017 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3691 | 14018 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3692 | 14019 | #endif | ||
3693 | 14020 | |||
3694 | 13920 | .doit = nl80211_authenticate, | 14021 | .doit = nl80211_authenticate, |
3695 | 13921 | .policy = nl80211_policy, | ||
3696 | 13922 | .flags = GENL_UNS_ADMIN_PERM, | 14022 | .flags = GENL_UNS_ADMIN_PERM, |
3697 | 13923 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14023 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3698 | 13924 | NL80211_FLAG_NEED_RTNL | | 14024 | NL80211_FLAG_NEED_RTNL | |
3699 | @@ -13926,40 +14026,55 @@ static __genl_const struct genl_ops nl80211_ops[] = { | |||
3700 | 13926 | }, | 14026 | }, |
3701 | 13927 | { | 14027 | { |
3702 | 13928 | .cmd = NL80211_CMD_ASSOCIATE, | 14028 | .cmd = NL80211_CMD_ASSOCIATE, |
3703 | 14029 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3704 | 14030 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3705 | 14031 | #endif | ||
3706 | 14032 | |||
3707 | 13929 | .doit = nl80211_associate, | 14033 | .doit = nl80211_associate, |
3708 | 13930 | .policy = nl80211_policy, | ||
3709 | 13931 | .flags = GENL_UNS_ADMIN_PERM, | 14034 | .flags = GENL_UNS_ADMIN_PERM, |
3710 | 13932 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14035 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3711 | 13933 | NL80211_FLAG_NEED_RTNL, | 14036 | NL80211_FLAG_NEED_RTNL, |
3712 | 13934 | }, | 14037 | }, |
3713 | 13935 | { | 14038 | { |
3714 | 13936 | .cmd = NL80211_CMD_DEAUTHENTICATE, | 14039 | .cmd = NL80211_CMD_DEAUTHENTICATE, |
3715 | 14040 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3716 | 14041 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3717 | 14042 | #endif | ||
3718 | 14043 | |||
3719 | 13937 | .doit = nl80211_deauthenticate, | 14044 | .doit = nl80211_deauthenticate, |
3720 | 13938 | .policy = nl80211_policy, | ||
3721 | 13939 | .flags = GENL_UNS_ADMIN_PERM, | 14045 | .flags = GENL_UNS_ADMIN_PERM, |
3722 | 13940 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14046 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3723 | 13941 | NL80211_FLAG_NEED_RTNL, | 14047 | NL80211_FLAG_NEED_RTNL, |
3724 | 13942 | }, | 14048 | }, |
3725 | 13943 | { | 14049 | { |
3726 | 13944 | .cmd = NL80211_CMD_DISASSOCIATE, | 14050 | .cmd = NL80211_CMD_DISASSOCIATE, |
3727 | 14051 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3728 | 14052 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3729 | 14053 | #endif | ||
3730 | 14054 | |||
3731 | 13945 | .doit = nl80211_disassociate, | 14055 | .doit = nl80211_disassociate, |
3732 | 13946 | .policy = nl80211_policy, | ||
3733 | 13947 | .flags = GENL_UNS_ADMIN_PERM, | 14056 | .flags = GENL_UNS_ADMIN_PERM, |
3734 | 13948 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14057 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3735 | 13949 | NL80211_FLAG_NEED_RTNL, | 14058 | NL80211_FLAG_NEED_RTNL, |
3736 | 13950 | }, | 14059 | }, |
3737 | 13951 | { | 14060 | { |
3738 | 13952 | .cmd = NL80211_CMD_JOIN_IBSS, | 14061 | .cmd = NL80211_CMD_JOIN_IBSS, |
3739 | 14062 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3740 | 14063 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3741 | 14064 | #endif | ||
3742 | 14065 | |||
3743 | 13953 | .doit = nl80211_join_ibss, | 14066 | .doit = nl80211_join_ibss, |
3744 | 13954 | .policy = nl80211_policy, | ||
3745 | 13955 | .flags = GENL_UNS_ADMIN_PERM, | 14067 | .flags = GENL_UNS_ADMIN_PERM, |
3746 | 13956 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14068 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3747 | 13957 | NL80211_FLAG_NEED_RTNL, | 14069 | NL80211_FLAG_NEED_RTNL, |
3748 | 13958 | }, | 14070 | }, |
3749 | 13959 | { | 14071 | { |
3750 | 13960 | .cmd = NL80211_CMD_LEAVE_IBSS, | 14072 | .cmd = NL80211_CMD_LEAVE_IBSS, |
3751 | 14073 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3752 | 14074 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3753 | 14075 | #endif | ||
3754 | 14076 | |||
3755 | 13961 | .doit = nl80211_leave_ibss, | 14077 | .doit = nl80211_leave_ibss, |
3756 | 13962 | .policy = nl80211_policy, | ||
3757 | 13963 | .flags = GENL_UNS_ADMIN_PERM, | 14078 | .flags = GENL_UNS_ADMIN_PERM, |
3758 | 13964 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14079 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3759 | 13965 | NL80211_FLAG_NEED_RTNL, | 14080 | NL80211_FLAG_NEED_RTNL, |
3760 | @@ -13967,9 +14082,12 @@ static __genl_const struct genl_ops nl80211_ops[] = { | |||
3761 | 13967 | #ifdef CPTCFG_NL80211_TESTMODE | 14082 | #ifdef CPTCFG_NL80211_TESTMODE |
3762 | 13968 | { | 14083 | { |
3763 | 13969 | .cmd = NL80211_CMD_TESTMODE, | 14084 | .cmd = NL80211_CMD_TESTMODE, |
3764 | 14085 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3765 | 14086 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3766 | 14087 | #endif | ||
3767 | 14088 | |||
3768 | 13970 | .doit = nl80211_testmode_do, | 14089 | .doit = nl80211_testmode_do, |
3769 | 13971 | .dumpit = nl80211_testmode_dump, | 14090 | .dumpit = nl80211_testmode_dump, |
3770 | 13972 | .policy = nl80211_policy, | ||
3771 | 13973 | .flags = GENL_UNS_ADMIN_PERM, | 14091 | .flags = GENL_UNS_ADMIN_PERM, |
3772 | 13974 | .internal_flags = NL80211_FLAG_NEED_WIPHY | | 14092 | .internal_flags = NL80211_FLAG_NEED_WIPHY | |
3773 | 13975 | NL80211_FLAG_NEED_RTNL, | 14093 | NL80211_FLAG_NEED_RTNL, |
3774 | @@ -13977,181 +14095,250 @@ static __genl_const struct genl_ops nl80211_ops[] = { | |||
3775 | 13977 | #endif | 14095 | #endif |
3776 | 13978 | { | 14096 | { |
3777 | 13979 | .cmd = NL80211_CMD_CONNECT, | 14097 | .cmd = NL80211_CMD_CONNECT, |
3778 | 14098 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3779 | 14099 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3780 | 14100 | #endif | ||
3781 | 14101 | |||
3782 | 13980 | .doit = nl80211_connect, | 14102 | .doit = nl80211_connect, |
3783 | 13981 | .policy = nl80211_policy, | ||
3784 | 13982 | .flags = GENL_UNS_ADMIN_PERM, | 14103 | .flags = GENL_UNS_ADMIN_PERM, |
3785 | 13983 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14104 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3786 | 13984 | NL80211_FLAG_NEED_RTNL, | 14105 | NL80211_FLAG_NEED_RTNL, |
3787 | 13985 | }, | 14106 | }, |
3788 | 13986 | { | 14107 | { |
3789 | 13987 | .cmd = NL80211_CMD_UPDATE_CONNECT_PARAMS, | 14108 | .cmd = NL80211_CMD_UPDATE_CONNECT_PARAMS, |
3790 | 14109 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3791 | 14110 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3792 | 14111 | #endif | ||
3793 | 14112 | |||
3794 | 13988 | .doit = nl80211_update_connect_params, | 14113 | .doit = nl80211_update_connect_params, |
3795 | 13989 | .policy = nl80211_policy, | ||
3796 | 13990 | .flags = GENL_ADMIN_PERM, | 14114 | .flags = GENL_ADMIN_PERM, |
3797 | 13991 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14115 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3798 | 13992 | NL80211_FLAG_NEED_RTNL, | 14116 | NL80211_FLAG_NEED_RTNL, |
3799 | 13993 | }, | 14117 | }, |
3800 | 13994 | { | 14118 | { |
3801 | 13995 | .cmd = NL80211_CMD_DISCONNECT, | 14119 | .cmd = NL80211_CMD_DISCONNECT, |
3802 | 14120 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3803 | 14121 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3804 | 14122 | #endif | ||
3805 | 14123 | |||
3806 | 13996 | .doit = nl80211_disconnect, | 14124 | .doit = nl80211_disconnect, |
3807 | 13997 | .policy = nl80211_policy, | ||
3808 | 13998 | .flags = GENL_UNS_ADMIN_PERM, | 14125 | .flags = GENL_UNS_ADMIN_PERM, |
3809 | 13999 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14126 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3810 | 14000 | NL80211_FLAG_NEED_RTNL, | 14127 | NL80211_FLAG_NEED_RTNL, |
3811 | 14001 | }, | 14128 | }, |
3812 | 14002 | { | 14129 | { |
3813 | 14003 | .cmd = NL80211_CMD_SET_WIPHY_NETNS, | 14130 | .cmd = NL80211_CMD_SET_WIPHY_NETNS, |
3814 | 14131 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3815 | 14132 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3816 | 14133 | #endif | ||
3817 | 14134 | |||
3818 | 14004 | .doit = nl80211_wiphy_netns, | 14135 | .doit = nl80211_wiphy_netns, |
3819 | 14005 | .policy = nl80211_policy, | ||
3820 | 14006 | .flags = GENL_UNS_ADMIN_PERM, | 14136 | .flags = GENL_UNS_ADMIN_PERM, |
3821 | 14007 | .internal_flags = NL80211_FLAG_NEED_WIPHY | | 14137 | .internal_flags = NL80211_FLAG_NEED_WIPHY | |
3822 | 14008 | NL80211_FLAG_NEED_RTNL, | 14138 | NL80211_FLAG_NEED_RTNL, |
3823 | 14009 | }, | 14139 | }, |
3824 | 14010 | { | 14140 | { |
3825 | 14011 | .cmd = NL80211_CMD_GET_SURVEY, | 14141 | .cmd = NL80211_CMD_GET_SURVEY, |
3827 | 14012 | .policy = nl80211_policy, | 14142 | #if LINUX_VERSION_IS_GEQ(5,2,0) |
3828 | 14143 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3829 | 14144 | #endif | ||
3830 | 14145 | |||
3831 | 14013 | .dumpit = nl80211_dump_survey, | 14146 | .dumpit = nl80211_dump_survey, |
3832 | 14014 | }, | 14147 | }, |
3833 | 14015 | { | 14148 | { |
3834 | 14016 | .cmd = NL80211_CMD_SET_PMKSA, | 14149 | .cmd = NL80211_CMD_SET_PMKSA, |
3835 | 14150 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3836 | 14151 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3837 | 14152 | #endif | ||
3838 | 14153 | |||
3839 | 14017 | .doit = nl80211_setdel_pmksa, | 14154 | .doit = nl80211_setdel_pmksa, |
3840 | 14018 | .policy = nl80211_policy, | ||
3841 | 14019 | .flags = GENL_UNS_ADMIN_PERM, | 14155 | .flags = GENL_UNS_ADMIN_PERM, |
3842 | 14020 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14156 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3843 | 14021 | NL80211_FLAG_NEED_RTNL, | 14157 | NL80211_FLAG_NEED_RTNL, |
3844 | 14022 | }, | 14158 | }, |
3845 | 14023 | { | 14159 | { |
3846 | 14024 | .cmd = NL80211_CMD_DEL_PMKSA, | 14160 | .cmd = NL80211_CMD_DEL_PMKSA, |
3847 | 14161 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3848 | 14162 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3849 | 14163 | #endif | ||
3850 | 14164 | |||
3851 | 14025 | .doit = nl80211_setdel_pmksa, | 14165 | .doit = nl80211_setdel_pmksa, |
3852 | 14026 | .policy = nl80211_policy, | ||
3853 | 14027 | .flags = GENL_UNS_ADMIN_PERM, | 14166 | .flags = GENL_UNS_ADMIN_PERM, |
3854 | 14028 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14167 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3855 | 14029 | NL80211_FLAG_NEED_RTNL, | 14168 | NL80211_FLAG_NEED_RTNL, |
3856 | 14030 | }, | 14169 | }, |
3857 | 14031 | { | 14170 | { |
3858 | 14032 | .cmd = NL80211_CMD_FLUSH_PMKSA, | 14171 | .cmd = NL80211_CMD_FLUSH_PMKSA, |
3859 | 14172 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3860 | 14173 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3861 | 14174 | #endif | ||
3862 | 14175 | |||
3863 | 14033 | .doit = nl80211_flush_pmksa, | 14176 | .doit = nl80211_flush_pmksa, |
3864 | 14034 | .policy = nl80211_policy, | ||
3865 | 14035 | .flags = GENL_UNS_ADMIN_PERM, | 14177 | .flags = GENL_UNS_ADMIN_PERM, |
3866 | 14036 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14178 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
3867 | 14037 | NL80211_FLAG_NEED_RTNL, | 14179 | NL80211_FLAG_NEED_RTNL, |
3868 | 14038 | }, | 14180 | }, |
3869 | 14039 | { | 14181 | { |
3870 | 14040 | .cmd = NL80211_CMD_REMAIN_ON_CHANNEL, | 14182 | .cmd = NL80211_CMD_REMAIN_ON_CHANNEL, |
3871 | 14183 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3872 | 14184 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3873 | 14185 | #endif | ||
3874 | 14186 | |||
3875 | 14041 | .doit = nl80211_remain_on_channel, | 14187 | .doit = nl80211_remain_on_channel, |
3876 | 14042 | .policy = nl80211_policy, | ||
3877 | 14043 | .flags = GENL_UNS_ADMIN_PERM, | 14188 | .flags = GENL_UNS_ADMIN_PERM, |
3878 | 14044 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | | 14189 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | |
3879 | 14045 | NL80211_FLAG_NEED_RTNL, | 14190 | NL80211_FLAG_NEED_RTNL, |
3880 | 14046 | }, | 14191 | }, |
3881 | 14047 | { | 14192 | { |
3882 | 14048 | .cmd = NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL, | 14193 | .cmd = NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL, |
3883 | 14194 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3884 | 14195 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3885 | 14196 | #endif | ||
3886 | 14197 | |||
3887 | 14049 | .doit = nl80211_cancel_remain_on_channel, | 14198 | .doit = nl80211_cancel_remain_on_channel, |
3888 | 14050 | .policy = nl80211_policy, | ||
3889 | 14051 | .flags = GENL_UNS_ADMIN_PERM, | 14199 | .flags = GENL_UNS_ADMIN_PERM, |
3890 | 14052 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | | 14200 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | |
3891 | 14053 | NL80211_FLAG_NEED_RTNL, | 14201 | NL80211_FLAG_NEED_RTNL, |
3892 | 14054 | }, | 14202 | }, |
3893 | 14055 | { | 14203 | { |
3894 | 14056 | .cmd = NL80211_CMD_SET_TX_BITRATE_MASK, | 14204 | .cmd = NL80211_CMD_SET_TX_BITRATE_MASK, |
3895 | 14205 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3896 | 14206 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3897 | 14207 | #endif | ||
3898 | 14208 | |||
3899 | 14057 | .doit = nl80211_set_tx_bitrate_mask, | 14209 | .doit = nl80211_set_tx_bitrate_mask, |
3900 | 14058 | .policy = nl80211_policy, | ||
3901 | 14059 | .flags = GENL_UNS_ADMIN_PERM, | 14210 | .flags = GENL_UNS_ADMIN_PERM, |
3902 | 14060 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 14211 | .internal_flags = NL80211_FLAG_NEED_NETDEV | |
3903 | 14061 | NL80211_FLAG_NEED_RTNL, | 14212 | NL80211_FLAG_NEED_RTNL, |
3904 | 14062 | }, | 14213 | }, |
3905 | 14063 | { | 14214 | { |
3906 | 14064 | .cmd = NL80211_CMD_REGISTER_FRAME, | 14215 | .cmd = NL80211_CMD_REGISTER_FRAME, |
3907 | 14216 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3908 | 14217 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3909 | 14218 | #endif | ||
3910 | 14219 | |||
3911 | 14065 | .doit = nl80211_register_mgmt, | 14220 | .doit = nl80211_register_mgmt, |
3912 | 14066 | .policy = nl80211_policy, | ||
3913 | 14067 | .flags = GENL_UNS_ADMIN_PERM, | 14221 | .flags = GENL_UNS_ADMIN_PERM, |
3914 | 14068 | .internal_flags = NL80211_FLAG_NEED_WDEV | | 14222 | .internal_flags = NL80211_FLAG_NEED_WDEV | |
3915 | 14069 | NL80211_FLAG_NEED_RTNL, | 14223 | NL80211_FLAG_NEED_RTNL, |
3916 | 14070 | }, | 14224 | }, |
3917 | 14071 | { | 14225 | { |
3918 | 14072 | .cmd = NL80211_CMD_FRAME, | 14226 | .cmd = NL80211_CMD_FRAME, |
3919 | 14227 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3920 | 14228 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3921 | 14229 | #endif | ||
3922 | 14230 | |||
3923 | 14073 | .doit = nl80211_tx_mgmt, | 14231 | .doit = nl80211_tx_mgmt, |
3924 | 14074 | .policy = nl80211_policy, | ||
3925 | 14075 | .flags = GENL_UNS_ADMIN_PERM, | 14232 | .flags = GENL_UNS_ADMIN_PERM, |
3926 | 14076 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | | 14233 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | |
3927 | 14077 | NL80211_FLAG_NEED_RTNL, | 14234 | NL80211_FLAG_NEED_RTNL, |
3928 | 14078 | }, | 14235 | }, |
3929 | 14079 | { | 14236 | { |
3930 | 14080 | .cmd = NL80211_CMD_FRAME_WAIT_CANCEL, | 14237 | .cmd = NL80211_CMD_FRAME_WAIT_CANCEL, |
3931 | 14238 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3932 | 14239 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3933 | 14240 | #endif | ||
3934 | 14241 | |||
3935 | 14081 | .doit = nl80211_tx_mgmt_cancel_wait, | 14242 | .doit = nl80211_tx_mgmt_cancel_wait, |
3936 | 14082 | .policy = nl80211_policy, | ||
3937 | 14083 | .flags = GENL_UNS_ADMIN_PERM, | 14243 | .flags = GENL_UNS_ADMIN_PERM, |
3938 | 14084 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | | 14244 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | |
3939 | 14085 | NL80211_FLAG_NEED_RTNL, | 14245 | NL80211_FLAG_NEED_RTNL, |
3940 | 14086 | }, | 14246 | }, |
3941 | 14087 | { | 14247 | { |
3942 | 14088 | .cmd = NL80211_CMD_SET_POWER_SAVE, | 14248 | .cmd = NL80211_CMD_SET_POWER_SAVE, |
3943 | 14249 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3944 | 14250 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3945 | 14251 | #endif | ||
3946 | 14252 | |||
3947 | 14089 | .doit = nl80211_set_power_save, | 14253 | .doit = nl80211_set_power_save, |
3948 | 14090 | .policy = nl80211_policy, | ||
3949 | 14091 | .flags = GENL_UNS_ADMIN_PERM, | 14254 | .flags = GENL_UNS_ADMIN_PERM, |
3950 | 14092 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 14255 | .internal_flags = NL80211_FLAG_NEED_NETDEV | |
3951 | 14093 | NL80211_FLAG_NEED_RTNL, | 14256 | NL80211_FLAG_NEED_RTNL, |
3952 | 14094 | }, | 14257 | }, |
3953 | 14095 | { | 14258 | { |
3954 | 14096 | .cmd = NL80211_CMD_GET_POWER_SAVE, | 14259 | .cmd = NL80211_CMD_GET_POWER_SAVE, |
3955 | 14260 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3956 | 14261 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3957 | 14262 | #endif | ||
3958 | 14263 | |||
3959 | 14097 | .doit = nl80211_get_power_save, | 14264 | .doit = nl80211_get_power_save, |
3960 | 14098 | .policy = nl80211_policy, | ||
3961 | 14099 | /* can be retrieved by unprivileged users */ | 14265 | /* can be retrieved by unprivileged users */ |
3962 | 14100 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 14266 | .internal_flags = NL80211_FLAG_NEED_NETDEV | |
3963 | 14101 | NL80211_FLAG_NEED_RTNL, | 14267 | NL80211_FLAG_NEED_RTNL, |
3964 | 14102 | }, | 14268 | }, |
3965 | 14103 | { | 14269 | { |
3966 | 14104 | .cmd = NL80211_CMD_SET_CQM, | 14270 | .cmd = NL80211_CMD_SET_CQM, |
3967 | 14271 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3968 | 14272 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3969 | 14273 | #endif | ||
3970 | 14274 | |||
3971 | 14105 | .doit = nl80211_set_cqm, | 14275 | .doit = nl80211_set_cqm, |
3972 | 14106 | .policy = nl80211_policy, | ||
3973 | 14107 | .flags = GENL_UNS_ADMIN_PERM, | 14276 | .flags = GENL_UNS_ADMIN_PERM, |
3974 | 14108 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 14277 | .internal_flags = NL80211_FLAG_NEED_NETDEV | |
3975 | 14109 | NL80211_FLAG_NEED_RTNL, | 14278 | NL80211_FLAG_NEED_RTNL, |
3976 | 14110 | }, | 14279 | }, |
3977 | 14111 | { | 14280 | { |
3978 | 14112 | .cmd = NL80211_CMD_SET_CHANNEL, | 14281 | .cmd = NL80211_CMD_SET_CHANNEL, |
3979 | 14282 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3980 | 14283 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3981 | 14284 | #endif | ||
3982 | 14285 | |||
3983 | 14113 | .doit = nl80211_set_channel, | 14286 | .doit = nl80211_set_channel, |
3984 | 14114 | .policy = nl80211_policy, | ||
3985 | 14115 | .flags = GENL_UNS_ADMIN_PERM, | 14287 | .flags = GENL_UNS_ADMIN_PERM, |
3986 | 14116 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 14288 | .internal_flags = NL80211_FLAG_NEED_NETDEV | |
3987 | 14117 | NL80211_FLAG_NEED_RTNL, | 14289 | NL80211_FLAG_NEED_RTNL, |
3988 | 14118 | }, | 14290 | }, |
3989 | 14119 | { | 14291 | { |
3990 | 14120 | .cmd = NL80211_CMD_SET_WDS_PEER, | 14292 | .cmd = NL80211_CMD_SET_WDS_PEER, |
3991 | 14293 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
3992 | 14294 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
3993 | 14295 | #endif | ||
3994 | 14296 | |||
3995 | 14121 | .doit = nl80211_set_wds_peer, | 14297 | .doit = nl80211_set_wds_peer, |
3996 | 14122 | .policy = nl80211_policy, | ||
3997 | 14123 | .flags = GENL_UNS_ADMIN_PERM, | 14298 | .flags = GENL_UNS_ADMIN_PERM, |
3998 | 14124 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 14299 | .internal_flags = NL80211_FLAG_NEED_NETDEV | |
3999 | 14125 | NL80211_FLAG_NEED_RTNL, | 14300 | NL80211_FLAG_NEED_RTNL, |
4000 | 14126 | }, | 14301 | }, |
4001 | 14127 | { | 14302 | { |
4002 | 14128 | .cmd = NL80211_CMD_JOIN_MESH, | 14303 | .cmd = NL80211_CMD_JOIN_MESH, |
4003 | 14304 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4004 | 14305 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4005 | 14306 | #endif | ||
4006 | 14307 | |||
4007 | 14129 | .doit = nl80211_join_mesh, | 14308 | .doit = nl80211_join_mesh, |
4008 | 14130 | .policy = nl80211_policy, | ||
4009 | 14131 | .flags = GENL_UNS_ADMIN_PERM, | 14309 | .flags = GENL_UNS_ADMIN_PERM, |
4010 | 14132 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14310 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4011 | 14133 | NL80211_FLAG_NEED_RTNL, | 14311 | NL80211_FLAG_NEED_RTNL, |
4012 | 14134 | }, | 14312 | }, |
4013 | 14135 | { | 14313 | { |
4014 | 14136 | .cmd = NL80211_CMD_LEAVE_MESH, | 14314 | .cmd = NL80211_CMD_LEAVE_MESH, |
4015 | 14315 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4016 | 14316 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4017 | 14317 | #endif | ||
4018 | 14318 | |||
4019 | 14137 | .doit = nl80211_leave_mesh, | 14319 | .doit = nl80211_leave_mesh, |
4020 | 14138 | .policy = nl80211_policy, | ||
4021 | 14139 | .flags = GENL_UNS_ADMIN_PERM, | 14320 | .flags = GENL_UNS_ADMIN_PERM, |
4022 | 14140 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14321 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4023 | 14141 | NL80211_FLAG_NEED_RTNL, | 14322 | NL80211_FLAG_NEED_RTNL, |
4024 | 14142 | }, | 14323 | }, |
4025 | 14143 | { | 14324 | { |
4026 | 14144 | .cmd = NL80211_CMD_JOIN_OCB, | 14325 | .cmd = NL80211_CMD_JOIN_OCB, |
4027 | 14326 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4028 | 14327 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4029 | 14328 | #endif | ||
4030 | 14329 | |||
4031 | 14145 | .doit = nl80211_join_ocb, | 14330 | .doit = nl80211_join_ocb, |
4032 | 14146 | .policy = nl80211_policy, | ||
4033 | 14147 | .flags = GENL_UNS_ADMIN_PERM, | 14331 | .flags = GENL_UNS_ADMIN_PERM, |
4034 | 14148 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14332 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4035 | 14149 | NL80211_FLAG_NEED_RTNL, | 14333 | NL80211_FLAG_NEED_RTNL, |
4036 | 14150 | }, | 14334 | }, |
4037 | 14151 | { | 14335 | { |
4038 | 14152 | .cmd = NL80211_CMD_LEAVE_OCB, | 14336 | .cmd = NL80211_CMD_LEAVE_OCB, |
4039 | 14337 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4040 | 14338 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4041 | 14339 | #endif | ||
4042 | 14340 | |||
4043 | 14153 | .doit = nl80211_leave_ocb, | 14341 | .doit = nl80211_leave_ocb, |
4044 | 14154 | .policy = nl80211_policy, | ||
4045 | 14155 | .flags = GENL_UNS_ADMIN_PERM, | 14342 | .flags = GENL_UNS_ADMIN_PERM, |
4046 | 14156 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14343 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4047 | 14157 | NL80211_FLAG_NEED_RTNL, | 14344 | NL80211_FLAG_NEED_RTNL, |
4048 | @@ -14159,16 +14346,22 @@ static __genl_const struct genl_ops nl80211_ops[] = { | |||
4049 | 14159 | #ifdef CONFIG_PM | 14346 | #ifdef CONFIG_PM |
4050 | 14160 | { | 14347 | { |
4051 | 14161 | .cmd = NL80211_CMD_GET_WOWLAN, | 14348 | .cmd = NL80211_CMD_GET_WOWLAN, |
4052 | 14349 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4053 | 14350 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4054 | 14351 | #endif | ||
4055 | 14352 | |||
4056 | 14162 | .doit = nl80211_get_wowlan, | 14353 | .doit = nl80211_get_wowlan, |
4057 | 14163 | .policy = nl80211_policy, | ||
4058 | 14164 | /* can be retrieved by unprivileged users */ | 14354 | /* can be retrieved by unprivileged users */ |
4059 | 14165 | .internal_flags = NL80211_FLAG_NEED_WIPHY | | 14355 | .internal_flags = NL80211_FLAG_NEED_WIPHY | |
4060 | 14166 | NL80211_FLAG_NEED_RTNL, | 14356 | NL80211_FLAG_NEED_RTNL, |
4061 | 14167 | }, | 14357 | }, |
4062 | 14168 | { | 14358 | { |
4063 | 14169 | .cmd = NL80211_CMD_SET_WOWLAN, | 14359 | .cmd = NL80211_CMD_SET_WOWLAN, |
4064 | 14360 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4065 | 14361 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4066 | 14362 | #endif | ||
4067 | 14363 | |||
4068 | 14170 | .doit = nl80211_set_wowlan, | 14364 | .doit = nl80211_set_wowlan, |
4069 | 14171 | .policy = nl80211_policy, | ||
4070 | 14172 | .flags = GENL_UNS_ADMIN_PERM, | 14365 | .flags = GENL_UNS_ADMIN_PERM, |
4071 | 14173 | .internal_flags = NL80211_FLAG_NEED_WIPHY | | 14366 | .internal_flags = NL80211_FLAG_NEED_WIPHY | |
4072 | 14174 | NL80211_FLAG_NEED_RTNL, | 14367 | NL80211_FLAG_NEED_RTNL, |
4073 | @@ -14176,8 +14369,11 @@ static __genl_const struct genl_ops nl80211_ops[] = { | |||
4074 | 14176 | #endif | 14369 | #endif |
4075 | 14177 | { | 14370 | { |
4076 | 14178 | .cmd = NL80211_CMD_SET_REKEY_OFFLOAD, | 14371 | .cmd = NL80211_CMD_SET_REKEY_OFFLOAD, |
4077 | 14372 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4078 | 14373 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4079 | 14374 | #endif | ||
4080 | 14375 | |||
4081 | 14179 | .doit = nl80211_set_rekey_data, | 14376 | .doit = nl80211_set_rekey_data, |
4082 | 14180 | .policy = nl80211_policy, | ||
4083 | 14181 | .flags = GENL_UNS_ADMIN_PERM, | 14377 | .flags = GENL_UNS_ADMIN_PERM, |
4084 | 14182 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14378 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4085 | 14183 | NL80211_FLAG_NEED_RTNL | | 14379 | NL80211_FLAG_NEED_RTNL | |
4086 | @@ -14185,290 +14381,401 @@ static __genl_const struct genl_ops nl80211_ops[] = { | |||
4087 | 14185 | }, | 14381 | }, |
4088 | 14186 | { | 14382 | { |
4089 | 14187 | .cmd = NL80211_CMD_TDLS_MGMT, | 14383 | .cmd = NL80211_CMD_TDLS_MGMT, |
4090 | 14384 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4091 | 14385 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4092 | 14386 | #endif | ||
4093 | 14387 | |||
4094 | 14188 | .doit = nl80211_tdls_mgmt, | 14388 | .doit = nl80211_tdls_mgmt, |
4095 | 14189 | .policy = nl80211_policy, | ||
4096 | 14190 | .flags = GENL_UNS_ADMIN_PERM, | 14389 | .flags = GENL_UNS_ADMIN_PERM, |
4097 | 14191 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14390 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4098 | 14192 | NL80211_FLAG_NEED_RTNL, | 14391 | NL80211_FLAG_NEED_RTNL, |
4099 | 14193 | }, | 14392 | }, |
4100 | 14194 | { | 14393 | { |
4101 | 14195 | .cmd = NL80211_CMD_TDLS_OPER, | 14394 | .cmd = NL80211_CMD_TDLS_OPER, |
4102 | 14395 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4103 | 14396 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4104 | 14397 | #endif | ||
4105 | 14398 | |||
4106 | 14196 | .doit = nl80211_tdls_oper, | 14399 | .doit = nl80211_tdls_oper, |
4107 | 14197 | .policy = nl80211_policy, | ||
4108 | 14198 | .flags = GENL_UNS_ADMIN_PERM, | 14400 | .flags = GENL_UNS_ADMIN_PERM, |
4109 | 14199 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14401 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4110 | 14200 | NL80211_FLAG_NEED_RTNL, | 14402 | NL80211_FLAG_NEED_RTNL, |
4111 | 14201 | }, | 14403 | }, |
4112 | 14202 | { | 14404 | { |
4113 | 14203 | .cmd = NL80211_CMD_UNEXPECTED_FRAME, | 14405 | .cmd = NL80211_CMD_UNEXPECTED_FRAME, |
4114 | 14406 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4115 | 14407 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4116 | 14408 | #endif | ||
4117 | 14409 | |||
4118 | 14204 | .doit = nl80211_register_unexpected_frame, | 14410 | .doit = nl80211_register_unexpected_frame, |
4119 | 14205 | .policy = nl80211_policy, | ||
4120 | 14206 | .flags = GENL_UNS_ADMIN_PERM, | 14411 | .flags = GENL_UNS_ADMIN_PERM, |
4121 | 14207 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 14412 | .internal_flags = NL80211_FLAG_NEED_NETDEV | |
4122 | 14208 | NL80211_FLAG_NEED_RTNL, | 14413 | NL80211_FLAG_NEED_RTNL, |
4123 | 14209 | }, | 14414 | }, |
4124 | 14210 | { | 14415 | { |
4125 | 14211 | .cmd = NL80211_CMD_PROBE_CLIENT, | 14416 | .cmd = NL80211_CMD_PROBE_CLIENT, |
4126 | 14417 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4127 | 14418 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4128 | 14419 | #endif | ||
4129 | 14420 | |||
4130 | 14212 | .doit = nl80211_probe_client, | 14421 | .doit = nl80211_probe_client, |
4131 | 14213 | .policy = nl80211_policy, | ||
4132 | 14214 | .flags = GENL_UNS_ADMIN_PERM, | 14422 | .flags = GENL_UNS_ADMIN_PERM, |
4133 | 14215 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14423 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4134 | 14216 | NL80211_FLAG_NEED_RTNL, | 14424 | NL80211_FLAG_NEED_RTNL, |
4135 | 14217 | }, | 14425 | }, |
4136 | 14218 | { | 14426 | { |
4137 | 14219 | .cmd = NL80211_CMD_REGISTER_BEACONS, | 14427 | .cmd = NL80211_CMD_REGISTER_BEACONS, |
4138 | 14428 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4139 | 14429 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4140 | 14430 | #endif | ||
4141 | 14431 | |||
4142 | 14220 | .doit = nl80211_register_beacons, | 14432 | .doit = nl80211_register_beacons, |
4143 | 14221 | .policy = nl80211_policy, | ||
4144 | 14222 | .flags = GENL_UNS_ADMIN_PERM, | 14433 | .flags = GENL_UNS_ADMIN_PERM, |
4145 | 14223 | .internal_flags = NL80211_FLAG_NEED_WIPHY | | 14434 | .internal_flags = NL80211_FLAG_NEED_WIPHY | |
4146 | 14224 | NL80211_FLAG_NEED_RTNL, | 14435 | NL80211_FLAG_NEED_RTNL, |
4147 | 14225 | }, | 14436 | }, |
4148 | 14226 | { | 14437 | { |
4149 | 14227 | .cmd = NL80211_CMD_SET_NOACK_MAP, | 14438 | .cmd = NL80211_CMD_SET_NOACK_MAP, |
4150 | 14439 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4151 | 14440 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4152 | 14441 | #endif | ||
4153 | 14442 | |||
4154 | 14228 | .doit = nl80211_set_noack_map, | 14443 | .doit = nl80211_set_noack_map, |
4155 | 14229 | .policy = nl80211_policy, | ||
4156 | 14230 | .flags = GENL_UNS_ADMIN_PERM, | 14444 | .flags = GENL_UNS_ADMIN_PERM, |
4157 | 14231 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 14445 | .internal_flags = NL80211_FLAG_NEED_NETDEV | |
4158 | 14232 | NL80211_FLAG_NEED_RTNL, | 14446 | NL80211_FLAG_NEED_RTNL, |
4159 | 14233 | }, | 14447 | }, |
4160 | 14234 | { | 14448 | { |
4161 | 14235 | .cmd = NL80211_CMD_START_P2P_DEVICE, | 14449 | .cmd = NL80211_CMD_START_P2P_DEVICE, |
4162 | 14450 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4163 | 14451 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4164 | 14452 | #endif | ||
4165 | 14453 | |||
4166 | 14236 | .doit = nl80211_start_p2p_device, | 14454 | .doit = nl80211_start_p2p_device, |
4167 | 14237 | .policy = nl80211_policy, | ||
4168 | 14238 | .flags = GENL_UNS_ADMIN_PERM, | 14455 | .flags = GENL_UNS_ADMIN_PERM, |
4169 | 14239 | .internal_flags = NL80211_FLAG_NEED_WDEV | | 14456 | .internal_flags = NL80211_FLAG_NEED_WDEV | |
4170 | 14240 | NL80211_FLAG_NEED_RTNL, | 14457 | NL80211_FLAG_NEED_RTNL, |
4171 | 14241 | }, | 14458 | }, |
4172 | 14242 | { | 14459 | { |
4173 | 14243 | .cmd = NL80211_CMD_STOP_P2P_DEVICE, | 14460 | .cmd = NL80211_CMD_STOP_P2P_DEVICE, |
4174 | 14461 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4175 | 14462 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4176 | 14463 | #endif | ||
4177 | 14464 | |||
4178 | 14244 | .doit = nl80211_stop_p2p_device, | 14465 | .doit = nl80211_stop_p2p_device, |
4179 | 14245 | .policy = nl80211_policy, | ||
4180 | 14246 | .flags = GENL_UNS_ADMIN_PERM, | 14466 | .flags = GENL_UNS_ADMIN_PERM, |
4181 | 14247 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | | 14467 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | |
4182 | 14248 | NL80211_FLAG_NEED_RTNL, | 14468 | NL80211_FLAG_NEED_RTNL, |
4183 | 14249 | }, | 14469 | }, |
4184 | 14250 | { | 14470 | { |
4185 | 14251 | .cmd = NL80211_CMD_START_NAN, | 14471 | .cmd = NL80211_CMD_START_NAN, |
4186 | 14472 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4187 | 14473 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4188 | 14474 | #endif | ||
4189 | 14475 | |||
4190 | 14252 | .doit = nl80211_start_nan, | 14476 | .doit = nl80211_start_nan, |
4191 | 14253 | .policy = nl80211_policy, | ||
4192 | 14254 | .flags = GENL_ADMIN_PERM, | 14477 | .flags = GENL_ADMIN_PERM, |
4193 | 14255 | .internal_flags = NL80211_FLAG_NEED_WDEV | | 14478 | .internal_flags = NL80211_FLAG_NEED_WDEV | |
4194 | 14256 | NL80211_FLAG_NEED_RTNL, | 14479 | NL80211_FLAG_NEED_RTNL, |
4195 | 14257 | }, | 14480 | }, |
4196 | 14258 | { | 14481 | { |
4197 | 14259 | .cmd = NL80211_CMD_STOP_NAN, | 14482 | .cmd = NL80211_CMD_STOP_NAN, |
4198 | 14483 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4199 | 14484 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4200 | 14485 | #endif | ||
4201 | 14486 | |||
4202 | 14260 | .doit = nl80211_stop_nan, | 14487 | .doit = nl80211_stop_nan, |
4203 | 14261 | .policy = nl80211_policy, | ||
4204 | 14262 | .flags = GENL_ADMIN_PERM, | 14488 | .flags = GENL_ADMIN_PERM, |
4205 | 14263 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | | 14489 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | |
4206 | 14264 | NL80211_FLAG_NEED_RTNL, | 14490 | NL80211_FLAG_NEED_RTNL, |
4207 | 14265 | }, | 14491 | }, |
4208 | 14266 | { | 14492 | { |
4209 | 14267 | .cmd = NL80211_CMD_ADD_NAN_FUNCTION, | 14493 | .cmd = NL80211_CMD_ADD_NAN_FUNCTION, |
4210 | 14494 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4211 | 14495 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4212 | 14496 | #endif | ||
4213 | 14497 | |||
4214 | 14268 | .doit = nl80211_nan_add_func, | 14498 | .doit = nl80211_nan_add_func, |
4215 | 14269 | .policy = nl80211_policy, | ||
4216 | 14270 | .flags = GENL_ADMIN_PERM, | 14499 | .flags = GENL_ADMIN_PERM, |
4217 | 14271 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | | 14500 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | |
4218 | 14272 | NL80211_FLAG_NEED_RTNL, | 14501 | NL80211_FLAG_NEED_RTNL, |
4219 | 14273 | }, | 14502 | }, |
4220 | 14274 | { | 14503 | { |
4221 | 14275 | .cmd = NL80211_CMD_DEL_NAN_FUNCTION, | 14504 | .cmd = NL80211_CMD_DEL_NAN_FUNCTION, |
4222 | 14505 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4223 | 14506 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4224 | 14507 | #endif | ||
4225 | 14508 | |||
4226 | 14276 | .doit = nl80211_nan_del_func, | 14509 | .doit = nl80211_nan_del_func, |
4227 | 14277 | .policy = nl80211_policy, | ||
4228 | 14278 | .flags = GENL_ADMIN_PERM, | 14510 | .flags = GENL_ADMIN_PERM, |
4229 | 14279 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | | 14511 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | |
4230 | 14280 | NL80211_FLAG_NEED_RTNL, | 14512 | NL80211_FLAG_NEED_RTNL, |
4231 | 14281 | }, | 14513 | }, |
4232 | 14282 | { | 14514 | { |
4233 | 14283 | .cmd = NL80211_CMD_CHANGE_NAN_CONFIG, | 14515 | .cmd = NL80211_CMD_CHANGE_NAN_CONFIG, |
4234 | 14516 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4235 | 14517 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4236 | 14518 | #endif | ||
4237 | 14519 | |||
4238 | 14284 | .doit = nl80211_nan_change_config, | 14520 | .doit = nl80211_nan_change_config, |
4239 | 14285 | .policy = nl80211_policy, | ||
4240 | 14286 | .flags = GENL_ADMIN_PERM, | 14521 | .flags = GENL_ADMIN_PERM, |
4241 | 14287 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | | 14522 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | |
4242 | 14288 | NL80211_FLAG_NEED_RTNL, | 14523 | NL80211_FLAG_NEED_RTNL, |
4243 | 14289 | }, | 14524 | }, |
4244 | 14290 | { | 14525 | { |
4245 | 14291 | .cmd = NL80211_CMD_SET_MCAST_RATE, | 14526 | .cmd = NL80211_CMD_SET_MCAST_RATE, |
4246 | 14527 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4247 | 14528 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4248 | 14529 | #endif | ||
4249 | 14530 | |||
4250 | 14292 | .doit = nl80211_set_mcast_rate, | 14531 | .doit = nl80211_set_mcast_rate, |
4251 | 14293 | .policy = nl80211_policy, | ||
4252 | 14294 | .flags = GENL_UNS_ADMIN_PERM, | 14532 | .flags = GENL_UNS_ADMIN_PERM, |
4253 | 14295 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 14533 | .internal_flags = NL80211_FLAG_NEED_NETDEV | |
4254 | 14296 | NL80211_FLAG_NEED_RTNL, | 14534 | NL80211_FLAG_NEED_RTNL, |
4255 | 14297 | }, | 14535 | }, |
4256 | 14298 | { | 14536 | { |
4257 | 14299 | .cmd = NL80211_CMD_SET_MAC_ACL, | 14537 | .cmd = NL80211_CMD_SET_MAC_ACL, |
4258 | 14538 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4259 | 14539 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4260 | 14540 | #endif | ||
4261 | 14541 | |||
4262 | 14300 | .doit = nl80211_set_mac_acl, | 14542 | .doit = nl80211_set_mac_acl, |
4263 | 14301 | .policy = nl80211_policy, | ||
4264 | 14302 | .flags = GENL_UNS_ADMIN_PERM, | 14543 | .flags = GENL_UNS_ADMIN_PERM, |
4265 | 14303 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 14544 | .internal_flags = NL80211_FLAG_NEED_NETDEV | |
4266 | 14304 | NL80211_FLAG_NEED_RTNL, | 14545 | NL80211_FLAG_NEED_RTNL, |
4267 | 14305 | }, | 14546 | }, |
4268 | 14306 | { | 14547 | { |
4269 | 14307 | .cmd = NL80211_CMD_RADAR_DETECT, | 14548 | .cmd = NL80211_CMD_RADAR_DETECT, |
4270 | 14549 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4271 | 14550 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4272 | 14551 | #endif | ||
4273 | 14552 | |||
4274 | 14308 | .doit = nl80211_start_radar_detection, | 14553 | .doit = nl80211_start_radar_detection, |
4275 | 14309 | .policy = nl80211_policy, | ||
4276 | 14310 | .flags = GENL_UNS_ADMIN_PERM, | 14554 | .flags = GENL_UNS_ADMIN_PERM, |
4277 | 14311 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14555 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4278 | 14312 | NL80211_FLAG_NEED_RTNL, | 14556 | NL80211_FLAG_NEED_RTNL, |
4279 | 14313 | }, | 14557 | }, |
4280 | 14314 | { | 14558 | { |
4281 | 14315 | .cmd = NL80211_CMD_GET_PROTOCOL_FEATURES, | 14559 | .cmd = NL80211_CMD_GET_PROTOCOL_FEATURES, |
4282 | 14560 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4283 | 14561 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4284 | 14562 | #endif | ||
4285 | 14563 | |||
4286 | 14316 | .doit = nl80211_get_protocol_features, | 14564 | .doit = nl80211_get_protocol_features, |
4287 | 14317 | .policy = nl80211_policy, | ||
4288 | 14318 | }, | 14565 | }, |
4289 | 14319 | { | 14566 | { |
4290 | 14320 | .cmd = NL80211_CMD_UPDATE_FT_IES, | 14567 | .cmd = NL80211_CMD_UPDATE_FT_IES, |
4291 | 14568 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4292 | 14569 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4293 | 14570 | #endif | ||
4294 | 14571 | |||
4295 | 14321 | .doit = nl80211_update_ft_ies, | 14572 | .doit = nl80211_update_ft_ies, |
4296 | 14322 | .policy = nl80211_policy, | ||
4297 | 14323 | .flags = GENL_UNS_ADMIN_PERM, | 14573 | .flags = GENL_UNS_ADMIN_PERM, |
4298 | 14324 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14574 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4299 | 14325 | NL80211_FLAG_NEED_RTNL, | 14575 | NL80211_FLAG_NEED_RTNL, |
4300 | 14326 | }, | 14576 | }, |
4301 | 14327 | { | 14577 | { |
4302 | 14328 | .cmd = NL80211_CMD_CRIT_PROTOCOL_START, | 14578 | .cmd = NL80211_CMD_CRIT_PROTOCOL_START, |
4303 | 14579 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4304 | 14580 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4305 | 14581 | #endif | ||
4306 | 14582 | |||
4307 | 14329 | .doit = nl80211_crit_protocol_start, | 14583 | .doit = nl80211_crit_protocol_start, |
4308 | 14330 | .policy = nl80211_policy, | ||
4309 | 14331 | .flags = GENL_UNS_ADMIN_PERM, | 14584 | .flags = GENL_UNS_ADMIN_PERM, |
4310 | 14332 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | | 14585 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | |
4311 | 14333 | NL80211_FLAG_NEED_RTNL, | 14586 | NL80211_FLAG_NEED_RTNL, |
4312 | 14334 | }, | 14587 | }, |
4313 | 14335 | { | 14588 | { |
4314 | 14336 | .cmd = NL80211_CMD_CRIT_PROTOCOL_STOP, | 14589 | .cmd = NL80211_CMD_CRIT_PROTOCOL_STOP, |
4315 | 14590 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4316 | 14591 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4317 | 14592 | #endif | ||
4318 | 14593 | |||
4319 | 14337 | .doit = nl80211_crit_protocol_stop, | 14594 | .doit = nl80211_crit_protocol_stop, |
4320 | 14338 | .policy = nl80211_policy, | ||
4321 | 14339 | .flags = GENL_UNS_ADMIN_PERM, | 14595 | .flags = GENL_UNS_ADMIN_PERM, |
4322 | 14340 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | | 14596 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | |
4323 | 14341 | NL80211_FLAG_NEED_RTNL, | 14597 | NL80211_FLAG_NEED_RTNL, |
4324 | 14342 | }, | 14598 | }, |
4325 | 14343 | { | 14599 | { |
4326 | 14344 | .cmd = NL80211_CMD_GET_COALESCE, | 14600 | .cmd = NL80211_CMD_GET_COALESCE, |
4327 | 14601 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4328 | 14602 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4329 | 14603 | #endif | ||
4330 | 14604 | |||
4331 | 14345 | .doit = nl80211_get_coalesce, | 14605 | .doit = nl80211_get_coalesce, |
4332 | 14346 | .policy = nl80211_policy, | ||
4333 | 14347 | .internal_flags = NL80211_FLAG_NEED_WIPHY | | 14606 | .internal_flags = NL80211_FLAG_NEED_WIPHY | |
4334 | 14348 | NL80211_FLAG_NEED_RTNL, | 14607 | NL80211_FLAG_NEED_RTNL, |
4335 | 14349 | }, | 14608 | }, |
4336 | 14350 | { | 14609 | { |
4337 | 14351 | .cmd = NL80211_CMD_SET_COALESCE, | 14610 | .cmd = NL80211_CMD_SET_COALESCE, |
4338 | 14611 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4339 | 14612 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4340 | 14613 | #endif | ||
4341 | 14614 | |||
4342 | 14352 | .doit = nl80211_set_coalesce, | 14615 | .doit = nl80211_set_coalesce, |
4343 | 14353 | .policy = nl80211_policy, | ||
4344 | 14354 | .flags = GENL_UNS_ADMIN_PERM, | 14616 | .flags = GENL_UNS_ADMIN_PERM, |
4345 | 14355 | .internal_flags = NL80211_FLAG_NEED_WIPHY | | 14617 | .internal_flags = NL80211_FLAG_NEED_WIPHY | |
4346 | 14356 | NL80211_FLAG_NEED_RTNL, | 14618 | NL80211_FLAG_NEED_RTNL, |
4347 | 14357 | }, | 14619 | }, |
4348 | 14358 | { | 14620 | { |
4349 | 14359 | .cmd = NL80211_CMD_CHANNEL_SWITCH, | 14621 | .cmd = NL80211_CMD_CHANNEL_SWITCH, |
4350 | 14622 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4351 | 14623 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4352 | 14624 | #endif | ||
4353 | 14625 | |||
4354 | 14360 | .doit = nl80211_channel_switch, | 14626 | .doit = nl80211_channel_switch, |
4355 | 14361 | .policy = nl80211_policy, | ||
4356 | 14362 | .flags = GENL_UNS_ADMIN_PERM, | 14627 | .flags = GENL_UNS_ADMIN_PERM, |
4357 | 14363 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14628 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4358 | 14364 | NL80211_FLAG_NEED_RTNL, | 14629 | NL80211_FLAG_NEED_RTNL, |
4359 | 14365 | }, | 14630 | }, |
4360 | 14366 | { | 14631 | { |
4361 | 14367 | .cmd = NL80211_CMD_VENDOR, | 14632 | .cmd = NL80211_CMD_VENDOR, |
4362 | 14633 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4363 | 14634 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4364 | 14635 | #endif | ||
4365 | 14636 | |||
4366 | 14368 | .doit = nl80211_vendor_cmd, | 14637 | .doit = nl80211_vendor_cmd, |
4367 | 14369 | .dumpit = nl80211_vendor_cmd_dump, | 14638 | .dumpit = nl80211_vendor_cmd_dump, |
4368 | 14370 | .policy = nl80211_policy, | ||
4369 | 14371 | .flags = GENL_UNS_ADMIN_PERM, | 14639 | .flags = GENL_UNS_ADMIN_PERM, |
4370 | 14372 | .internal_flags = NL80211_FLAG_NEED_WIPHY | | 14640 | .internal_flags = NL80211_FLAG_NEED_WIPHY | |
4371 | 14373 | NL80211_FLAG_NEED_RTNL, | 14641 | NL80211_FLAG_NEED_RTNL, |
4372 | 14374 | }, | 14642 | }, |
4373 | 14375 | { | 14643 | { |
4374 | 14376 | .cmd = NL80211_CMD_SET_QOS_MAP, | 14644 | .cmd = NL80211_CMD_SET_QOS_MAP, |
4375 | 14645 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4376 | 14646 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4377 | 14647 | #endif | ||
4378 | 14648 | |||
4379 | 14377 | .doit = nl80211_set_qos_map, | 14649 | .doit = nl80211_set_qos_map, |
4380 | 14378 | .policy = nl80211_policy, | ||
4381 | 14379 | .flags = GENL_UNS_ADMIN_PERM, | 14650 | .flags = GENL_UNS_ADMIN_PERM, |
4382 | 14380 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14651 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4383 | 14381 | NL80211_FLAG_NEED_RTNL, | 14652 | NL80211_FLAG_NEED_RTNL, |
4384 | 14382 | }, | 14653 | }, |
4385 | 14383 | { | 14654 | { |
4386 | 14384 | .cmd = NL80211_CMD_ADD_TX_TS, | 14655 | .cmd = NL80211_CMD_ADD_TX_TS, |
4387 | 14656 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4388 | 14657 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4389 | 14658 | #endif | ||
4390 | 14659 | |||
4391 | 14385 | .doit = nl80211_add_tx_ts, | 14660 | .doit = nl80211_add_tx_ts, |
4392 | 14386 | .policy = nl80211_policy, | ||
4393 | 14387 | .flags = GENL_UNS_ADMIN_PERM, | 14661 | .flags = GENL_UNS_ADMIN_PERM, |
4394 | 14388 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14662 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4395 | 14389 | NL80211_FLAG_NEED_RTNL, | 14663 | NL80211_FLAG_NEED_RTNL, |
4396 | 14390 | }, | 14664 | }, |
4397 | 14391 | { | 14665 | { |
4398 | 14392 | .cmd = NL80211_CMD_DEL_TX_TS, | 14666 | .cmd = NL80211_CMD_DEL_TX_TS, |
4399 | 14667 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4400 | 14668 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4401 | 14669 | #endif | ||
4402 | 14670 | |||
4403 | 14393 | .doit = nl80211_del_tx_ts, | 14671 | .doit = nl80211_del_tx_ts, |
4404 | 14394 | .policy = nl80211_policy, | ||
4405 | 14395 | .flags = GENL_UNS_ADMIN_PERM, | 14672 | .flags = GENL_UNS_ADMIN_PERM, |
4406 | 14396 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14673 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4407 | 14397 | NL80211_FLAG_NEED_RTNL, | 14674 | NL80211_FLAG_NEED_RTNL, |
4408 | 14398 | }, | 14675 | }, |
4409 | 14399 | { | 14676 | { |
4410 | 14400 | .cmd = NL80211_CMD_TDLS_CHANNEL_SWITCH, | 14677 | .cmd = NL80211_CMD_TDLS_CHANNEL_SWITCH, |
4411 | 14678 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4412 | 14679 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4413 | 14680 | #endif | ||
4414 | 14681 | |||
4415 | 14401 | .doit = nl80211_tdls_channel_switch, | 14682 | .doit = nl80211_tdls_channel_switch, |
4416 | 14402 | .policy = nl80211_policy, | ||
4417 | 14403 | .flags = GENL_UNS_ADMIN_PERM, | 14683 | .flags = GENL_UNS_ADMIN_PERM, |
4418 | 14404 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14684 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4419 | 14405 | NL80211_FLAG_NEED_RTNL, | 14685 | NL80211_FLAG_NEED_RTNL, |
4420 | 14406 | }, | 14686 | }, |
4421 | 14407 | { | 14687 | { |
4422 | 14408 | .cmd = NL80211_CMD_TDLS_CANCEL_CHANNEL_SWITCH, | 14688 | .cmd = NL80211_CMD_TDLS_CANCEL_CHANNEL_SWITCH, |
4423 | 14689 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4424 | 14690 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4425 | 14691 | #endif | ||
4426 | 14692 | |||
4427 | 14409 | .doit = nl80211_tdls_cancel_channel_switch, | 14693 | .doit = nl80211_tdls_cancel_channel_switch, |
4428 | 14410 | .policy = nl80211_policy, | ||
4429 | 14411 | .flags = GENL_UNS_ADMIN_PERM, | 14694 | .flags = GENL_UNS_ADMIN_PERM, |
4430 | 14412 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14695 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4431 | 14413 | NL80211_FLAG_NEED_RTNL, | 14696 | NL80211_FLAG_NEED_RTNL, |
4432 | 14414 | }, | 14697 | }, |
4433 | 14415 | { | 14698 | { |
4434 | 14416 | .cmd = NL80211_CMD_SET_MULTICAST_TO_UNICAST, | 14699 | .cmd = NL80211_CMD_SET_MULTICAST_TO_UNICAST, |
4435 | 14700 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4436 | 14701 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4437 | 14702 | #endif | ||
4438 | 14703 | |||
4439 | 14417 | .doit = nl80211_set_multicast_to_unicast, | 14704 | .doit = nl80211_set_multicast_to_unicast, |
4440 | 14418 | .policy = nl80211_policy, | ||
4441 | 14419 | .flags = GENL_UNS_ADMIN_PERM, | 14705 | .flags = GENL_UNS_ADMIN_PERM, |
4442 | 14420 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 14706 | .internal_flags = NL80211_FLAG_NEED_NETDEV | |
4443 | 14421 | NL80211_FLAG_NEED_RTNL, | 14707 | NL80211_FLAG_NEED_RTNL, |
4444 | 14422 | }, | 14708 | }, |
4445 | 14423 | { | 14709 | { |
4446 | 14424 | .cmd = NL80211_CMD_SET_PMK, | 14710 | .cmd = NL80211_CMD_SET_PMK, |
4447 | 14711 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4448 | 14712 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4449 | 14713 | #endif | ||
4450 | 14714 | |||
4451 | 14425 | .doit = nl80211_set_pmk, | 14715 | .doit = nl80211_set_pmk, |
4452 | 14426 | .policy = nl80211_policy, | ||
4453 | 14427 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14716 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4454 | 14428 | NL80211_FLAG_NEED_RTNL, | 14717 | NL80211_FLAG_NEED_RTNL, |
4455 | 14429 | }, | 14718 | }, |
4456 | 14430 | { | 14719 | { |
4457 | 14431 | .cmd = NL80211_CMD_DEL_PMK, | 14720 | .cmd = NL80211_CMD_DEL_PMK, |
4458 | 14721 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4459 | 14722 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4460 | 14723 | #endif | ||
4461 | 14724 | |||
4462 | 14432 | .doit = nl80211_del_pmk, | 14725 | .doit = nl80211_del_pmk, |
4463 | 14433 | .policy = nl80211_policy, | ||
4464 | 14434 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14726 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4465 | 14435 | NL80211_FLAG_NEED_RTNL, | 14727 | NL80211_FLAG_NEED_RTNL, |
4466 | 14436 | }, | 14728 | }, |
4467 | 14437 | { | 14729 | { |
4468 | 14438 | .cmd = NL80211_CMD_EXTERNAL_AUTH, | 14730 | .cmd = NL80211_CMD_EXTERNAL_AUTH, |
4469 | 14731 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4470 | 14732 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4471 | 14733 | #endif | ||
4472 | 14734 | |||
4473 | 14439 | .doit = nl80211_external_auth, | 14735 | .doit = nl80211_external_auth, |
4474 | 14440 | .policy = nl80211_policy, | ||
4475 | 14441 | .flags = GENL_ADMIN_PERM, | 14736 | .flags = GENL_ADMIN_PERM, |
4476 | 14442 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14737 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4477 | 14443 | NL80211_FLAG_NEED_RTNL, | 14738 | NL80211_FLAG_NEED_RTNL, |
4478 | 14444 | }, | 14739 | }, |
4479 | 14445 | { | 14740 | { |
4480 | 14446 | .cmd = NL80211_CMD_CONTROL_PORT_FRAME, | 14741 | .cmd = NL80211_CMD_CONTROL_PORT_FRAME, |
4481 | 14742 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4482 | 14743 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4483 | 14744 | #endif | ||
4484 | 14745 | |||
4485 | 14447 | .doit = nl80211_tx_control_port, | 14746 | .doit = nl80211_tx_control_port, |
4486 | 14448 | .policy = nl80211_policy, | ||
4487 | 14449 | .flags = GENL_UNS_ADMIN_PERM, | 14747 | .flags = GENL_UNS_ADMIN_PERM, |
4488 | 14450 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14748 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4489 | 14451 | NL80211_FLAG_NEED_RTNL, | 14749 | NL80211_FLAG_NEED_RTNL, |
4490 | 14452 | }, | 14750 | }, |
4491 | 14453 | { | 14751 | { |
4492 | 14454 | .cmd = NL80211_CMD_GET_FTM_RESPONDER_STATS, | 14752 | .cmd = NL80211_CMD_GET_FTM_RESPONDER_STATS, |
4493 | 14753 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4494 | 14754 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4495 | 14755 | #endif | ||
4496 | 14756 | |||
4497 | 14455 | .doit = nl80211_get_ftm_responder_stats, | 14757 | .doit = nl80211_get_ftm_responder_stats, |
4498 | 14456 | .policy = nl80211_policy, | ||
4499 | 14457 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 14758 | .internal_flags = NL80211_FLAG_NEED_NETDEV | |
4500 | 14458 | NL80211_FLAG_NEED_RTNL, | 14759 | NL80211_FLAG_NEED_RTNL, |
4501 | 14459 | }, | 14760 | }, |
4502 | 14460 | { | 14761 | { |
4503 | 14461 | .cmd = NL80211_CMD_PEER_MEASUREMENT_START, | 14762 | .cmd = NL80211_CMD_PEER_MEASUREMENT_START, |
4504 | 14763 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4505 | 14764 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4506 | 14765 | #endif | ||
4507 | 14766 | |||
4508 | 14462 | .doit = nl80211_pmsr_start, | 14767 | .doit = nl80211_pmsr_start, |
4509 | 14463 | .policy = nl80211_policy, | ||
4510 | 14464 | .flags = GENL_UNS_ADMIN_PERM, | 14768 | .flags = GENL_UNS_ADMIN_PERM, |
4511 | 14465 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | | 14769 | .internal_flags = NL80211_FLAG_NEED_WDEV_UP | |
4512 | 14466 | NL80211_FLAG_NEED_RTNL, | 14770 | NL80211_FLAG_NEED_RTNL, |
4513 | 14467 | }, | 14771 | }, |
4514 | 14468 | { | 14772 | { |
4515 | 14469 | .cmd = NL80211_CMD_NOTIFY_RADAR, | 14773 | .cmd = NL80211_CMD_NOTIFY_RADAR, |
4516 | 14774 | #if LINUX_VERSION_IS_GEQ(5,2,0) | ||
4517 | 14775 | .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, | ||
4518 | 14776 | #endif | ||
4519 | 14777 | |||
4520 | 14470 | .doit = nl80211_notify_radar_detection, | 14778 | .doit = nl80211_notify_radar_detection, |
4521 | 14471 | .policy = nl80211_policy, | ||
4522 | 14472 | .flags = GENL_UNS_ADMIN_PERM, | 14779 | .flags = GENL_UNS_ADMIN_PERM, |
4523 | 14473 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 14780 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4524 | 14474 | NL80211_FLAG_NEED_RTNL, | 14781 | NL80211_FLAG_NEED_RTNL, |
4525 | @@ -14480,6 +14787,7 @@ static struct genl_family nl80211_fam __genl_ro_after_init = { | |||
4526 | 14480 | .hdrsize = 0, /* no private header */ | 14787 | .hdrsize = 0, /* no private header */ |
4527 | 14481 | .version = 1, /* no particular meaning now */ | 14788 | .version = 1, /* no particular meaning now */ |
4528 | 14482 | .maxattr = NL80211_ATTR_MAX, | 14789 | .maxattr = NL80211_ATTR_MAX, |
4529 | 14790 | .policy = nl80211_policy, | ||
4530 | 14483 | .netnsok = true, | 14791 | .netnsok = true, |
4531 | 14484 | .pre_doit = nl80211_pre_doit, | 14792 | .pre_doit = nl80211_pre_doit, |
4532 | 14485 | .post_doit = nl80211_post_doit, | 14793 | .post_doit = nl80211_post_doit, |
4533 | diff --git a/versions b/versions | |||
4534 | index a2de5cc..95f63c9 100644 | |||
4535 | --- a/versions | |||
4536 | +++ b/versions | |||
4537 | @@ -2,4 +2,4 @@ BACKPORTS_VERSION="(see git)" | |||
4538 | 2 | BACKPORTED_KERNEL_VERSION="(see git)" | 2 | BACKPORTED_KERNEL_VERSION="(see git)" |
4539 | 3 | BACKPORTED_KERNEL_NAME="iwlwifi" | 3 | BACKPORTED_KERNEL_NAME="iwlwifi" |
4540 | 4 | BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__ | 4 | BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__ |
4542 | 5 | BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:7858:cb17257d" | 5 | BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:7906:7773a757" |
This implies https:/ /code.launchpad .net/~canonical -hwe-team/ +git/backport- iwlwifi- dkms/+merge/ 369867, sync with debian 7906, as well.