Merge ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:for-focal/new-upstream-release-8324 into ~canonical-hwe-team/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:ubuntu/focal
- Git
- lp:~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms
- for-focal/new-upstream-release-8324
- Merge into ubuntu/focal
Proposed by
You-Sheng Yang
Status: | Merged |
---|---|
Merged at revision: | 18408d250b9b8e275ad6001bf2e7eec044fd0955 |
Proposed branch: | ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:for-focal/new-upstream-release-8324 |
Merge into: | ~canonical-hwe-team/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:ubuntu/focal |
Diff against target: |
2173 lines (+668/-269) 43 files modified
debian/backport-iwlwifi-dkms.modaliases (+6/-0) debian/changelog (+15/-0) drivers/net/wireless/intel/iwlwifi/cfg/22000.c (+60/-11) drivers/net/wireless/intel/iwlwifi/fw/acpi.c (+81/-5) drivers/net/wireless/intel/iwlwifi/fw/acpi.h (+18/-0) drivers/net/wireless/intel/iwlwifi/fw/api/config.h (+36/-3) drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h (+15/-0) drivers/net/wireless/intel/iwlwifi/fw/api/rx.h (+6/-8) drivers/net/wireless/intel/iwlwifi/fw/api/soc.h (+8/-4) drivers/net/wireless/intel/iwlwifi/fw/api/sta.h (+0/-26) drivers/net/wireless/intel/iwlwifi/fw/dbg.c (+31/-21) drivers/net/wireless/intel/iwlwifi/fw/file.h (+1/-0) drivers/net/wireless/intel/iwlwifi/iwl-config.h (+17/-6) drivers/net/wireless/intel/iwlwifi/iwl-dbg-cfg.h (+4/-2) drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c (+18/-8) drivers/net/wireless/intel/iwlwifi/iwl-drv.c (+0/-7) drivers/net/wireless/intel/iwlwifi/iwl-modparams.h (+0/-4) drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c (+7/-6) drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h (+2/-1) drivers/net/wireless/intel/iwlwifi/mvm/constants.h (+8/-0) drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c (+4/-1) drivers/net/wireless/intel/iwlwifi/mvm/fw.c (+106/-7) drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c (+3/-5) drivers/net/wireless/intel/iwlwifi/mvm/mvm.h (+0/-3) drivers/net/wireless/intel/iwlwifi/mvm/nvm.c (+2/-8) drivers/net/wireless/intel/iwlwifi/mvm/ops.c (+1/-0) drivers/net/wireless/intel/iwlwifi/mvm/scan.c (+1/-1) drivers/net/wireless/intel/iwlwifi/mvm/sta.c (+7/-3) drivers/net/wireless/intel/iwlwifi/mvm/tt.c (+6/-4) drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c (+25/-22) drivers/net/wireless/intel/iwlwifi/pcie/drv.c (+40/-7) drivers/net/wireless/intel/iwlwifi/pcie/trans.c (+1/-14) drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c (+1/-1) drivers/net/wireless/intel/iwlwifi/xvt/fw.c (+10/-5) drivers/net/wireless/intel/iwlwifi/xvt/user-infc.c (+10/-4) drivers/net/wireless/intel/iwlwifi/xvt/xvt.h (+2/-2) include/linux/ieee80211.h (+1/-2) net/mac80211/mlme.c (+56/-31) net/wireless/core.h (+1/-1) net/wireless/mlme.c (+29/-4) net/wireless/nl80211.c (+2/-1) net/wireless/scan.c (+26/-30) versions (+1/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
You-Sheng Yang | Approve | ||
Review via email: mp+377553@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/debian/backport-iwlwifi-dkms.modaliases b/debian/backport-iwlwifi-dkms.modaliases | |||
2 | index 3f4e9d7..375489c 100644 | |||
3 | --- a/debian/backport-iwlwifi-dkms.modaliases | |||
4 | +++ b/debian/backport-iwlwifi-dkms.modaliases | |||
5 | @@ -231,6 +231,9 @@ alias pci:v00008086d00002725sv*sd000000B0bc*sc*i* iwlwifi | |||
6 | 231 | alias pci:v00008086d00002725sv*sd00000310bc*sc*i* iwlwifi | 231 | alias pci:v00008086d00002725sv*sd00000310bc*sc*i* iwlwifi |
7 | 232 | alias pci:v00008086d00002725sv*sd00000510bc*sc*i* iwlwifi | 232 | alias pci:v00008086d00002725sv*sd00000510bc*sc*i* iwlwifi |
8 | 233 | alias pci:v00008086d00002725sv*sd00000A10bc*sc*i* iwlwifi | 233 | alias pci:v00008086d00002725sv*sd00000A10bc*sc*i* iwlwifi |
9 | 234 | alias pci:v00008086d00002726sv*sd00000090bc*sc*i* iwlwifi | ||
10 | 235 | alias pci:v00008086d00002726sv*sd000000B0bc*sc*i* iwlwifi | ||
11 | 236 | alias pci:v00008086d00002726sv*sd00000510bc*sc*i* iwlwifi | ||
12 | 234 | alias pci:v00008086d000030DCsv*sd*bc*sc*i* iwlwifi | 237 | alias pci:v00008086d000030DCsv*sd*bc*sc*i* iwlwifi |
13 | 235 | alias pci:v00008086d00003165sv*sd00004010bc*sc*i* iwlwifi | 238 | alias pci:v00008086d00003165sv*sd00004010bc*sc*i* iwlwifi |
14 | 236 | alias pci:v00008086d00003165sv*sd00004012bc*sc*i* iwlwifi | 239 | alias pci:v00008086d00003165sv*sd00004012bc*sc*i* iwlwifi |
15 | @@ -246,11 +249,14 @@ alias pci:v00008086d000031DCsv*sd*bc*sc*i* iwlwifi | |||
16 | 246 | alias pci:v00008086d000034F0sv*sd*bc*sc*i* iwlwifi | 249 | alias pci:v00008086d000034F0sv*sd*bc*sc*i* iwlwifi |
17 | 247 | alias pci:v00008086d00003DF0sv*sd*bc*sc*i* iwlwifi | 250 | alias pci:v00008086d00003DF0sv*sd*bc*sc*i* iwlwifi |
18 | 248 | alias pci:v00008086d000043F0sv*sd*bc*sc*i* iwlwifi | 251 | alias pci:v00008086d000043F0sv*sd*bc*sc*i* iwlwifi |
19 | 252 | alias pci:v00008086d00004DF0sv*sd*bc*sc*i* iwlwifi | ||
20 | 249 | alias pci:v00008086d00007A70sv*sd00000090bc*sc*i* iwlwifi | 253 | alias pci:v00008086d00007A70sv*sd00000090bc*sc*i* iwlwifi |
21 | 254 | alias pci:v00008086d00007A70sv*sd000000B0bc*sc*i* iwlwifi | ||
22 | 250 | alias pci:v00008086d00007A70sv*sd00000310bc*sc*i* iwlwifi | 255 | alias pci:v00008086d00007A70sv*sd00000310bc*sc*i* iwlwifi |
23 | 251 | alias pci:v00008086d00007A70sv*sd00000510bc*sc*i* iwlwifi | 256 | alias pci:v00008086d00007A70sv*sd00000510bc*sc*i* iwlwifi |
24 | 252 | alias pci:v00008086d00007A70sv*sd00000A10bc*sc*i* iwlwifi | 257 | alias pci:v00008086d00007A70sv*sd00000A10bc*sc*i* iwlwifi |
25 | 253 | alias pci:v00008086d00007AF0sv*sd00000090bc*sc*i* iwlwifi | 258 | alias pci:v00008086d00007AF0sv*sd00000090bc*sc*i* iwlwifi |
26 | 259 | alias pci:v00008086d00007AF0sv*sd000000B0bc*sc*i* iwlwifi | ||
27 | 254 | alias pci:v00008086d00007AF0sv*sd00000310bc*sc*i* iwlwifi | 260 | alias pci:v00008086d00007AF0sv*sd00000310bc*sc*i* iwlwifi |
28 | 255 | alias pci:v00008086d00007AF0sv*sd00000510bc*sc*i* iwlwifi | 261 | alias pci:v00008086d00007AF0sv*sd00000510bc*sc*i* iwlwifi |
29 | 256 | alias pci:v00008086d00007AF0sv*sd00000A10bc*sc*i* iwlwifi | 262 | alias pci:v00008086d00007AF0sv*sd00000A10bc*sc*i* iwlwifi |
30 | diff --git a/debian/changelog b/debian/changelog | |||
31 | index e6f67b1..ab4bcc3 100644 | |||
32 | --- a/debian/changelog | |||
33 | +++ b/debian/changelog | |||
34 | @@ -1,3 +1,18 @@ | |||
35 | 1 | backport-iwlwifi-dkms (8324-0ubuntu1) focal; urgency=low | ||
36 | 2 | |||
37 | 3 | * New release | ||
38 | 4 | - upstream version 8324 commit 5aa9fb548df6af. | ||
39 | 5 | - update debian/backport-iwlwifi-dkms.modaliases. | ||
40 | 6 | |||
41 | 7 | -- You-Sheng Yang <vicamo@gmail.com> Mon, 13 Jan 2020 11:28:16 +0800 | ||
42 | 8 | |||
43 | 9 | backport-iwlwifi-dkms (8292-0ubuntu1) focal; urgency=low | ||
44 | 10 | |||
45 | 11 | * New release | ||
46 | 12 | - upstream version 8292 commit cb9dfa2c338816. | ||
47 | 13 | |||
48 | 14 | -- You-Sheng Yang <vicamo@gmail.com> Thu, 09 Jan 2020 03:15:48 +0000 | ||
49 | 15 | |||
50 | 1 | backport-iwlwifi-dkms (8286-0ubuntu1) focal; urgency=low | 16 | backport-iwlwifi-dkms (8286-0ubuntu1) focal; urgency=low |
51 | 2 | 17 | ||
52 | 3 | * New release | 18 | * New release |
53 | diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c | |||
54 | index 3790c0e..944d88a 100644 | |||
55 | --- a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c | |||
56 | +++ b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c | |||
57 | @@ -6,7 +6,7 @@ | |||
58 | 6 | * GPL LICENSE SUMMARY | 6 | * GPL LICENSE SUMMARY |
59 | 7 | * | 7 | * |
60 | 8 | * Copyright(c) 2015-2017 Intel Deutschland GmbH | 8 | * Copyright(c) 2015-2017 Intel Deutschland GmbH |
62 | 9 | * Copyright (C) 2018-2019 Intel Corporation | 9 | * Copyright (C) 2018-2020 Intel Corporation |
63 | 10 | * | 10 | * |
64 | 11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
65 | 12 | * it under the terms of version 2 of the GNU General Public License as | 12 | * it under the terms of version 2 of the GNU General Public License as |
66 | @@ -20,7 +20,7 @@ | |||
67 | 20 | * BSD LICENSE | 20 | * BSD LICENSE |
68 | 21 | * | 21 | * |
69 | 22 | * Copyright(c) 2015-2017 Intel Deutschland GmbH | 22 | * Copyright(c) 2015-2017 Intel Deutschland GmbH |
71 | 23 | * Copyright (C) 2018-2019 Intel Corporation | 23 | * Copyright (C) 2018-2020 Intel Corporation |
72 | 24 | * All rights reserved. | 24 | * All rights reserved. |
73 | 25 | * | 25 | * |
74 | 26 | * Redistribution and use in source and binary forms, with or without | 26 | * Redistribution and use in source and binary forms, with or without |
75 | @@ -57,7 +57,7 @@ | |||
76 | 57 | #include "iwl-prph.h" | 57 | #include "iwl-prph.h" |
77 | 58 | 58 | ||
78 | 59 | /* Highest firmware API version supported */ | 59 | /* Highest firmware API version supported */ |
80 | 60 | #define IWL_22000_UCODE_API_MAX 54 | 60 | #define IWL_22000_UCODE_API_MAX 55 |
81 | 61 | 61 | ||
82 | 62 | /* Lowest firmware API version supported */ | 62 | /* Lowest firmware API version supported */ |
83 | 63 | #define IWL_22000_UCODE_API_MIN 39 | 63 | #define IWL_22000_UCODE_API_MIN 39 |
84 | @@ -91,7 +91,8 @@ | |||
85 | 91 | #define IWL_22000_SO_A_GF_A_FW_PRE "iwlwifi-so-a0-gf-a0-" | 91 | #define IWL_22000_SO_A_GF_A_FW_PRE "iwlwifi-so-a0-gf-a0-" |
86 | 92 | #define IWL_22000_TY_A_GF_A_FW_PRE "iwlwifi-ty-a0-gf-a0-" | 92 | #define IWL_22000_TY_A_GF_A_FW_PRE "iwlwifi-ty-a0-gf-a0-" |
87 | 93 | #define IWL_22000_SO_A_GF4_A_FW_PRE "iwlwifi-so-a0-gf4-a0-" | 93 | #define IWL_22000_SO_A_GF4_A_FW_PRE "iwlwifi-so-a0-gf4-a0-" |
89 | 94 | #define IWL_22000_SOSNJ_A_GF4_A_FW_PRE "iwlwifi-SoSnj-a0-gf4-a0-" | 94 | #define IWL_SNJ_A_GF4_A_FW_PRE "iwlwifi-SoSnj-a0-gf4-a0-" |
90 | 95 | #define IWL_SNJ_A_GF_A_FW_PRE "iwlwifi-SoSnj-a0-gf-a0-" | ||
91 | 95 | 96 | ||
92 | 96 | #define IWL_22000_HR_MODULE_FIRMWARE(api) \ | 97 | #define IWL_22000_HR_MODULE_FIRMWARE(api) \ |
93 | 97 | IWL_22000_HR_FW_PRE __stringify(api) ".ucode" | 98 | IWL_22000_HR_FW_PRE __stringify(api) ".ucode" |
94 | @@ -121,6 +122,10 @@ | |||
95 | 121 | IWL_22000_SO_A_GF_A_FW_PRE __stringify(api) ".ucode" | 122 | IWL_22000_SO_A_GF_A_FW_PRE __stringify(api) ".ucode" |
96 | 122 | #define IWL_22000_TY_A_GF_A_MODULE_FIRMWARE(api) \ | 123 | #define IWL_22000_TY_A_GF_A_MODULE_FIRMWARE(api) \ |
97 | 123 | IWL_22000_TY_A_GF_A_FW_PRE __stringify(api) ".ucode" | 124 | IWL_22000_TY_A_GF_A_FW_PRE __stringify(api) ".ucode" |
98 | 125 | #define IWL_SNJ_A_GF4_A_MODULE_FIRMWARE(api) \ | ||
99 | 126 | IWL_SNJ_A_GF4_A_FW_PRE __stringify(api) ".ucode" | ||
100 | 127 | #define IWL_SNJ_A_GF_A_MODULE_FIRMWARE(api) \ | ||
101 | 128 | IWL_SNJ_A_GF_A_FW_PRE __stringify(api) ".ucode" | ||
102 | 124 | 129 | ||
103 | 125 | static const struct iwl_base_params iwl_22000_base_params = { | 130 | static const struct iwl_base_params iwl_22000_base_params = { |
104 | 126 | .eeprom_size = OTP_LOW_IMAGE_SIZE_32K, | 131 | .eeprom_size = OTP_LOW_IMAGE_SIZE_32K, |
105 | @@ -230,6 +235,15 @@ static const struct iwl_ht_params iwl_22000_ht_params = { | |||
106 | 230 | }, \ | 235 | }, \ |
107 | 231 | } | 236 | } |
108 | 232 | 237 | ||
109 | 238 | const struct iwl_cfg_trans_params iwl_qnj_trans_cfg = { | ||
110 | 239 | .mq_rx_supported = true, | ||
111 | 240 | .use_tfh = true, | ||
112 | 241 | .rf_id = true, | ||
113 | 242 | .gen2 = true, | ||
114 | 243 | .device_family = IWL_DEVICE_FAMILY_22000, | ||
115 | 244 | .base_params = &iwl_22000_base_params, | ||
116 | 245 | }; | ||
117 | 246 | |||
118 | 233 | const struct iwl_cfg_trans_params iwl_qu_trans_cfg = { | 247 | const struct iwl_cfg_trans_params iwl_qu_trans_cfg = { |
119 | 234 | .mq_rx_supported = true, | 248 | .mq_rx_supported = true, |
120 | 235 | .use_tfh = true, | 249 | .use_tfh = true, |
121 | @@ -239,15 +253,19 @@ const struct iwl_cfg_trans_params iwl_qu_trans_cfg = { | |||
122 | 239 | .base_params = &iwl_22000_base_params, | 253 | .base_params = &iwl_22000_base_params, |
123 | 240 | .integrated = true, | 254 | .integrated = true, |
124 | 241 | .xtal_latency = 5000, | 255 | .xtal_latency = 5000, |
125 | 256 | .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_200US, | ||
126 | 242 | }; | 257 | }; |
127 | 243 | 258 | ||
129 | 244 | const struct iwl_cfg_trans_params iwl_qnj_trans_cfg = { | 259 | const struct iwl_cfg_trans_params iwl_qu_medium_latency_trans_cfg = { |
130 | 245 | .mq_rx_supported = true, | 260 | .mq_rx_supported = true, |
131 | 246 | .use_tfh = true, | 261 | .use_tfh = true, |
132 | 247 | .rf_id = true, | 262 | .rf_id = true, |
133 | 248 | .gen2 = true, | 263 | .gen2 = true, |
134 | 249 | .device_family = IWL_DEVICE_FAMILY_22000, | 264 | .device_family = IWL_DEVICE_FAMILY_22000, |
135 | 250 | .base_params = &iwl_22000_base_params, | 265 | .base_params = &iwl_22000_base_params, |
136 | 266 | .integrated = true, | ||
137 | 267 | .xtal_latency = 1820, | ||
138 | 268 | .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_1820US, | ||
139 | 251 | }; | 269 | }; |
140 | 252 | 270 | ||
141 | 253 | const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg = { | 271 | const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg = { |
142 | @@ -260,6 +278,7 @@ const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg = { | |||
143 | 260 | .integrated = true, | 278 | .integrated = true, |
144 | 261 | .xtal_latency = 12000, | 279 | .xtal_latency = 12000, |
145 | 262 | .low_latency_xtal = true, | 280 | .low_latency_xtal = true, |
146 | 281 | .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US, | ||
147 | 263 | }; | 282 | }; |
148 | 264 | 283 | ||
149 | 265 | /* | 284 | /* |
150 | @@ -521,22 +540,32 @@ const struct iwl_cfg iwlax210_2ax_cfg_so_jf_a0 = { | |||
151 | 521 | }; | 540 | }; |
152 | 522 | 541 | ||
153 | 523 | const struct iwl_cfg iwlax210_2ax_cfg_so_hr_a0 = { | 542 | const struct iwl_cfg iwlax210_2ax_cfg_so_hr_a0 = { |
155 | 524 | .name = "Intel(R) Wi-Fi 7 AX210 160MHz", | 543 | .name = "Intel(R) Wi-Fi 6 AX210 160MHz", |
156 | 525 | .fw_name_pre = IWL_22000_SO_A_HR_B_FW_PRE, | 544 | .fw_name_pre = IWL_22000_SO_A_HR_B_FW_PRE, |
157 | 526 | IWL_DEVICE_AX210, | 545 | IWL_DEVICE_AX210, |
158 | 527 | .num_rbds = IWL_NUM_RBDS_AX210_HE, | 546 | .num_rbds = IWL_NUM_RBDS_AX210_HE, |
159 | 528 | }; | 547 | }; |
160 | 529 | 548 | ||
161 | 530 | const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0 = { | 549 | const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0 = { |
163 | 531 | .name = "Intel(R) Wi-Fi 7 AX211 160MHz", | 550 | .name = "Intel(R) Wi-Fi 6 AX211 160MHz", |
164 | 551 | .fw_name_pre = IWL_22000_SO_A_GF_A_FW_PRE, | ||
165 | 552 | .uhb_supported = true, | ||
166 | 553 | IWL_DEVICE_AX210, | ||
167 | 554 | .num_rbds = IWL_NUM_RBDS_AX210_HE, | ||
168 | 555 | }; | ||
169 | 556 | |||
170 | 557 | const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0_long = { | ||
171 | 558 | .name = "Intel(R) Wi-Fi 6 AX211 160MHz", | ||
172 | 532 | .fw_name_pre = IWL_22000_SO_A_GF_A_FW_PRE, | 559 | .fw_name_pre = IWL_22000_SO_A_GF_A_FW_PRE, |
173 | 533 | .uhb_supported = true, | 560 | .uhb_supported = true, |
174 | 534 | IWL_DEVICE_AX210, | 561 | IWL_DEVICE_AX210, |
175 | 535 | .num_rbds = IWL_NUM_RBDS_AX210_HE, | 562 | .num_rbds = IWL_NUM_RBDS_AX210_HE, |
176 | 563 | .trans.xtal_latency = 12000, | ||
177 | 564 | .trans.low_latency_xtal = true, | ||
178 | 536 | }; | 565 | }; |
179 | 537 | 566 | ||
180 | 538 | const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0 = { | 567 | const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0 = { |
182 | 539 | .name = "Intel(R) Wi-Fi 7 AX210 160MHz", | 568 | .name = "Intel(R) Wi-Fi 6 AX210 160MHz", |
183 | 540 | .fw_name_pre = IWL_22000_TY_A_GF_A_FW_PRE, | 569 | .fw_name_pre = IWL_22000_TY_A_GF_A_FW_PRE, |
184 | 541 | .uhb_supported = true, | 570 | .uhb_supported = true, |
185 | 542 | IWL_DEVICE_AX210, | 571 | IWL_DEVICE_AX210, |
186 | @@ -544,16 +573,34 @@ const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0 = { | |||
187 | 544 | }; | 573 | }; |
188 | 545 | 574 | ||
189 | 546 | const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0 = { | 575 | const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0 = { |
191 | 547 | .name = "Intel(R) Wi-Fi 7 AX411 160MHz", | 576 | .name = "Intel(R) Wi-Fi 6 AX411 160MHz", |
192 | 577 | .fw_name_pre = IWL_22000_SO_A_GF4_A_FW_PRE, | ||
193 | 578 | .uhb_supported = true, | ||
194 | 579 | IWL_DEVICE_AX210, | ||
195 | 580 | .num_rbds = IWL_NUM_RBDS_AX210_HE, | ||
196 | 581 | }; | ||
197 | 582 | |||
198 | 583 | const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0_long = { | ||
199 | 584 | .name = "Intel(R) Wi-Fi 6 AX411 160MHz", | ||
200 | 548 | .fw_name_pre = IWL_22000_SO_A_GF4_A_FW_PRE, | 585 | .fw_name_pre = IWL_22000_SO_A_GF4_A_FW_PRE, |
201 | 549 | .uhb_supported = true, | 586 | .uhb_supported = true, |
202 | 550 | IWL_DEVICE_AX210, | 587 | IWL_DEVICE_AX210, |
203 | 551 | .num_rbds = IWL_NUM_RBDS_AX210_HE, | 588 | .num_rbds = IWL_NUM_RBDS_AX210_HE, |
204 | 589 | .trans.xtal_latency = 12000, | ||
205 | 590 | .trans.low_latency_xtal = true, | ||
206 | 552 | }; | 591 | }; |
207 | 553 | 592 | ||
208 | 554 | const struct iwl_cfg iwlax411_2ax_cfg_sosnj_gf4_a0 = { | 593 | const struct iwl_cfg iwlax411_2ax_cfg_sosnj_gf4_a0 = { |
211 | 555 | .name = "Intel(R) Wi-Fi 7 AX411 160MHz", | 594 | .name = "Intel(R) Wi-Fi 6 AX411 160MHz", |
212 | 556 | .fw_name_pre = IWL_22000_SOSNJ_A_GF4_A_FW_PRE, | 595 | .fw_name_pre = IWL_SNJ_A_GF4_A_FW_PRE, |
213 | 596 | .uhb_supported = true, | ||
214 | 597 | IWL_DEVICE_AX210, | ||
215 | 598 | .num_rbds = IWL_NUM_RBDS_AX210_HE, | ||
216 | 599 | }; | ||
217 | 600 | |||
218 | 601 | const struct iwl_cfg iwlax211_cfg_snj_gf_a0 = { | ||
219 | 602 | .name = "Intel(R) Wi-Fi 6 AX211 160MHz", | ||
220 | 603 | .fw_name_pre = IWL_SNJ_A_GF_A_FW_PRE, | ||
221 | 557 | .uhb_supported = true, | 604 | .uhb_supported = true, |
222 | 558 | IWL_DEVICE_AX210, | 605 | IWL_DEVICE_AX210, |
223 | 559 | .num_rbds = IWL_NUM_RBDS_AX210_HE, | 606 | .num_rbds = IWL_NUM_RBDS_AX210_HE, |
224 | @@ -572,3 +619,5 @@ MODULE_FIRMWARE(IWL_22000_SO_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | |||
225 | 572 | MODULE_FIRMWARE(IWL_22000_SO_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | 619 | MODULE_FIRMWARE(IWL_22000_SO_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); |
226 | 573 | MODULE_FIRMWARE(IWL_22000_SO_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | 620 | MODULE_FIRMWARE(IWL_22000_SO_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); |
227 | 574 | MODULE_FIRMWARE(IWL_22000_TY_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | 621 | MODULE_FIRMWARE(IWL_22000_TY_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); |
228 | 622 | MODULE_FIRMWARE(IWL_SNJ_A_GF4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | ||
229 | 623 | MODULE_FIRMWARE(IWL_SNJ_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); | ||
230 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c | |||
231 | index bdc382a..fd8ae5d 100644 | |||
232 | --- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c | |||
233 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c | |||
234 | @@ -151,6 +151,82 @@ found: | |||
235 | 151 | } | 151 | } |
236 | 152 | IWL_EXPORT_SYMBOL(iwl_acpi_get_wifi_pkg); | 152 | IWL_EXPORT_SYMBOL(iwl_acpi_get_wifi_pkg); |
237 | 153 | 153 | ||
238 | 154 | int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt, | ||
239 | 155 | __le32 *black_list_array, | ||
240 | 156 | int *black_list_size) | ||
241 | 157 | { | ||
242 | 158 | union acpi_object *wifi_pkg, *data; | ||
243 | 159 | int ret, tbl_rev, i; | ||
244 | 160 | bool enabled; | ||
245 | 161 | |||
246 | 162 | data = iwl_acpi_get_object(fwrt->dev, ACPI_WTAS_METHOD); | ||
247 | 163 | if (IS_ERR(data)) | ||
248 | 164 | return PTR_ERR(data); | ||
249 | 165 | |||
250 | 166 | wifi_pkg = iwl_acpi_get_wifi_pkg(fwrt->dev, data, | ||
251 | 167 | ACPI_WTAS_WIFI_DATA_SIZE, | ||
252 | 168 | &tbl_rev); | ||
253 | 169 | if (IS_ERR(wifi_pkg)) { | ||
254 | 170 | ret = PTR_ERR(wifi_pkg); | ||
255 | 171 | goto out_free; | ||
256 | 172 | } | ||
257 | 173 | |||
258 | 174 | if (wifi_pkg->package.elements[0].type != ACPI_TYPE_INTEGER || | ||
259 | 175 | tbl_rev != 0) { | ||
260 | 176 | ret = -EINVAL; | ||
261 | 177 | goto out_free; | ||
262 | 178 | } | ||
263 | 179 | |||
264 | 180 | enabled = !!wifi_pkg->package.elements[0].integer.value; | ||
265 | 181 | |||
266 | 182 | if (!enabled) { | ||
267 | 183 | *black_list_size = -1; | ||
268 | 184 | IWL_DEBUG_RADIO(fwrt, "TAS not enabled\n"); | ||
269 | 185 | ret = 0; | ||
270 | 186 | goto out_free; | ||
271 | 187 | } | ||
272 | 188 | |||
273 | 189 | if (wifi_pkg->package.elements[1].type != ACPI_TYPE_INTEGER || | ||
274 | 190 | wifi_pkg->package.elements[1].integer.value > | ||
275 | 191 | APCI_WTAS_BLACK_LIST_MAX) { | ||
276 | 192 | IWL_DEBUG_RADIO(fwrt, "TAS invalid array size %llu\n", | ||
277 | 193 | wifi_pkg->package.elements[1].integer.value); | ||
278 | 194 | ret = -EINVAL; | ||
279 | 195 | goto out_free; | ||
280 | 196 | } | ||
281 | 197 | *black_list_size = wifi_pkg->package.elements[1].integer.value; | ||
282 | 198 | |||
283 | 199 | IWL_DEBUG_RADIO(fwrt, "TAS array size %d\n", *black_list_size); | ||
284 | 200 | if (*black_list_size > APCI_WTAS_BLACK_LIST_MAX) { | ||
285 | 201 | IWL_DEBUG_RADIO(fwrt, "TAS invalid array size value %u\n", | ||
286 | 202 | *black_list_size); | ||
287 | 203 | ret = -EINVAL; | ||
288 | 204 | goto out_free; | ||
289 | 205 | } | ||
290 | 206 | |||
291 | 207 | for (i = 0; i < *black_list_size; i++) { | ||
292 | 208 | u32 country; | ||
293 | 209 | |||
294 | 210 | if (wifi_pkg->package.elements[2 + i].type != | ||
295 | 211 | ACPI_TYPE_INTEGER) { | ||
296 | 212 | IWL_DEBUG_RADIO(fwrt, | ||
297 | 213 | "TAS invalid array elem %d\n", 2 + i); | ||
298 | 214 | ret = -EINVAL; | ||
299 | 215 | goto out_free; | ||
300 | 216 | } | ||
301 | 217 | |||
302 | 218 | country = wifi_pkg->package.elements[2 + i].integer.value; | ||
303 | 219 | black_list_array[i] = cpu_to_le32(country); | ||
304 | 220 | IWL_DEBUG_RADIO(fwrt, "TAS black list country %d\n", country); | ||
305 | 221 | } | ||
306 | 222 | |||
307 | 223 | ret = 0; | ||
308 | 224 | out_free: | ||
309 | 225 | kfree(data); | ||
310 | 226 | return ret; | ||
311 | 227 | } | ||
312 | 228 | IWL_EXPORT_SYMBOL(iwl_acpi_get_tas); | ||
313 | 229 | |||
314 | 154 | int iwl_acpi_get_mcc(struct device *dev, char *mcc) | 230 | int iwl_acpi_get_mcc(struct device *dev, char *mcc) |
315 | 155 | { | 231 | { |
316 | 156 | union acpi_object *wifi_pkg, *data; | 232 | union acpi_object *wifi_pkg, *data; |
317 | @@ -361,8 +437,8 @@ int iwl_sar_get_ewrd_table(struct iwl_fw_runtime *fwrt) | |||
318 | 361 | { | 437 | { |
319 | 362 | union acpi_object *wifi_pkg, *data; | 438 | union acpi_object *wifi_pkg, *data; |
320 | 363 | bool enabled; | 439 | bool enabled; |
323 | 364 | int i, n_profiles, tbl_rev; | 440 | int i, n_profiles, tbl_rev, pos; |
324 | 365 | int ret = 0; | 441 | int ret = 0; |
325 | 366 | 442 | ||
326 | 367 | data = iwl_acpi_get_object(fwrt->dev, ACPI_EWRD_METHOD); | 443 | data = iwl_acpi_get_object(fwrt->dev, ACPI_EWRD_METHOD); |
327 | 368 | if (IS_ERR(data)) | 444 | if (IS_ERR(data)) |
328 | @@ -394,10 +470,10 @@ int iwl_sar_get_ewrd_table(struct iwl_fw_runtime *fwrt) | |||
329 | 394 | goto out_free; | 470 | goto out_free; |
330 | 395 | } | 471 | } |
331 | 396 | 472 | ||
335 | 397 | for (i = 0; i < n_profiles; i++) { | 473 | /* the tables start at element 3 */ |
336 | 398 | /* the tables start at element 3 */ | 474 | pos = 3; |
334 | 399 | int pos = 3; | ||
337 | 400 | 475 | ||
338 | 476 | for (i = 0; i < n_profiles; i++) { | ||
339 | 401 | /* The EWRD profiles officially go from 2 to 4, but we | 477 | /* The EWRD profiles officially go from 2 to 4, but we |
340 | 402 | * save them in sar_profiles[1-3] (because we don't | 478 | * save them in sar_profiles[1-3] (because we don't |
341 | 403 | * have profile 0). So in the array we start from 1. | 479 | * have profile 0). So in the array we start from 1. |
342 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h | |||
343 | index 4a6e826..c0a8cb6 100644 | |||
344 | --- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h | |||
345 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h | |||
346 | @@ -64,6 +64,7 @@ | |||
347 | 64 | #include "fw/api/commands.h" | 64 | #include "fw/api/commands.h" |
348 | 65 | #include "fw/api/power.h" | 65 | #include "fw/api/power.h" |
349 | 66 | #include "fw/api/phy.h" | 66 | #include "fw/api/phy.h" |
350 | 67 | #include "fw/api/nvm-reg.h" | ||
351 | 67 | #include "fw/img.h" | 68 | #include "fw/img.h" |
352 | 68 | #include "iwl-trans.h" | 69 | #include "iwl-trans.h" |
353 | 69 | 70 | ||
354 | @@ -75,6 +76,7 @@ | |||
355 | 75 | #define ACPI_SPLC_METHOD "SPLC" | 76 | #define ACPI_SPLC_METHOD "SPLC" |
356 | 76 | #define ACPI_ECKV_METHOD "ECKV" | 77 | #define ACPI_ECKV_METHOD "ECKV" |
357 | 77 | #define ACPI_PPAG_METHOD "PPAG" | 78 | #define ACPI_PPAG_METHOD "PPAG" |
358 | 79 | #define ACPI_WTAS_METHOD "WTAS" | ||
359 | 78 | 80 | ||
360 | 79 | #define ACPI_WIFI_DOMAIN (0x07) | 81 | #define ACPI_WIFI_DOMAIN (0x07) |
361 | 80 | 82 | ||
362 | @@ -96,6 +98,12 @@ | |||
363 | 96 | #define ACPI_SPLC_WIFI_DATA_SIZE 2 | 98 | #define ACPI_SPLC_WIFI_DATA_SIZE 2 |
364 | 97 | #define ACPI_ECKV_WIFI_DATA_SIZE 2 | 99 | #define ACPI_ECKV_WIFI_DATA_SIZE 2 |
365 | 98 | 100 | ||
366 | 101 | /* | ||
367 | 102 | * 1 type, 1 enabled, 1 black list size, 16 black list array | ||
368 | 103 | */ | ||
369 | 104 | #define APCI_WTAS_BLACK_LIST_MAX 16 | ||
370 | 105 | #define ACPI_WTAS_WIFI_DATA_SIZE (3 + APCI_WTAS_BLACK_LIST_MAX) | ||
371 | 106 | |||
372 | 99 | #define ACPI_WGDS_NUM_BANDS 2 | 107 | #define ACPI_WGDS_NUM_BANDS 2 |
373 | 100 | #define ACPI_WGDS_TABLE_SIZE 3 | 108 | #define ACPI_WGDS_TABLE_SIZE 3 |
374 | 101 | 109 | ||
375 | @@ -173,6 +181,10 @@ int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt, | |||
376 | 173 | 181 | ||
377 | 174 | void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, | 182 | void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, |
378 | 175 | struct iwl_per_chain_offset_group *table); | 183 | struct iwl_per_chain_offset_group *table); |
379 | 184 | |||
380 | 185 | int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt, __le32 *black_list_array, | ||
381 | 186 | int *black_list_size); | ||
382 | 187 | |||
383 | 176 | #else /* CONFIG_ACPI */ | 188 | #else /* CONFIG_ACPI */ |
384 | 177 | 189 | ||
385 | 178 | static inline void *iwl_acpi_get_object(struct device *dev, acpi_string method) | 190 | static inline void *iwl_acpi_get_object(struct device *dev, acpi_string method) |
386 | @@ -248,5 +260,11 @@ static inline void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, | |||
387 | 248 | { | 260 | { |
388 | 249 | } | 261 | } |
389 | 250 | 262 | ||
390 | 263 | static inline int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt, | ||
391 | 264 | __le32 *black_list_array, | ||
392 | 265 | int *black_list_size) | ||
393 | 266 | { | ||
394 | 267 | return -ENOENT; | ||
395 | 268 | } | ||
396 | 251 | #endif /* CONFIG_ACPI */ | 269 | #endif /* CONFIG_ACPI */ |
397 | 252 | #endif /* __iwl_fw_acpi__ */ | 270 | #endif /* __iwl_fw_acpi__ */ |
398 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/config.h b/drivers/net/wireless/intel/iwlwifi/fw/api/config.h | |||
399 | index 5e88fa2..546fa60 100644 | |||
400 | --- a/drivers/net/wireless/intel/iwlwifi/fw/api/config.h | |||
401 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/config.h | |||
402 | @@ -8,7 +8,7 @@ | |||
403 | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
404 | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
405 | 10 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH | 10 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
407 | 11 | * Copyright (C) 2018 Intel Corporation | 11 | * Copyright (C) 2018 - 2019 Intel Corporation |
408 | 12 | * | 12 | * |
409 | 13 | * 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 |
410 | 14 | * 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 |
411 | @@ -31,7 +31,7 @@ | |||
412 | 31 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. | 31 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
413 | 32 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 32 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
414 | 33 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH | 33 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
416 | 34 | * Copyright (C) 2018 Intel Corporation | 34 | * Copyright (C) 2018 - 2019 Intel Corporation |
417 | 35 | * All rights reserved. | 35 | * All rights reserved. |
418 | 36 | * | 36 | * |
419 | 37 | * Redistribution and use in source and binary forms, with or without | 37 | * Redistribution and use in source and binary forms, with or without |
420 | @@ -120,15 +120,48 @@ enum iwl_calib_cfg { | |||
421 | 120 | }; | 120 | }; |
422 | 121 | 121 | ||
423 | 122 | /** | 122 | /** |
424 | 123 | * struct iwl_phy_specific_cfg - specific PHY filter configuration | ||
425 | 124 | * | ||
426 | 125 | * Sent as part of the phy configuration command (v3) to configure specific FW | ||
427 | 126 | * defined PHY filters that can be applied to each antenna. | ||
428 | 127 | * | ||
429 | 128 | * @filter_cfg_chain_a: filter config id for LMAC1 chain A | ||
430 | 129 | * @filter_cfg_chain_b: filter config id for LMAC1 chain B | ||
431 | 130 | * @filter_cfg_chain_c: filter config id for LMAC2 chain A | ||
432 | 131 | * @filter_cfg_chain_d: filter config id for LMAC2 chain B | ||
433 | 132 | * values: 0 - no filter; 0xffffffff - reserved; otherwise - filter id | ||
434 | 133 | */ | ||
435 | 134 | struct iwl_phy_specific_cfg { | ||
436 | 135 | __le32 filter_cfg_chain_a; | ||
437 | 136 | __le32 filter_cfg_chain_b; | ||
438 | 137 | __le32 filter_cfg_chain_c; | ||
439 | 138 | __le32 filter_cfg_chain_d; | ||
440 | 139 | } __packed; /* PHY_SPECIFIC_CONFIGURATION_API_VER_1*/ | ||
441 | 140 | |||
442 | 141 | /** | ||
443 | 123 | * struct iwl_phy_cfg_cmd - Phy configuration command | 142 | * struct iwl_phy_cfg_cmd - Phy configuration command |
444 | 143 | * | ||
445 | 124 | * @phy_cfg: PHY configuration value, uses &enum iwl_fw_phy_cfg | 144 | * @phy_cfg: PHY configuration value, uses &enum iwl_fw_phy_cfg |
446 | 125 | * @calib_control: calibration control data | 145 | * @calib_control: calibration control data |
447 | 126 | */ | 146 | */ |
449 | 127 | struct iwl_phy_cfg_cmd { | 147 | struct iwl_phy_cfg_cmd_v1 { |
450 | 128 | __le32 phy_cfg; | 148 | __le32 phy_cfg; |
451 | 129 | struct iwl_calib_ctrl calib_control; | 149 | struct iwl_calib_ctrl calib_control; |
452 | 130 | } __packed; | 150 | } __packed; |
453 | 131 | 151 | ||
454 | 152 | /** | ||
455 | 153 | * struct iwl_phy_cfg_cmd_v3 - Phy configuration command (v3) | ||
456 | 154 | * | ||
457 | 155 | * @phy_cfg: PHY configuration value, uses &enum iwl_fw_phy_cfg | ||
458 | 156 | * @calib_control: calibration control data | ||
459 | 157 | * @phy_specific_cfg: configure predefined PHY filters | ||
460 | 158 | */ | ||
461 | 159 | struct iwl_phy_cfg_cmd_v3 { | ||
462 | 160 | __le32 phy_cfg; | ||
463 | 161 | struct iwl_calib_ctrl calib_control; | ||
464 | 162 | struct iwl_phy_specific_cfg phy_specific_cfg; | ||
465 | 163 | } __packed; /* PHY_CONFIGURATION_CMD_API_S_VER_3 */ | ||
466 | 164 | |||
467 | 132 | /* | 165 | /* |
468 | 133 | * enum iwl_dc2dc_config_id - flag ids | 166 | * enum iwl_dc2dc_config_id - flag ids |
469 | 134 | * | 167 | * |
470 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h b/drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h | |||
471 | index 97b4984..2d230a7 100644 | |||
472 | --- a/drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h | |||
473 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h | |||
474 | @@ -80,6 +80,11 @@ enum iwl_regulatory_and_nvm_subcmd_ids { | |||
475 | 80 | * response is &struct iwl_nvm_get_info_rsp | 80 | * response is &struct iwl_nvm_get_info_rsp |
476 | 81 | */ | 81 | */ |
477 | 82 | NVM_GET_INFO = 0x2, | 82 | NVM_GET_INFO = 0x2, |
478 | 83 | |||
479 | 84 | /** | ||
480 | 85 | * @TAS_CONFIG: &struct iwl_tas_config_cmd | ||
481 | 86 | */ | ||
482 | 87 | TAS_CONFIG = 0x3, | ||
483 | 83 | }; | 88 | }; |
484 | 84 | 89 | ||
485 | 85 | /** | 90 | /** |
486 | @@ -431,4 +436,14 @@ enum iwl_mcc_source { | |||
487 | 431 | MCC_SOURCE_GETTING_MCC_TEST_MODE = 0x11, | 436 | MCC_SOURCE_GETTING_MCC_TEST_MODE = 0x11, |
488 | 432 | }; | 437 | }; |
489 | 433 | 438 | ||
490 | 439 | #define IWL_TAS_BLACK_LIST_MAX 16 | ||
491 | 440 | /** | ||
492 | 441 | * struct iwl_tas_config_cmd - configures the TAS | ||
493 | 442 | * @black_list_size: size of relevant field in black_list_array | ||
494 | 443 | * @black_list_array: black list countries (without TAS) | ||
495 | 444 | */ | ||
496 | 445 | struct iwl_tas_config_cmd { | ||
497 | 446 | __le32 black_list_size; | ||
498 | 447 | __le32 black_list_array[IWL_TAS_BLACK_LIST_MAX]; | ||
499 | 448 | } __packed; /* TAS_CONFIG_CMD_API_S_VER_2 */ | ||
500 | 434 | #endif /* __iwl_fw_api_nvm_reg_h__ */ | 449 | #endif /* __iwl_fw_api_nvm_reg_h__ */ |
501 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h b/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | |||
502 | index b4211ac..6038b3c 100644 | |||
503 | --- a/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | |||
504 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | |||
505 | @@ -5,10 +5,9 @@ | |||
506 | 5 | * | 5 | * |
507 | 6 | * GPL LICENSE SUMMARY | 6 | * GPL LICENSE SUMMARY |
508 | 7 | * | 7 | * |
510 | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. | 8 | * Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation. All rights reserved. |
511 | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
512 | 10 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH | 10 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH |
513 | 11 | * Copyright(c) 2018 - 2019 Intel Corporation | ||
514 | 12 | * | 11 | * |
515 | 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 |
516 | 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 |
517 | @@ -28,10 +27,9 @@ | |||
518 | 28 | * | 27 | * |
519 | 29 | * BSD LICENSE | 28 | * BSD LICENSE |
520 | 30 | * | 29 | * |
522 | 31 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. | 30 | * Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation. All rights reserved. |
523 | 32 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 31 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
524 | 33 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH | 32 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH |
525 | 34 | * Copyright(c) 2018 - 2019 Intel Corporation | ||
526 | 35 | * All rights reserved. | 33 | * All rights reserved. |
527 | 36 | * | 34 | * |
528 | 37 | * Redistribution and use in source and binary forms, with or without | 35 | * Redistribution and use in source and binary forms, with or without |
529 | @@ -536,9 +534,9 @@ struct iwl_rx_mpdu_desc_v3 { | |||
530 | 536 | __le32 filter_match; | 534 | __le32 filter_match; |
531 | 537 | 535 | ||
532 | 538 | /** | 536 | /** |
534 | 539 | * @phy_data2: depends on info type (see @phy_data1) | 537 | * @phy_data3: depends on info type (see @phy_data1) |
535 | 540 | */ | 538 | */ |
537 | 541 | __le32 phy_data2; | 539 | __le32 phy_data3; |
538 | 542 | }; | 540 | }; |
539 | 543 | 541 | ||
540 | 544 | /* DW8 - carries rss_hash only when rpa_en == 1 */ | 542 | /* DW8 - carries rss_hash only when rpa_en == 1 */ |
541 | @@ -549,9 +547,9 @@ struct iwl_rx_mpdu_desc_v3 { | |||
542 | 549 | __le32 rss_hash; | 547 | __le32 rss_hash; |
543 | 550 | 548 | ||
544 | 551 | /** | 549 | /** |
546 | 552 | * @phy_data3: depends on info type (see @phy_data1) | 550 | * @phy_data2: depends on info type (see @phy_data1) |
547 | 553 | */ | 551 | */ |
549 | 554 | __le32 phy_data3; | 552 | __le32 phy_data2; |
550 | 555 | }; | 553 | }; |
551 | 556 | /* DW9 */ | 554 | /* DW9 */ |
552 | 557 | /** | 555 | /** |
553 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/soc.h b/drivers/net/wireless/intel/iwlwifi/fw/api/soc.h | |||
554 | index aadca78..0c6d7b3 100644 | |||
555 | --- a/drivers/net/wireless/intel/iwlwifi/fw/api/soc.h | |||
556 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/soc.h | |||
557 | @@ -5,10 +5,9 @@ | |||
558 | 5 | * | 5 | * |
559 | 6 | * GPL LICENSE SUMMARY | 6 | * GPL LICENSE SUMMARY |
560 | 7 | * | 7 | * |
561 | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. | ||
562 | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 8 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
563 | 10 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH | 9 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
565 | 11 | * Copyright(c) 2019 Intel Deutschland GmbH | 10 | * Copyright(c) 2012 - 2014, 2019 - 2020 Intel Corporation |
566 | 12 | * | 11 | * |
567 | 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 |
568 | 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 |
569 | @@ -28,10 +27,9 @@ | |||
570 | 28 | * | 27 | * |
571 | 29 | * BSD LICENSE | 28 | * BSD LICENSE |
572 | 30 | * | 29 | * |
573 | 31 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. | ||
574 | 32 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 30 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
575 | 33 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH | 31 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
577 | 34 | * Copyright(c) 2019 Intel Deutschland GmbH | 32 | * Copyright(c) 2012 - 2014, 2019 - 2020 Intel Corporation |
578 | 35 | * All rights reserved. | 33 | * All rights reserved. |
579 | 36 | * | 34 | * |
580 | 37 | * Redistribution and use in source and binary forms, with or without | 35 | * Redistribution and use in source and binary forms, with or without |
581 | @@ -68,6 +66,12 @@ | |||
582 | 68 | #define SOC_CONFIG_CMD_FLAGS_DISCRETE BIT(0) | 66 | #define SOC_CONFIG_CMD_FLAGS_DISCRETE BIT(0) |
583 | 69 | #define SOC_CONFIG_CMD_FLAGS_LOW_LATENCY BIT(1) | 67 | #define SOC_CONFIG_CMD_FLAGS_LOW_LATENCY BIT(1) |
584 | 70 | 68 | ||
585 | 69 | #define SOC_FLAGS_LTR_APPLY_DELAY_MASK 0xc | ||
586 | 70 | #define SOC_FLAGS_LTR_APPLY_DELAY_NONE 0 | ||
587 | 71 | #define SOC_FLAGS_LTR_APPLY_DELAY_200 1 | ||
588 | 72 | #define SOC_FLAGS_LTR_APPLY_DELAY_2500 2 | ||
589 | 73 | #define SOC_FLAGS_LTR_APPLY_DELAY_1820 3 | ||
590 | 74 | |||
591 | 71 | /** | 75 | /** |
592 | 72 | * struct iwl_soc_configuration_cmd - Set device stabilization latency | 76 | * struct iwl_soc_configuration_cmd - Set device stabilization latency |
593 | 73 | * | 77 | * |
594 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/sta.h b/drivers/net/wireless/intel/iwlwifi/fw/api/sta.h | |||
595 | index 970e9e5..c010e6f 100644 | |||
596 | --- a/drivers/net/wireless/intel/iwlwifi/fw/api/sta.h | |||
597 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/sta.h | |||
598 | @@ -245,32 +245,6 @@ enum iwl_sta_sleep_flag { | |||
599 | 245 | #define STA_KEY_LEN_WEP40 (5) | 245 | #define STA_KEY_LEN_WEP40 (5) |
600 | 246 | #define STA_KEY_LEN_WEP104 (13) | 246 | #define STA_KEY_LEN_WEP104 (13) |
601 | 247 | 247 | ||
602 | 248 | /** | ||
603 | 249 | * struct iwl_mvm_keyinfo - key information | ||
604 | 250 | * @key_flags: type &enum iwl_sta_key_flag | ||
605 | 251 | * @tkip_rx_tsc_byte2: TSC[2] for key mix ph1 detection | ||
606 | 252 | * @reserved1: reserved | ||
607 | 253 | * @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx | ||
608 | 254 | * @key_offset: key offset in the fw's key table | ||
609 | 255 | * @reserved2: reserved | ||
610 | 256 | * @key: 16-byte unicast decryption key | ||
611 | 257 | * @tx_secur_seq_cnt: initial RSC / PN needed for replay check | ||
612 | 258 | * @hw_tkip_mic_rx_key: byte: MIC Rx Key - used for TKIP only | ||
613 | 259 | * @hw_tkip_mic_tx_key: byte: MIC Tx Key - used for TKIP only | ||
614 | 260 | */ | ||
615 | 261 | struct iwl_mvm_keyinfo { | ||
616 | 262 | __le16 key_flags; | ||
617 | 263 | u8 tkip_rx_tsc_byte2; | ||
618 | 264 | u8 reserved1; | ||
619 | 265 | __le16 tkip_rx_ttak[5]; | ||
620 | 266 | u8 key_offset; | ||
621 | 267 | u8 reserved2; | ||
622 | 268 | u8 key[16]; | ||
623 | 269 | __le64 tx_secur_seq_cnt; | ||
624 | 270 | __le64 hw_tkip_mic_rx_key; | ||
625 | 271 | __le64 hw_tkip_mic_tx_key; | ||
626 | 272 | } __packed; | ||
627 | 273 | |||
628 | 274 | #define IWL_ADD_STA_STATUS_MASK 0xFF | 248 | #define IWL_ADD_STA_STATUS_MASK 0xFF |
629 | 275 | #define IWL_ADD_STA_BAID_VALID_MASK 0x8000 | 249 | #define IWL_ADD_STA_BAID_VALID_MASK 0x8000 |
630 | 276 | #define IWL_ADD_STA_BAID_MASK 0x7F00 | 250 | #define IWL_ADD_STA_BAID_MASK 0x7F00 |
631 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c | |||
632 | index 2e5d9d8..79fe672 100644 | |||
633 | --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c | |||
634 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c | |||
635 | @@ -8,7 +8,7 @@ | |||
636 | 8 | * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. | 8 | * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. |
637 | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
638 | 10 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH | 10 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH |
640 | 11 | * Copyright(c) 2018 - 2019 Intel Corporation | 11 | * Copyright(c) 2018 - 2020 Intel Corporation |
641 | 12 | * | 12 | * |
642 | 13 | * 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 |
643 | 14 | * 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 |
644 | @@ -31,7 +31,7 @@ | |||
645 | 31 | * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. | 31 | * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. |
646 | 32 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 32 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
647 | 33 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH | 33 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH |
649 | 34 | * Copyright(c) 2018 - 2019 Intel Corporation | 34 | * Copyright(c) 2018 - 2020 Intel Corporation |
650 | 35 | * All rights reserved. | 35 | * All rights reserved. |
651 | 36 | * | 36 | * |
652 | 37 | * Redistribution and use in source and binary forms, with or without | 37 | * Redistribution and use in source and binary forms, with or without |
653 | @@ -1442,11 +1442,7 @@ static int iwl_dump_ini_rxf_iter(struct iwl_fw_runtime *fwrt, | |||
654 | 1442 | goto out; | 1442 | goto out; |
655 | 1443 | } | 1443 | } |
656 | 1444 | 1444 | ||
662 | 1445 | /* | 1445 | offs = rxf_data.offset; |
658 | 1446 | * region register have absolute value so apply rxf offset after | ||
659 | 1447 | * reading the registers | ||
660 | 1448 | */ | ||
661 | 1449 | offs += rxf_data.offset; | ||
663 | 1450 | 1446 | ||
664 | 1451 | /* Lock fence */ | 1447 | /* Lock fence */ |
665 | 1452 | iwl_write_prph_no_grab(fwrt->trans, RXF_SET_FENCE_MODE + offs, 0x1); | 1448 | iwl_write_prph_no_grab(fwrt->trans, RXF_SET_FENCE_MODE + offs, 0x1); |
666 | @@ -2333,26 +2329,40 @@ IWL_EXPORT_SYMBOL(iwl_fw_dbg_collect_desc); | |||
667 | 2333 | int iwl_fw_dbg_error_collect(struct iwl_fw_runtime *fwrt, | 2329 | int iwl_fw_dbg_error_collect(struct iwl_fw_runtime *fwrt, |
668 | 2334 | enum iwl_fw_dbg_trigger trig_type) | 2330 | enum iwl_fw_dbg_trigger trig_type) |
669 | 2335 | { | 2331 | { |
670 | 2336 | int ret; | ||
671 | 2337 | struct iwl_fw_dump_desc *iwl_dump_error_desc; | ||
672 | 2338 | |||
673 | 2339 | if (!test_bit(STATUS_DEVICE_ENABLED, &fwrt->trans->status)) | 2332 | if (!test_bit(STATUS_DEVICE_ENABLED, &fwrt->trans->status)) |
674 | 2340 | return -EIO; | 2333 | return -EIO; |
675 | 2341 | 2334 | ||
679 | 2342 | iwl_dump_error_desc = kmalloc(sizeof(*iwl_dump_error_desc), GFP_KERNEL); | 2335 | if (iwl_trans_dbg_ini_valid(fwrt->trans)) { |
680 | 2343 | if (!iwl_dump_error_desc) | 2336 | if (trig_type != FW_DBG_TRIGGER_ALIVE_TIMEOUT) |
681 | 2344 | return -ENOMEM; | 2337 | return -EIO; |
682 | 2345 | 2338 | ||
685 | 2346 | iwl_dump_error_desc->trig_desc.type = cpu_to_le32(trig_type); | 2339 | iwl_dbg_tlv_time_point(fwrt, |
686 | 2347 | iwl_dump_error_desc->len = 0; | 2340 | IWL_FW_INI_TIME_POINT_HOST_ALIVE_TIMEOUT, |
687 | 2341 | NULL); | ||
688 | 2342 | } else { | ||
689 | 2343 | struct iwl_fw_dump_desc *iwl_dump_error_desc; | ||
690 | 2344 | int ret; | ||
691 | 2348 | 2345 | ||
697 | 2349 | ret = iwl_fw_dbg_collect_desc(fwrt, iwl_dump_error_desc, false, 0); | 2346 | iwl_dump_error_desc = |
698 | 2350 | if (ret) | 2347 | kmalloc(sizeof(*iwl_dump_error_desc), GFP_KERNEL); |
694 | 2351 | kfree(iwl_dump_error_desc); | ||
695 | 2352 | else | ||
696 | 2353 | iwl_trans_sync_nmi(fwrt->trans); | ||
699 | 2354 | 2348 | ||
701 | 2355 | return ret; | 2349 | if (!iwl_dump_error_desc) |
702 | 2350 | return -ENOMEM; | ||
703 | 2351 | |||
704 | 2352 | iwl_dump_error_desc->trig_desc.type = cpu_to_le32(trig_type); | ||
705 | 2353 | iwl_dump_error_desc->len = 0; | ||
706 | 2354 | |||
707 | 2355 | ret = iwl_fw_dbg_collect_desc(fwrt, iwl_dump_error_desc, | ||
708 | 2356 | false, 0); | ||
709 | 2357 | if (ret) { | ||
710 | 2358 | kfree(iwl_dump_error_desc); | ||
711 | 2359 | return ret; | ||
712 | 2360 | } | ||
713 | 2361 | } | ||
714 | 2362 | |||
715 | 2363 | iwl_trans_sync_nmi(fwrt->trans); | ||
716 | 2364 | |||
717 | 2365 | return 0; | ||
718 | 2356 | } | 2366 | } |
719 | 2357 | IWL_EXPORT_SYMBOL(iwl_fw_dbg_error_collect); | 2367 | IWL_EXPORT_SYMBOL(iwl_fw_dbg_error_collect); |
720 | 2358 | 2368 | ||
721 | diff --git a/drivers/net/wireless/intel/iwlwifi/fw/file.h b/drivers/net/wireless/intel/iwlwifi/fw/file.h | |||
722 | index ae50d23..7ed1978 100644 | |||
723 | --- a/drivers/net/wireless/intel/iwlwifi/fw/file.h | |||
724 | +++ b/drivers/net/wireless/intel/iwlwifi/fw/file.h | |||
725 | @@ -477,6 +477,7 @@ enum iwl_ucode_tlv_capa { | |||
726 | 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, |
727 | 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, |
728 | 479 | IWL_UCODE_TLV_CAPA_SET_PPAG = (__force iwl_ucode_tlv_capa_t)52, | 479 | IWL_UCODE_TLV_CAPA_SET_PPAG = (__force iwl_ucode_tlv_capa_t)52, |
729 | 480 | IWL_UCODE_TLV_CAPA_TAS_CFG = (__force iwl_ucode_tlv_capa_t)53, | ||
730 | 480 | IWL_UCODE_TLV_CAPA_SESSION_PROT_CMD = (__force iwl_ucode_tlv_capa_t)54, | 481 | IWL_UCODE_TLV_CAPA_SESSION_PROT_CMD = (__force iwl_ucode_tlv_capa_t)54, |
731 | 481 | 482 | ||
732 | 482 | /* set 2 */ | 483 | /* set 2 */ |
733 | diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h | |||
734 | index e3d6277..df28b99 100644 | |||
735 | --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h | |||
736 | +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h | |||
737 | @@ -5,9 +5,8 @@ | |||
738 | 5 | * | 5 | * |
739 | 6 | * GPL LICENSE SUMMARY | 6 | * GPL LICENSE SUMMARY |
740 | 7 | * | 7 | * |
741 | 8 | * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved. | ||
742 | 9 | * Copyright (C) 2016 - 2017 Intel Deutschland GmbH | 8 | * Copyright (C) 2016 - 2017 Intel Deutschland GmbH |
744 | 10 | * Copyright(c) 2018 - 2019 Intel Corporation | 9 | * Copyright(c) 2007 - 2014, 2018 - 2020 Intel Corporation |
745 | 11 | * | 10 | * |
746 | 12 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
747 | 13 | * it under the terms of version 2 of the GNU General Public License as | 12 | * it under the terms of version 2 of the GNU General Public License as |
748 | @@ -27,9 +26,8 @@ | |||
749 | 27 | * | 26 | * |
750 | 28 | * BSD LICENSE | 27 | * BSD LICENSE |
751 | 29 | * | 28 | * |
752 | 30 | * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. | ||
753 | 31 | * Copyright (C) 2016 - 2017 Intel Deutschland GmbH | 29 | * Copyright (C) 2016 - 2017 Intel Deutschland GmbH |
755 | 32 | * Copyright(c) 2018 - 2019 Intel Corporation | 30 | * Copyright(c) 2005 - 2014, 2018 - 2020 Intel Corporation |
756 | 33 | * All rights reserved. | 31 | * All rights reserved. |
757 | 34 | * | 32 | * |
758 | 35 | * Redistribution and use in source and binary forms, with or without | 33 | * Redistribution and use in source and binary forms, with or without |
759 | @@ -284,6 +282,13 @@ struct iwl_pwr_tx_backoff { | |||
760 | 284 | u32 backoff; | 282 | u32 backoff; |
761 | 285 | }; | 283 | }; |
762 | 286 | 284 | ||
763 | 285 | enum iwl_cfg_trans_ltr_delay { | ||
764 | 286 | IWL_CFG_TRANS_LTR_DELAY_NONE = 0, | ||
765 | 287 | IWL_CFG_TRANS_LTR_DELAY_200US = 1, | ||
766 | 288 | IWL_CFG_TRANS_LTR_DELAY_2500US = 2, | ||
767 | 289 | IWL_CFG_TRANS_LTR_DELAY_1820US = 3, | ||
768 | 290 | }; | ||
769 | 291 | |||
770 | 287 | /** | 292 | /** |
771 | 288 | * struct iwl_cfg_trans - information needed to start the trans | 293 | * struct iwl_cfg_trans - information needed to start the trans |
772 | 289 | * | 294 | * |
773 | @@ -304,6 +309,7 @@ struct iwl_pwr_tx_backoff { | |||
774 | 304 | * @mq_rx_supported: multi-queue rx support | 309 | * @mq_rx_supported: multi-queue rx support |
775 | 305 | * @integrated: discrete or integrated | 310 | * @integrated: discrete or integrated |
776 | 306 | * @low_latency_xtal: use the low latency xtal if supported | 311 | * @low_latency_xtal: use the low latency xtal if supported |
777 | 312 | * @ltr_delay: LTR delay parameter, &enum iwl_cfg_trans_ltr_delay. | ||
778 | 307 | */ | 313 | */ |
779 | 308 | struct iwl_cfg_trans_params { | 314 | struct iwl_cfg_trans_params { |
780 | 309 | const struct iwl_base_params *base_params; | 315 | const struct iwl_base_params *base_params; |
781 | @@ -317,7 +323,8 @@ struct iwl_cfg_trans_params { | |||
782 | 317 | mq_rx_supported:1, | 323 | mq_rx_supported:1, |
783 | 318 | integrated:1, | 324 | integrated:1, |
784 | 319 | low_latency_xtal:1, | 325 | low_latency_xtal:1, |
786 | 320 | bisr_workaround:1; | 326 | bisr_workaround:1, |
787 | 327 | ltr_delay:2; | ||
788 | 321 | }; | 328 | }; |
789 | 322 | 329 | ||
790 | 323 | /** | 330 | /** |
791 | @@ -506,8 +513,9 @@ struct iwl_dev_info { | |||
792 | 506 | extern const struct iwl_cfg_trans_params iwl9000_trans_cfg; | 513 | extern const struct iwl_cfg_trans_params iwl9000_trans_cfg; |
793 | 507 | extern const struct iwl_cfg_trans_params iwl9560_trans_cfg; | 514 | extern const struct iwl_cfg_trans_params iwl9560_trans_cfg; |
794 | 508 | extern const struct iwl_cfg_trans_params iwl9560_shared_clk_trans_cfg; | 515 | extern const struct iwl_cfg_trans_params iwl9560_shared_clk_trans_cfg; |
795 | 509 | extern const struct iwl_cfg_trans_params iwl_qu_trans_cfg; | ||
796 | 510 | extern const struct iwl_cfg_trans_params iwl_qnj_trans_cfg; | 516 | extern const struct iwl_cfg_trans_params iwl_qnj_trans_cfg; |
797 | 517 | extern const struct iwl_cfg_trans_params iwl_qu_trans_cfg; | ||
798 | 518 | extern const struct iwl_cfg_trans_params iwl_qu_medium_latency_trans_cfg; | ||
799 | 511 | extern const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg; | 519 | extern const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg; |
800 | 512 | extern const struct iwl_cfg_trans_params iwl_ax200_trans_cfg; | 520 | extern const struct iwl_cfg_trans_params iwl_ax200_trans_cfg; |
801 | 513 | extern const char iwl9162_name[]; | 521 | extern const char iwl9162_name[]; |
802 | @@ -580,9 +588,12 @@ extern const struct iwl_cfg iwl22000_2ax_cfg_qnj_hr_b0; | |||
803 | 580 | extern const struct iwl_cfg iwlax210_2ax_cfg_so_jf_a0; | 588 | extern const struct iwl_cfg iwlax210_2ax_cfg_so_jf_a0; |
804 | 581 | extern const struct iwl_cfg iwlax210_2ax_cfg_so_hr_a0; | 589 | extern const struct iwl_cfg iwlax210_2ax_cfg_so_hr_a0; |
805 | 582 | extern const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0; | 590 | extern const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0; |
806 | 591 | extern const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0_long; | ||
807 | 583 | extern const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0; | 592 | extern const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0; |
808 | 584 | extern const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0; | 593 | extern const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0; |
809 | 594 | extern const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0_long; | ||
810 | 585 | extern const struct iwl_cfg iwlax411_2ax_cfg_sosnj_gf4_a0; | 595 | extern const struct iwl_cfg iwlax411_2ax_cfg_sosnj_gf4_a0; |
811 | 596 | extern const struct iwl_cfg iwlax211_cfg_snj_gf_a0; | ||
812 | 586 | #endif /* CPTCFG_IWLMVM || CPTCFG_IWLFMAC */ | 597 | #endif /* CPTCFG_IWLMVM || CPTCFG_IWLFMAC */ |
813 | 587 | 598 | ||
814 | 588 | #endif /* __IWL_CONFIG_H__ */ | 599 | #endif /* __IWL_CONFIG_H__ */ |
815 | diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-cfg.h b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-cfg.h | |||
816 | index 5169648..db77bb1 100644 | |||
817 | --- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-cfg.h | |||
818 | +++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-cfg.h | |||
819 | @@ -158,6 +158,10 @@ struct iwl_dbg_cfg { | |||
820 | 158 | IWL_DBG_CFG_RANGE(u8, MVM_UAPSD_NOAGG_LIST_LEN, | 158 | IWL_DBG_CFG_RANGE(u8, MVM_UAPSD_NOAGG_LIST_LEN, |
821 | 159 | 1, IWL_MVM_UAPSD_NOAGG_BSSIDS_NUM) | 159 | 1, IWL_MVM_UAPSD_NOAGG_BSSIDS_NUM) |
822 | 160 | IWL_DBG_CFG(bool, MVM_NON_TRANSMITTING_AP) | 160 | IWL_DBG_CFG(bool, MVM_NON_TRANSMITTING_AP) |
823 | 161 | IWL_DBG_CFG(u32, MVM_PHY_FILTER_CHAIN_A) | ||
824 | 162 | IWL_DBG_CFG(u32, MVM_PHY_FILTER_CHAIN_B) | ||
825 | 163 | IWL_DBG_CFG(u32, MVM_PHY_FILTER_CHAIN_C) | ||
826 | 164 | IWL_DBG_CFG(u32, MVM_PHY_FILTER_CHAIN_D) | ||
827 | 161 | IWL_DBG_CFG(u8, MVM_QUOTA_THRESHOLD) | 165 | IWL_DBG_CFG(u8, MVM_QUOTA_THRESHOLD) |
828 | 162 | IWL_DBG_CFG(u8, MVM_RS_RSSI_BASED_INIT_RATE) | 166 | IWL_DBG_CFG(u8, MVM_RS_RSSI_BASED_INIT_RATE) |
829 | 163 | IWL_DBG_CFG(u8, MVM_RS_80_20_FAR_RANGE_TWEAK) | 167 | IWL_DBG_CFG(u8, MVM_RS_80_20_FAR_RANGE_TWEAK) |
830 | @@ -279,8 +283,6 @@ struct iwl_dbg_cfg { | |||
831 | 279 | IWL_DBG_CFG_NODEF(u16, tx_mcs_160) | 283 | IWL_DBG_CFG_NODEF(u16, tx_mcs_160) |
832 | 280 | IWL_DBG_CFG_NODEF(u32, secure_boot_cfg) | 284 | IWL_DBG_CFG_NODEF(u32, secure_boot_cfg) |
833 | 281 | IWL_MOD_PARAM(u32, uapsd_disable) | 285 | IWL_MOD_PARAM(u32, uapsd_disable) |
834 | 282 | IWL_MOD_PARAM(bool, lar_disable) | ||
835 | 283 | IWL_MOD_PARAM(bool, fw_monitor) | ||
836 | 284 | IWL_MOD_PARAM(bool, fw_restart) | 286 | IWL_MOD_PARAM(bool, fw_restart) |
837 | 285 | IWL_MOD_PARAM(bool, power_save) | 287 | IWL_MOD_PARAM(bool, power_save) |
838 | 286 | IWL_MOD_PARAM(bool, bt_coex_active) | 288 | IWL_MOD_PARAM(bool, bt_coex_active) |
839 | diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | |||
840 | index 35d1d6e..55daf92 100644 | |||
841 | --- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | |||
842 | +++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | |||
843 | @@ -5,7 +5,7 @@ | |||
844 | 5 | * | 5 | * |
845 | 6 | * GPL LICENSE SUMMARY | 6 | * GPL LICENSE SUMMARY |
846 | 7 | * | 7 | * |
848 | 8 | * Copyright (C) 2018 - 2019 Intel Corporation | 8 | * Copyright (C) 2018 - 2020 Intel Corporation |
849 | 9 | * | 9 | * |
850 | 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 |
851 | 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 |
852 | @@ -25,7 +25,7 @@ | |||
853 | 25 | * | 25 | * |
854 | 26 | * BSD LICENSE | 26 | * BSD LICENSE |
855 | 27 | * | 27 | * |
857 | 28 | * Copyright (C) 2018 - 2019 Intel Corporation | 28 | * Copyright (C) 2018 - 2020 Intel Corporation |
858 | 29 | * All rights reserved. | 29 | * All rights reserved. |
859 | 30 | * | 30 | * |
860 | 31 | * Redistribution and use in source and binary forms, with or without | 31 | * Redistribution and use in source and binary forms, with or without |
861 | @@ -167,14 +167,24 @@ static int iwl_dbg_tlv_alloc_buf_alloc(struct iwl_trans *trans, | |||
862 | 167 | 167 | ||
863 | 168 | if (le32_to_cpu(tlv->length) != sizeof(*alloc) || | 168 | if (le32_to_cpu(tlv->length) != sizeof(*alloc) || |
864 | 169 | (buf_location != IWL_FW_INI_LOCATION_SRAM_PATH && | 169 | (buf_location != IWL_FW_INI_LOCATION_SRAM_PATH && |
866 | 170 | buf_location != IWL_FW_INI_LOCATION_DRAM_PATH)) | 170 | buf_location != IWL_FW_INI_LOCATION_DRAM_PATH && |
867 | 171 | buf_location != IWL_FW_INI_LOCATION_NPK_PATH)) { | ||
868 | 172 | IWL_ERR(trans, | ||
869 | 173 | "WRT: Invalid allocation TLV\n"); | ||
870 | 174 | return -EINVAL; | ||
871 | 175 | } | ||
872 | 176 | |||
873 | 177 | if ((buf_location == IWL_FW_INI_LOCATION_SRAM_PATH || | ||
874 | 178 | buf_location == IWL_FW_INI_LOCATION_NPK_PATH) && | ||
875 | 179 | alloc_id != IWL_FW_INI_ALLOCATION_ID_DBGC1) { | ||
876 | 180 | IWL_ERR(trans, | ||
877 | 181 | "WRT: Allocation TLV for SMEM/NPK path must have id %u (current: %u)\n", | ||
878 | 182 | IWL_FW_INI_ALLOCATION_ID_DBGC1, alloc_id); | ||
879 | 171 | return -EINVAL; | 183 | return -EINVAL; |
880 | 184 | } | ||
881 | 172 | 185 | ||
887 | 173 | if ((buf_location == IWL_FW_INI_LOCATION_SRAM_PATH && | 186 | if (alloc_id == IWL_FW_INI_ALLOCATION_INVALID || |
888 | 174 | alloc_id != IWL_FW_INI_ALLOCATION_ID_DBGC1) || | 187 | alloc_id >= IWL_FW_INI_ALLOCATION_NUM) { |
884 | 175 | (buf_location == IWL_FW_INI_LOCATION_DRAM_PATH && | ||
885 | 176 | (alloc_id == IWL_FW_INI_ALLOCATION_INVALID || | ||
886 | 177 | alloc_id >= IWL_FW_INI_ALLOCATION_NUM))) { | ||
889 | 178 | IWL_ERR(trans, | 188 | IWL_ERR(trans, |
890 | 179 | "WRT: Invalid allocation id %u for allocation TLV\n", | 189 | "WRT: Invalid allocation id %u for allocation TLV\n", |
891 | 180 | alloc_id); | 190 | alloc_id); |
892 | diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c | |||
893 | index 36b8aff..6d94aee 100644 | |||
894 | --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c | |||
895 | +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c | |||
896 | @@ -2218,9 +2218,6 @@ MODULE_PARM_DESC(antenna_coupling, | |||
897 | 2218 | module_param_named(nvm_file, iwlwifi_mod_params.nvm_file, charp, 0444); | 2218 | module_param_named(nvm_file, iwlwifi_mod_params.nvm_file, charp, 0444); |
898 | 2219 | MODULE_PARM_DESC(nvm_file, "NVM file name"); | 2219 | MODULE_PARM_DESC(nvm_file, "NVM file name"); |
899 | 2220 | 2220 | ||
900 | 2221 | module_param_named(lar_disable, iwlwifi_mod_params.lar_disable, bool, 0444); | ||
901 | 2222 | MODULE_PARM_DESC(lar_disable, "disable LAR functionality (default: N)"); | ||
902 | 2223 | |||
903 | 2224 | module_param_named(uapsd_disable, iwlwifi_mod_params.uapsd_disable, uint, 0644); | 2221 | module_param_named(uapsd_disable, iwlwifi_mod_params.uapsd_disable, uint, 0644); |
904 | 2225 | MODULE_PARM_DESC(uapsd_disable, | 2222 | MODULE_PARM_DESC(uapsd_disable, |
905 | 2226 | "disable U-APSD functionality bitmap 1: BSS 2: P2P Client (default: 3)"); | 2223 | "disable U-APSD functionality bitmap 1: BSS 2: P2P Client (default: 3)"); |
906 | @@ -2261,10 +2258,6 @@ module_param_named(power_level, iwlwifi_mod_params.power_level, int, 0444); | |||
907 | 2261 | MODULE_PARM_DESC(power_level, | 2258 | MODULE_PARM_DESC(power_level, |
908 | 2262 | "default power save level (range from 1 - 5, default: 1)"); | 2259 | "default power save level (range from 1 - 5, default: 1)"); |
909 | 2263 | 2260 | ||
910 | 2264 | module_param_named(fw_monitor, iwlwifi_mod_params.fw_monitor, bool, 0444); | ||
911 | 2265 | MODULE_PARM_DESC(fw_monitor, | ||
912 | 2266 | "firmware monitor - to debug FW (default: false - needs lots of memory)"); | ||
913 | 2267 | |||
914 | 2268 | module_param_named(disable_11ac, iwlwifi_mod_params.disable_11ac, bool, 0444); | 2261 | module_param_named(disable_11ac, iwlwifi_mod_params.disable_11ac, bool, 0444); |
915 | 2269 | MODULE_PARM_DESC(disable_11ac, "Disable VHT capabilities (default: false)"); | 2262 | MODULE_PARM_DESC(disable_11ac, "Disable VHT capabilities (default: false)"); |
916 | 2270 | 2263 | ||
917 | diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h b/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h | |||
918 | index 27d2cb3..91f65ab 100644 | |||
919 | --- a/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h | |||
920 | +++ b/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h | |||
921 | @@ -116,8 +116,6 @@ enum iwl_uapsd_disable { | |||
922 | 116 | * @uapsd_disable: disable U-APSD, see &enum iwl_uapsd_disable, default = | 116 | * @uapsd_disable: disable U-APSD, see &enum iwl_uapsd_disable, default = |
923 | 117 | * IWL_DISABLE_UAPSD_BSS | IWL_DISABLE_UAPSD_P2P_CLIENT | 117 | * IWL_DISABLE_UAPSD_BSS | IWL_DISABLE_UAPSD_P2P_CLIENT |
924 | 118 | * @xvt_default_mode: xVT is the default operation mode, default = false | 118 | * @xvt_default_mode: xVT is the default operation mode, default = false |
925 | 119 | * @lar_disable: disable LAR (regulatory), default = 0 | ||
926 | 120 | * @fw_monitor: allow to use firmware monitor | ||
927 | 121 | * @disable_11ac: disable VHT capabilities, default = false. | 119 | * @disable_11ac: disable VHT capabilities, default = false. |
928 | 122 | * @disable_msix: disable MSI-X and fall back to MSI on PCIe, default = false. | 120 | * @disable_msix: disable MSI-X and fall back to MSI on PCIe, default = false. |
929 | 123 | * @remove_when_gone: remove an inaccessible device from the PCIe bus. | 121 | * @remove_when_gone: remove an inaccessible device from the PCIe bus. |
930 | @@ -141,8 +139,6 @@ struct iwl_mod_params { | |||
931 | 141 | #endif | 139 | #endif |
932 | 142 | char *nvm_file; | 140 | char *nvm_file; |
933 | 143 | u32 uapsd_disable; | 141 | u32 uapsd_disable; |
934 | 144 | bool lar_disable; | ||
935 | 145 | bool fw_monitor; | ||
936 | 146 | bool disable_11ac; | 142 | bool disable_11ac; |
937 | 147 | /** | 143 | /** |
938 | 148 | * @disable_11ax: disable HE capabilities, default = false | 144 | * @disable_11ax: disable HE capabilities, default = false |
939 | diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | |||
940 | index f8927ef..7e3e882 100644 | |||
941 | --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | |||
942 | +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | |||
943 | @@ -1125,10 +1125,11 @@ iwl_nvm_no_wide_in_5ghz(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
944 | 1125 | 1125 | ||
945 | 1126 | struct iwl_nvm_data * | 1126 | struct iwl_nvm_data * |
946 | 1127 | iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, | 1127 | iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, |
947 | 1128 | const struct iwl_fw *fw, | ||
948 | 1128 | const __be16 *nvm_hw, const __le16 *nvm_sw, | 1129 | const __be16 *nvm_hw, const __le16 *nvm_sw, |
949 | 1129 | const __le16 *nvm_calib, const __le16 *regulatory, | 1130 | const __le16 *nvm_calib, const __le16 *regulatory, |
950 | 1130 | const __le16 *mac_override, const __le16 *phy_sku, | 1131 | const __le16 *mac_override, const __le16 *phy_sku, |
952 | 1131 | u8 tx_chains, u8 rx_chains, bool lar_fw_supported) | 1132 | u8 tx_chains, u8 rx_chains) |
953 | 1132 | { | 1133 | { |
954 | 1133 | struct iwl_nvm_data *data; | 1134 | struct iwl_nvm_data *data; |
955 | 1134 | bool lar_enabled; | 1135 | bool lar_enabled; |
956 | @@ -1219,7 +1220,8 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
957 | 1219 | iwl_init_he_override(trans, &data->bands[NL80211_BAND_2GHZ]); | 1220 | iwl_init_he_override(trans, &data->bands[NL80211_BAND_2GHZ]); |
958 | 1220 | iwl_init_he_override(trans, &data->bands[NL80211_BAND_5GHZ]); | 1221 | iwl_init_he_override(trans, &data->bands[NL80211_BAND_5GHZ]); |
959 | 1221 | #endif | 1222 | #endif |
961 | 1222 | if (lar_fw_supported && lar_enabled) | 1223 | if (lar_enabled && |
962 | 1224 | fw_has_capa(&fw->ucode_capa, IWL_UCODE_TLV_CAPA_LAR_SUPPORT)) | ||
963 | 1223 | sbands_flags |= IWL_NVM_SBANDS_FLAGS_LAR; | 1225 | sbands_flags |= IWL_NVM_SBANDS_FLAGS_LAR; |
964 | 1224 | 1226 | ||
965 | 1225 | if (iwl_nvm_no_wide_in_5ghz(trans, cfg, nvm_hw)) | 1227 | if (iwl_nvm_no_wide_in_5ghz(trans, cfg, nvm_hw)) |
966 | @@ -1620,9 +1622,6 @@ struct iwl_nvm_data *iwl_get_nvm(struct iwl_trans *trans, | |||
967 | 1620 | .id = WIDE_ID(REGULATORY_AND_NVM_GROUP, NVM_GET_INFO) | 1622 | .id = WIDE_ID(REGULATORY_AND_NVM_GROUP, NVM_GET_INFO) |
968 | 1621 | }; | 1623 | }; |
969 | 1622 | int ret; | 1624 | int ret; |
970 | 1623 | bool lar_fw_supported = !iwlwifi_mod_params.lar_disable && | ||
971 | 1624 | fw_has_capa(&fw->ucode_capa, | ||
972 | 1625 | IWL_UCODE_TLV_CAPA_LAR_SUPPORT); | ||
973 | 1626 | bool empty_otp; | 1625 | bool empty_otp; |
974 | 1627 | u32 mac_flags; | 1626 | u32 mac_flags; |
975 | 1628 | u32 sbands_flags = 0; | 1627 | u32 sbands_flags = 0; |
976 | @@ -1711,7 +1710,9 @@ struct iwl_nvm_data *iwl_get_nvm(struct iwl_trans *trans, | |||
977 | 1711 | nvm->valid_tx_ant = (u8)le32_to_cpu(rsp->phy_sku.tx_chains); | 1710 | nvm->valid_tx_ant = (u8)le32_to_cpu(rsp->phy_sku.tx_chains); |
978 | 1712 | nvm->valid_rx_ant = (u8)le32_to_cpu(rsp->phy_sku.rx_chains); | 1711 | nvm->valid_rx_ant = (u8)le32_to_cpu(rsp->phy_sku.rx_chains); |
979 | 1713 | 1712 | ||
981 | 1714 | if (le32_to_cpu(rsp->regulatory.lar_enabled) && lar_fw_supported) { | 1713 | if (le32_to_cpu(rsp->regulatory.lar_enabled) && |
982 | 1714 | fw_has_capa(&fw->ucode_capa, | ||
983 | 1715 | IWL_UCODE_TLV_CAPA_LAR_SUPPORT)) { | ||
984 | 1715 | nvm->lar_enabled = true; | 1716 | nvm->lar_enabled = true; |
985 | 1716 | sbands_flags |= IWL_NVM_SBANDS_FLAGS_LAR; | 1717 | sbands_flags |= IWL_NVM_SBANDS_FLAGS_LAR; |
986 | 1717 | } | 1718 | } |
987 | diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h | |||
988 | index 4eeedb4..fb0b385 100644 | |||
989 | --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h | |||
990 | +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h | |||
991 | @@ -85,10 +85,11 @@ enum iwl_nvm_sbands_flags { | |||
992 | 85 | */ | 85 | */ |
993 | 86 | struct iwl_nvm_data * | 86 | struct iwl_nvm_data * |
994 | 87 | iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, | 87 | iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, |
995 | 88 | const struct iwl_fw *fw, | ||
996 | 88 | const __be16 *nvm_hw, const __le16 *nvm_sw, | 89 | const __be16 *nvm_hw, const __le16 *nvm_sw, |
997 | 89 | const __le16 *nvm_calib, const __le16 *regulatory, | 90 | const __le16 *nvm_calib, const __le16 *regulatory, |
998 | 90 | const __le16 *mac_override, const __le16 *phy_sku, | 91 | const __le16 *mac_override, const __le16 *phy_sku, |
1000 | 91 | u8 tx_chains, u8 rx_chains, bool lar_fw_supported); | 92 | u8 tx_chains, u8 rx_chains); |
1001 | 92 | 93 | ||
1002 | 93 | /** | 94 | /** |
1003 | 94 | * iwl_parse_mcc_info - parse MCC (mobile country code) info coming from FW | 95 | * iwl_parse_mcc_info - parse MCC (mobile country code) info coming from FW |
1004 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/constants.h b/drivers/net/wireless/intel/iwlwifi/mvm/constants.h | |||
1005 | index 77af9cd..3f512d1 100644 | |||
1006 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/constants.h | |||
1007 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/constants.h | |||
1008 | @@ -161,6 +161,10 @@ | |||
1009 | 161 | #define IWL_MVM_FTM_INITIATOR_SMOOTH_UNDERSHOOT 20016 | 161 | #define IWL_MVM_FTM_INITIATOR_SMOOTH_UNDERSHOOT 20016 |
1010 | 162 | #define IWL_MVM_FTM_INITIATOR_SMOOTH_OVERSHOOT 20016 | 162 | #define IWL_MVM_FTM_INITIATOR_SMOOTH_OVERSHOOT 20016 |
1011 | 163 | #define IWL_MVM_FTM_INITIATOR_SMOOTH_AGE_SEC 2 | 163 | #define IWL_MVM_FTM_INITIATOR_SMOOTH_AGE_SEC 2 |
1012 | 164 | #define IWL_MVM_PHY_FILTER_CHAIN_A 0 | ||
1013 | 165 | #define IWL_MVM_PHY_FILTER_CHAIN_B 0 | ||
1014 | 166 | #define IWL_MVM_PHY_FILTER_CHAIN_C 0 | ||
1015 | 167 | #define IWL_MVM_PHY_FILTER_CHAIN_D 0 | ||
1016 | 164 | #else /* CPTCFG_IWLWIFI_SUPPORT_DEBUG_OVERRIDES */ | 168 | #else /* CPTCFG_IWLWIFI_SUPPORT_DEBUG_OVERRIDES */ |
1017 | 165 | #define IWL_MVM_DEFAULT_PS_TX_DATA_TIMEOUT (mvm->trans->dbg_cfg.MVM_DEFAULT_PS_TX_DATA_TIMEOUT) | 169 | #define IWL_MVM_DEFAULT_PS_TX_DATA_TIMEOUT (mvm->trans->dbg_cfg.MVM_DEFAULT_PS_TX_DATA_TIMEOUT) |
1018 | 166 | #define IWL_MVM_DEFAULT_PS_RX_DATA_TIMEOUT (mvm->trans->dbg_cfg.MVM_DEFAULT_PS_RX_DATA_TIMEOUT) | 170 | #define IWL_MVM_DEFAULT_PS_RX_DATA_TIMEOUT (mvm->trans->dbg_cfg.MVM_DEFAULT_PS_RX_DATA_TIMEOUT) |
1019 | @@ -255,6 +259,10 @@ | |||
1020 | 255 | #define IWL_MVM_FTM_INITIATOR_SMOOTH_UNDERSHOOT (mvm->trans->dbg_cfg.MVM_FTM_INITIATOR_SMOOTH_UNDERSHOOT) | 259 | #define IWL_MVM_FTM_INITIATOR_SMOOTH_UNDERSHOOT (mvm->trans->dbg_cfg.MVM_FTM_INITIATOR_SMOOTH_UNDERSHOOT) |
1021 | 256 | #define IWL_MVM_FTM_INITIATOR_SMOOTH_OVERSHOOT (mvm->trans->dbg_cfg.MVM_FTM_INITIATOR_SMOOTH_OVERSHOOT) | 260 | #define IWL_MVM_FTM_INITIATOR_SMOOTH_OVERSHOOT (mvm->trans->dbg_cfg.MVM_FTM_INITIATOR_SMOOTH_OVERSHOOT) |
1022 | 257 | #define IWL_MVM_FTM_INITIATOR_SMOOTH_AGE_SEC (mvm->trans->dbg_cfg.MVM_FTM_INITIATOR_SMOOTH_AGE_SEC) | 261 | #define IWL_MVM_FTM_INITIATOR_SMOOTH_AGE_SEC (mvm->trans->dbg_cfg.MVM_FTM_INITIATOR_SMOOTH_AGE_SEC) |
1023 | 262 | #define IWL_MVM_PHY_FILTER_CHAIN_A (mvm->trans->dbg_cfg.MVM_PHY_FILTER_CHAIN_A) | ||
1024 | 263 | #define IWL_MVM_PHY_FILTER_CHAIN_B (mvm->trans->dbg_cfg.MVM_PHY_FILTER_CHAIN_B) | ||
1025 | 264 | #define IWL_MVM_PHY_FILTER_CHAIN_C (mvm->trans->dbg_cfg.MVM_PHY_FILTER_CHAIN_C) | ||
1026 | 265 | #define IWL_MVM_PHY_FILTER_CHAIN_D (mvm->trans->dbg_cfg.MVM_PHY_FILTER_CHAIN_D) | ||
1027 | 258 | 266 | ||
1028 | 259 | #endif /* CPTCFG_IWLWIFI_SUPPORT_DEBUG_OVERRIDES */ | 267 | #endif /* CPTCFG_IWLWIFI_SUPPORT_DEBUG_OVERRIDES */ |
1029 | 260 | 268 | ||
1030 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c | |||
1031 | index 5e88b8b..9c2db68 100644 | |||
1032 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c | |||
1033 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c | |||
1034 | @@ -8,6 +8,7 @@ | |||
1035 | 8 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH | 8 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH |
1036 | 9 | * Copyright (C) 2018 Intel Corporation | 9 | * Copyright (C) 2018 Intel Corporation |
1037 | 10 | * Copyright (C) 2019 Intel Corporation | 10 | * Copyright (C) 2019 Intel Corporation |
1038 | 11 | * Copyright (C) 2020 Intel Corporation | ||
1039 | 11 | * | 12 | * |
1040 | 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 |
1041 | 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 |
1042 | @@ -30,6 +31,7 @@ | |||
1043 | 30 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH | 31 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH |
1044 | 31 | * Copyright (C) 2018 Intel Corporation | 32 | * Copyright (C) 2018 Intel Corporation |
1045 | 32 | * Copyright (C) 2019 Intel Corporation | 33 | * Copyright (C) 2019 Intel Corporation |
1046 | 34 | * Copyright (C) 2020 Intel Corporation | ||
1047 | 33 | * All rights reserved. | 35 | * All rights reserved. |
1048 | 34 | * | 36 | * |
1049 | 35 | * Redistribution and use in source and binary forms, with or without | 37 | * Redistribution and use in source and binary forms, with or without |
1050 | @@ -599,6 +601,8 @@ void iwl_mvm_ftm_abort(struct iwl_mvm *mvm, struct cfg80211_pmsr_request *req) | |||
1051 | 599 | if (req != mvm->ftm_initiator.req) | 601 | if (req != mvm->ftm_initiator.req) |
1052 | 600 | return; | 602 | return; |
1053 | 601 | 603 | ||
1054 | 604 | iwl_mvm_ftm_reset(mvm); | ||
1055 | 605 | |||
1056 | 602 | if (iwl_mvm_send_cmd_pdu(mvm, iwl_cmd_id(TOF_RANGE_ABORT_CMD, | 606 | if (iwl_mvm_send_cmd_pdu(mvm, iwl_cmd_id(TOF_RANGE_ABORT_CMD, |
1057 | 603 | LOCATION_GROUP, 0), | 607 | LOCATION_GROUP, 0), |
1058 | 604 | 0, sizeof(cmd), &cmd)) | 608 | 0, sizeof(cmd), &cmd)) |
1059 | @@ -801,7 +805,6 @@ void iwl_mvm_ftm_range_resp(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb) | |||
1060 | 801 | lockdep_assert_held(&mvm->mutex); | 805 | lockdep_assert_held(&mvm->mutex); |
1061 | 802 | 806 | ||
1062 | 803 | if (!mvm->ftm_initiator.req) { | 807 | if (!mvm->ftm_initiator.req) { |
1063 | 804 | IWL_ERR(mvm, "Got FTM response but have no request?\n"); | ||
1064 | 805 | return; | 808 | return; |
1065 | 806 | } | 809 | } |
1066 | 807 | 810 | ||
1067 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c | |||
1068 | index d8b5137..2b041f1 100644 | |||
1069 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c | |||
1070 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c | |||
1071 | @@ -5,10 +5,9 @@ | |||
1072 | 5 | * | 5 | * |
1073 | 6 | * GPL LICENSE SUMMARY | 6 | * GPL LICENSE SUMMARY |
1074 | 7 | * | 7 | * |
1075 | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. | ||
1076 | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 8 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
1077 | 10 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH | 9 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
1079 | 11 | * Copyright(c) 2018 - 2019 Intel Corporation | 10 | * Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation |
1080 | 12 | * | 11 | * |
1081 | 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 |
1082 | 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 |
1083 | @@ -28,10 +27,9 @@ | |||
1084 | 28 | * | 27 | * |
1085 | 29 | * BSD LICENSE | 28 | * BSD LICENSE |
1086 | 30 | * | 29 | * |
1087 | 31 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. | ||
1088 | 32 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 30 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
1089 | 33 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH | 31 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
1091 | 34 | * Copyright(c) 2018 - 2019 Intel Corporation | 32 | * Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation |
1092 | 35 | * All rights reserved. | 33 | * All rights reserved. |
1093 | 36 | * | 34 | * |
1094 | 37 | * Redistribution and use in source and binary forms, with or without | 35 | * Redistribution and use in source and binary forms, with or without |
1095 | @@ -108,6 +106,20 @@ static int iwl_set_soc_latency(struct iwl_mvm *mvm) | |||
1096 | 108 | if (!mvm->trans->trans_cfg->integrated) | 106 | if (!mvm->trans->trans_cfg->integrated) |
1097 | 109 | cmd.flags = cpu_to_le32(SOC_CONFIG_CMD_FLAGS_DISCRETE); | 107 | cmd.flags = cpu_to_le32(SOC_CONFIG_CMD_FLAGS_DISCRETE); |
1098 | 110 | 108 | ||
1099 | 109 | BUILD_BUG_ON(IWL_CFG_TRANS_LTR_DELAY_NONE != | ||
1100 | 110 | SOC_FLAGS_LTR_APPLY_DELAY_NONE); | ||
1101 | 111 | BUILD_BUG_ON(IWL_CFG_TRANS_LTR_DELAY_200US != | ||
1102 | 112 | SOC_FLAGS_LTR_APPLY_DELAY_200); | ||
1103 | 113 | BUILD_BUG_ON(IWL_CFG_TRANS_LTR_DELAY_2500US != | ||
1104 | 114 | SOC_FLAGS_LTR_APPLY_DELAY_2500); | ||
1105 | 115 | BUILD_BUG_ON(IWL_CFG_TRANS_LTR_DELAY_1820US != | ||
1106 | 116 | SOC_FLAGS_LTR_APPLY_DELAY_1820); | ||
1107 | 117 | |||
1108 | 118 | if (mvm->trans->trans_cfg->ltr_delay != IWL_CFG_TRANS_LTR_DELAY_NONE && | ||
1109 | 119 | !WARN_ON(!mvm->trans->trans_cfg->integrated)) | ||
1110 | 120 | cmd.flags |= le32_encode_bits(mvm->trans->trans_cfg->ltr_delay, | ||
1111 | 121 | SOC_FLAGS_LTR_APPLY_DELAY_MASK); | ||
1112 | 122 | |||
1113 | 111 | if (iwl_fw_lookup_cmd_ver(mvm->fw, IWL_ALWAYS_LONG_GROUP, | 123 | if (iwl_fw_lookup_cmd_ver(mvm->fw, IWL_ALWAYS_LONG_GROUP, |
1114 | 112 | SCAN_REQ_UMAC) >= 2 && | 124 | SCAN_REQ_UMAC) >= 2 && |
1115 | 113 | mvm->trans->trans_cfg->low_latency_xtal) | 125 | mvm->trans->trans_cfg->low_latency_xtal) |
1116 | @@ -561,10 +573,49 @@ error: | |||
1117 | 561 | return ret; | 573 | return ret; |
1118 | 562 | } | 574 | } |
1119 | 563 | 575 | ||
1120 | 576 | #ifdef CONFIG_ACPI | ||
1121 | 577 | static void iwl_mvm_phy_filter_init(struct iwl_mvm *mvm, | ||
1122 | 578 | struct iwl_phy_specific_cfg *phy_filters) | ||
1123 | 579 | { | ||
1124 | 580 | /* | ||
1125 | 581 | * TODO: read specific phy config from BIOS | ||
1126 | 582 | * ACPI table for this feature has not been defined yet, | ||
1127 | 583 | * so for now we use hardcoded values. | ||
1128 | 584 | */ | ||
1129 | 585 | |||
1130 | 586 | if (IWL_MVM_PHY_FILTER_CHAIN_A) { | ||
1131 | 587 | phy_filters->filter_cfg_chain_a = | ||
1132 | 588 | cpu_to_le32(IWL_MVM_PHY_FILTER_CHAIN_A); | ||
1133 | 589 | } | ||
1134 | 590 | if (IWL_MVM_PHY_FILTER_CHAIN_B) { | ||
1135 | 591 | phy_filters->filter_cfg_chain_b = | ||
1136 | 592 | cpu_to_le32(IWL_MVM_PHY_FILTER_CHAIN_B); | ||
1137 | 593 | } | ||
1138 | 594 | if (IWL_MVM_PHY_FILTER_CHAIN_C) { | ||
1139 | 595 | phy_filters->filter_cfg_chain_c = | ||
1140 | 596 | cpu_to_le32(IWL_MVM_PHY_FILTER_CHAIN_C); | ||
1141 | 597 | } | ||
1142 | 598 | if (IWL_MVM_PHY_FILTER_CHAIN_D) { | ||
1143 | 599 | phy_filters->filter_cfg_chain_d = | ||
1144 | 600 | cpu_to_le32(IWL_MVM_PHY_FILTER_CHAIN_D); | ||
1145 | 601 | } | ||
1146 | 602 | } | ||
1147 | 603 | |||
1148 | 604 | #else /* CONFIG_ACPI */ | ||
1149 | 605 | |||
1150 | 606 | static void iwl_mvm_phy_filter_init(struct iwl_mvm *mvm, | ||
1151 | 607 | struct iwl_phy_specific_cfg *phy_filters) | ||
1152 | 608 | { | ||
1153 | 609 | } | ||
1154 | 610 | #endif /* CONFIG_ACPI */ | ||
1155 | 611 | |||
1156 | 564 | static int iwl_send_phy_cfg_cmd(struct iwl_mvm *mvm) | 612 | static int iwl_send_phy_cfg_cmd(struct iwl_mvm *mvm) |
1157 | 565 | { | 613 | { |
1159 | 566 | struct iwl_phy_cfg_cmd phy_cfg_cmd; | 614 | struct iwl_phy_cfg_cmd_v3 phy_cfg_cmd; |
1160 | 567 | enum iwl_ucode_type ucode_type = mvm->fwrt.cur_fw_img; | 615 | enum iwl_ucode_type ucode_type = mvm->fwrt.cur_fw_img; |
1161 | 616 | struct iwl_phy_specific_cfg phy_filters = {}; | ||
1162 | 617 | u8 cmd_ver; | ||
1163 | 618 | size_t cmd_size; | ||
1164 | 568 | #ifdef CPTCFG_IWLWIFI_SUPPORT_DEBUG_OVERRIDES | 619 | #ifdef CPTCFG_IWLWIFI_SUPPORT_DEBUG_OVERRIDES |
1165 | 569 | u32 override_mask, flow_override, flow_src; | 620 | u32 override_mask, flow_override, flow_src; |
1166 | 570 | u32 event_override, event_src; | 621 | u32 event_override, event_src; |
1167 | @@ -601,6 +652,14 @@ static int iwl_send_phy_cfg_cmd(struct iwl_mvm *mvm) | |||
1168 | 601 | phy_cfg_cmd.calib_control.flow_trigger = | 652 | phy_cfg_cmd.calib_control.flow_trigger = |
1169 | 602 | mvm->fw->default_calib[ucode_type].flow_trigger; | 653 | mvm->fw->default_calib[ucode_type].flow_trigger; |
1170 | 603 | 654 | ||
1171 | 655 | cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, IWL_ALWAYS_LONG_GROUP, | ||
1172 | 656 | PHY_CONFIGURATION_CMD); | ||
1173 | 657 | if (cmd_ver == 3) { | ||
1174 | 658 | iwl_mvm_phy_filter_init(mvm, &phy_filters); | ||
1175 | 659 | memcpy(&phy_cfg_cmd.phy_specific_cfg, &phy_filters, | ||
1176 | 660 | sizeof(struct iwl_phy_specific_cfg)); | ||
1177 | 661 | } | ||
1178 | 662 | |||
1179 | 604 | #ifdef CPTCFG_IWLWIFI_SUPPORT_DEBUG_OVERRIDES | 663 | #ifdef CPTCFG_IWLWIFI_SUPPORT_DEBUG_OVERRIDES |
1180 | 605 | override_mask = mvm->trans->dbg_cfg.MVM_CALIB_OVERRIDE_CONTROL; | 664 | override_mask = mvm->trans->dbg_cfg.MVM_CALIB_OVERRIDE_CONTROL; |
1181 | 606 | if (override_mask) { | 665 | if (override_mask) { |
1182 | @@ -669,9 +728,10 @@ static int iwl_send_phy_cfg_cmd(struct iwl_mvm *mvm) | |||
1183 | 669 | #endif | 728 | #endif |
1184 | 670 | IWL_DEBUG_INFO(mvm, "Sending Phy CFG command: 0x%x\n", | 729 | IWL_DEBUG_INFO(mvm, "Sending Phy CFG command: 0x%x\n", |
1185 | 671 | phy_cfg_cmd.phy_cfg); | 730 | phy_cfg_cmd.phy_cfg); |
1187 | 672 | 731 | cmd_size = (cmd_ver == 3) ? sizeof(struct iwl_phy_cfg_cmd_v3) : | |
1188 | 732 | sizeof(struct iwl_phy_cfg_cmd_v1); | ||
1189 | 673 | return iwl_mvm_send_cmd_pdu(mvm, PHY_CONFIGURATION_CMD, 0, | 733 | return iwl_mvm_send_cmd_pdu(mvm, PHY_CONFIGURATION_CMD, 0, |
1191 | 674 | sizeof(phy_cfg_cmd), &phy_cfg_cmd); | 734 | cmd_size, &phy_cfg_cmd); |
1192 | 675 | } | 735 | } |
1193 | 676 | 736 | ||
1194 | 677 | int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm) | 737 | int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm) |
1195 | @@ -1015,6 +1075,40 @@ static int iwl_mvm_ppag_init(struct iwl_mvm *mvm) | |||
1196 | 1015 | return iwl_mvm_ppag_send_cmd(mvm); | 1075 | return iwl_mvm_ppag_send_cmd(mvm); |
1197 | 1016 | } | 1076 | } |
1198 | 1017 | 1077 | ||
1199 | 1078 | static void iwl_mvm_tas_init(struct iwl_mvm *mvm) | ||
1200 | 1079 | { | ||
1201 | 1080 | int ret; | ||
1202 | 1081 | struct iwl_tas_config_cmd cmd = {}; | ||
1203 | 1082 | int list_size; | ||
1204 | 1083 | |||
1205 | 1084 | BUILD_BUG_ON(ARRAY_SIZE(cmd.black_list_array) < | ||
1206 | 1085 | APCI_WTAS_BLACK_LIST_MAX); | ||
1207 | 1086 | |||
1208 | 1087 | if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TAS_CFG)) { | ||
1209 | 1088 | IWL_DEBUG_RADIO(mvm, "TAS not enabled in FW\n"); | ||
1210 | 1089 | return; | ||
1211 | 1090 | } | ||
1212 | 1091 | |||
1213 | 1092 | ret = iwl_acpi_get_tas(&mvm->fwrt, cmd.black_list_array, &list_size); | ||
1214 | 1093 | if (ret < 0) { | ||
1215 | 1094 | IWL_DEBUG_RADIO(mvm, | ||
1216 | 1095 | "TAS table invalid or unavailable. (%d)\n", | ||
1217 | 1096 | ret); | ||
1218 | 1097 | return; | ||
1219 | 1098 | } | ||
1220 | 1099 | |||
1221 | 1100 | if (list_size < 0) | ||
1222 | 1101 | return; | ||
1223 | 1102 | |||
1224 | 1103 | /* list size if TAS enabled can only be non-negative */ | ||
1225 | 1104 | cmd.black_list_size = cpu_to_le32((u32)list_size); | ||
1226 | 1105 | |||
1227 | 1106 | ret = iwl_mvm_send_cmd_pdu(mvm, WIDE_ID(REGULATORY_AND_NVM_GROUP, | ||
1228 | 1107 | TAS_CONFIG), | ||
1229 | 1108 | 0, sizeof(cmd), &cmd); | ||
1230 | 1109 | if (ret < 0) | ||
1231 | 1110 | IWL_DEBUG_RADIO(mvm, "failed to send TAS_CONFIG (%d)\n", ret); | ||
1232 | 1111 | } | ||
1233 | 1018 | #else /* CONFIG_ACPI */ | 1112 | #else /* CONFIG_ACPI */ |
1234 | 1019 | 1113 | ||
1235 | 1020 | inline int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, | 1114 | inline int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, |
1236 | @@ -1042,6 +1136,10 @@ static int iwl_mvm_ppag_init(struct iwl_mvm *mvm) | |||
1237 | 1042 | { | 1136 | { |
1238 | 1043 | return 0; | 1137 | return 0; |
1239 | 1044 | } | 1138 | } |
1240 | 1139 | |||
1241 | 1140 | static void iwl_mvm_tas_init(struct iwl_mvm *mvm) | ||
1242 | 1141 | { | ||
1243 | 1142 | } | ||
1244 | 1045 | #endif /* CONFIG_ACPI */ | 1143 | #endif /* CONFIG_ACPI */ |
1245 | 1046 | 1144 | ||
1246 | 1047 | void iwl_mvm_send_recovery_cmd(struct iwl_mvm *mvm, u32 flags) | 1145 | void iwl_mvm_send_recovery_cmd(struct iwl_mvm *mvm, u32 flags) |
1247 | @@ -1448,6 +1546,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm) | |||
1248 | 1448 | if (ret < 0) | 1546 | if (ret < 0) |
1249 | 1449 | goto error; | 1547 | goto error; |
1250 | 1450 | 1548 | ||
1251 | 1549 | iwl_mvm_tas_init(mvm); | ||
1252 | 1451 | iwl_mvm_leds_sync(mvm); | 1550 | iwl_mvm_leds_sync(mvm); |
1253 | 1452 | 1551 | ||
1254 | 1453 | iwl_mvm_ftm_initiator_smooth_config(mvm); | 1552 | iwl_mvm_ftm_initiator_smooth_config(mvm); |
1255 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | |||
1256 | index 76e45ec..4343058 100644 | |||
1257 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | |||
1258 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | |||
1259 | @@ -5,10 +5,9 @@ | |||
1260 | 5 | * | 5 | * |
1261 | 6 | * GPL LICENSE SUMMARY | 6 | * GPL LICENSE SUMMARY |
1262 | 7 | * | 7 | * |
1263 | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. | ||
1264 | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 8 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
1265 | 10 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH | 9 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
1267 | 11 | * Copyright(c) 2018 - 2019 Intel Corporation | 10 | * Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation |
1268 | 12 | * | 11 | * |
1269 | 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 |
1270 | 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 |
1271 | @@ -28,10 +27,9 @@ | |||
1272 | 28 | * | 27 | * |
1273 | 29 | * BSD LICENSE | 28 | * BSD LICENSE |
1274 | 30 | * | 29 | * |
1275 | 31 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. | ||
1276 | 32 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 30 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
1277 | 33 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH | 31 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
1279 | 34 | * Copyright(c) 2018 - 2019 Intel Corporation | 32 | * Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation |
1280 | 35 | * All rights reserved. | 33 | * All rights reserved. |
1281 | 36 | * | 34 | * |
1282 | 37 | * Redistribution and use in source and binary forms, with or without | 35 | * Redistribution and use in source and binary forms, with or without |
1283 | @@ -2157,7 +2155,7 @@ static void iwl_mvm_cfg_he_sta(struct iwl_mvm *mvm, | |||
1284 | 2157 | rcu_read_lock(); | 2155 | rcu_read_lock(); |
1285 | 2158 | 2156 | ||
1286 | 2159 | sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_ctxt_cmd.sta_id]); | 2157 | sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_ctxt_cmd.sta_id]); |
1288 | 2160 | if (IS_ERR(sta)) { | 2158 | if (IS_ERR_OR_NULL(sta)) { |
1289 | 2161 | rcu_read_unlock(); | 2159 | rcu_read_unlock(); |
1290 | 2162 | WARN(1, "Can't find STA to configure HE\n"); | 2160 | WARN(1, "Can't find STA to configure HE\n"); |
1291 | 2163 | return; | 2161 | return; |
1292 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | |||
1293 | index 61853a7..b4855dc 100644 | |||
1294 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | |||
1295 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | |||
1296 | @@ -1389,9 +1389,6 @@ static inline bool iwl_mvm_is_lar_supported(struct iwl_mvm *mvm) | |||
1297 | 1389 | bool tlv_lar = fw_has_capa(&mvm->fw->ucode_capa, | 1389 | bool tlv_lar = fw_has_capa(&mvm->fw->ucode_capa, |
1298 | 1390 | IWL_UCODE_TLV_CAPA_LAR_SUPPORT); | 1390 | IWL_UCODE_TLV_CAPA_LAR_SUPPORT); |
1299 | 1391 | 1391 | ||
1300 | 1392 | if (iwlwifi_mod_params.lar_disable) | ||
1301 | 1393 | return false; | ||
1302 | 1394 | |||
1303 | 1395 | /* | 1392 | /* |
1304 | 1396 | * Enable LAR only if it is supported by the FW (TLV) && | 1393 | * Enable LAR only if it is supported by the FW (TLV) && |
1305 | 1397 | * enabled in the NVM | 1394 | * enabled in the NVM |
1306 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | |||
1307 | index 1b6b242..d2649ef 100644 | |||
1308 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | |||
1309 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | |||
1310 | @@ -277,7 +277,6 @@ iwl_parse_nvm_sections(struct iwl_mvm *mvm) | |||
1311 | 277 | struct iwl_nvm_section *sections = mvm->nvm_sections; | 277 | struct iwl_nvm_section *sections = mvm->nvm_sections; |
1312 | 278 | const __be16 *hw; | 278 | const __be16 *hw; |
1313 | 279 | const __le16 *sw, *calib, *regulatory, *mac_override, *phy_sku; | 279 | const __le16 *sw, *calib, *regulatory, *mac_override, *phy_sku; |
1314 | 280 | bool lar_enabled; | ||
1315 | 281 | int regulatory_type; | 280 | int regulatory_type; |
1316 | 282 | 281 | ||
1317 | 283 | /* Checking for required sections */ | 282 | /* Checking for required sections */ |
1318 | @@ -327,14 +326,9 @@ iwl_parse_nvm_sections(struct iwl_mvm *mvm) | |||
1319 | 327 | (const __le16 *)sections[NVM_SECTION_TYPE_REGULATORY_SDP].data : | 326 | (const __le16 *)sections[NVM_SECTION_TYPE_REGULATORY_SDP].data : |
1320 | 328 | (const __le16 *)sections[NVM_SECTION_TYPE_REGULATORY].data; | 327 | (const __le16 *)sections[NVM_SECTION_TYPE_REGULATORY].data; |
1321 | 329 | 328 | ||
1327 | 330 | lar_enabled = !iwlwifi_mod_params.lar_disable && | 329 | return iwl_parse_nvm_data(mvm->trans, mvm->cfg, mvm->fw, hw, sw, calib, |
1323 | 331 | fw_has_capa(&mvm->fw->ucode_capa, | ||
1324 | 332 | IWL_UCODE_TLV_CAPA_LAR_SUPPORT); | ||
1325 | 333 | |||
1326 | 334 | return iwl_parse_nvm_data(mvm->trans, mvm->cfg, hw, sw, calib, | ||
1328 | 335 | regulatory, mac_override, phy_sku, | 330 | regulatory, mac_override, phy_sku, |
1331 | 336 | mvm->fw->valid_tx_ant, mvm->fw->valid_rx_ant, | 331 | mvm->fw->valid_tx_ant, mvm->fw->valid_rx_ant); |
1330 | 337 | lar_enabled); | ||
1332 | 338 | } | 332 | } |
1333 | 339 | 333 | ||
1334 | 340 | /* Loads the NVM data stored in mvm->nvm_sections into the NIC */ | 334 | /* Loads the NVM data stored in mvm->nvm_sections into the NIC */ |
1335 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |||
1336 | index a0524da..f9cef76 100644 | |||
1337 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |||
1338 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |||
1339 | @@ -566,6 +566,7 @@ static const struct iwl_hcmd_names iwl_mvm_prot_offload_names[] = { | |||
1340 | 566 | static const struct iwl_hcmd_names iwl_mvm_regulatory_and_nvm_names[] = { | 566 | static const struct iwl_hcmd_names iwl_mvm_regulatory_and_nvm_names[] = { |
1341 | 567 | HCMD_NAME(NVM_ACCESS_COMPLETE), | 567 | HCMD_NAME(NVM_ACCESS_COMPLETE), |
1342 | 568 | HCMD_NAME(NVM_GET_INFO), | 568 | HCMD_NAME(NVM_GET_INFO), |
1343 | 569 | HCMD_NAME(TAS_CONFIG), | ||
1344 | 569 | }; | 570 | }; |
1345 | 570 | 571 | ||
1346 | 571 | static const struct iwl_hcmd_arr iwl_mvm_groups[] = { | 572 | static const struct iwl_hcmd_arr iwl_mvm_groups[] = { |
1347 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c | |||
1348 | index 98e1a85..696d70f 100644 | |||
1349 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c | |||
1350 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c | |||
1351 | @@ -1233,7 +1233,7 @@ static int iwl_mvm_legacy_config_scan(struct iwl_mvm *mvm) | |||
1352 | 1233 | cmd_size = sizeof(struct iwl_scan_config_v2); | 1233 | cmd_size = sizeof(struct iwl_scan_config_v2); |
1353 | 1234 | else | 1234 | else |
1354 | 1235 | cmd_size = sizeof(struct iwl_scan_config_v1); | 1235 | cmd_size = sizeof(struct iwl_scan_config_v1); |
1356 | 1236 | cmd_size += num_channels; | 1236 | cmd_size += mvm->fw->ucode_capa.n_scan_channels; |
1357 | 1237 | 1237 | ||
1358 | 1238 | cfg = kzalloc(cmd_size, GFP_KERNEL); | 1238 | cfg = kzalloc(cmd_size, GFP_KERNEL); |
1359 | 1239 | if (!cfg) | 1239 | if (!cfg) |
1360 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c | |||
1361 | index 3db864a..04e1e08 100644 | |||
1362 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c | |||
1363 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c | |||
1364 | @@ -3322,6 +3322,10 @@ static int iwl_mvm_send_sta_igtk(struct iwl_mvm *mvm, | |||
1365 | 3322 | igtk_cmd.sta_id = cpu_to_le32(sta_id); | 3322 | igtk_cmd.sta_id = cpu_to_le32(sta_id); |
1366 | 3323 | 3323 | ||
1367 | 3324 | if (remove_key) { | 3324 | if (remove_key) { |
1368 | 3325 | /* This is a valid situation for IGTK */ | ||
1369 | 3326 | if (sta_id == IWL_MVM_INVALID_STA) | ||
1370 | 3327 | return 0; | ||
1371 | 3328 | |||
1372 | 3325 | igtk_cmd.ctrl_flags |= cpu_to_le32(STA_KEY_NOT_VALID); | 3329 | igtk_cmd.ctrl_flags |= cpu_to_le32(STA_KEY_NOT_VALID); |
1373 | 3326 | } else { | 3330 | } else { |
1374 | 3327 | struct ieee80211_key_seq seq; | 3331 | struct ieee80211_key_seq seq; |
1375 | @@ -3576,9 +3580,9 @@ int iwl_mvm_remove_sta_key(struct iwl_mvm *mvm, | |||
1376 | 3576 | IWL_DEBUG_WEP(mvm, "mvm remove dynamic key: idx=%d sta=%d\n", | 3580 | IWL_DEBUG_WEP(mvm, "mvm remove dynamic key: idx=%d sta=%d\n", |
1377 | 3577 | keyconf->keyidx, sta_id); | 3581 | keyconf->keyidx, sta_id); |
1378 | 3578 | 3582 | ||
1382 | 3579 | if (mvm_sta && (keyconf->cipher == WLAN_CIPHER_SUITE_AES_CMAC || | 3583 | if (keyconf->cipher == WLAN_CIPHER_SUITE_AES_CMAC || |
1383 | 3580 | keyconf->cipher == WLAN_CIPHER_SUITE_BIP_GMAC_128 || | 3584 | keyconf->cipher == WLAN_CIPHER_SUITE_BIP_GMAC_128 || |
1384 | 3581 | keyconf->cipher == WLAN_CIPHER_SUITE_BIP_GMAC_256)) | 3585 | keyconf->cipher == WLAN_CIPHER_SUITE_BIP_GMAC_256) |
1385 | 3582 | return iwl_mvm_send_sta_igtk(mvm, keyconf, sta_id, true); | 3586 | return iwl_mvm_send_sta_igtk(mvm, keyconf, sta_id, true); |
1386 | 3583 | 3587 | ||
1387 | 3584 | if (!__test_and_clear_bit(keyconf->hw_key_idx, mvm->fw_key_table)) { | 3588 | if (!__test_and_clear_bit(keyconf->hw_key_idx, mvm->fw_key_table)) { |
1388 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c | |||
1389 | index b5a16f0..418e59b 100644 | |||
1390 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c | |||
1391 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c | |||
1392 | @@ -8,7 +8,7 @@ | |||
1393 | 8 | * Copyright(c) 2013 - 2014, 2019 Intel Corporation. All rights reserved. | 8 | * Copyright(c) 2013 - 2014, 2019 Intel Corporation. All rights reserved. |
1394 | 9 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH | 9 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH |
1395 | 10 | * Copyright(c) 2015 - 2016 Intel Deutschland GmbH | 10 | * Copyright(c) 2015 - 2016 Intel Deutschland GmbH |
1397 | 11 | * Copyright(c) 2019 Intel Corporation | 11 | * Copyright(c) 2019 - 2020 Intel Corporation |
1398 | 12 | * | 12 | * |
1399 | 13 | * 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 |
1400 | 14 | * 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 |
1401 | @@ -31,7 +31,7 @@ | |||
1402 | 31 | * Copyright(c) 2012 - 2014, 2019 Intel Corporation. All rights reserved. | 31 | * Copyright(c) 2012 - 2014, 2019 Intel Corporation. All rights reserved. |
1403 | 32 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH | 32 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH |
1404 | 33 | * Copyright(c) 2015 - 2016 Intel Deutschland GmbH | 33 | * Copyright(c) 2015 - 2016 Intel Deutschland GmbH |
1406 | 34 | * Copyright(c) 2019 Intel Corporation | 34 | * Copyright(c) 2019 - 2020 Intel Corporation |
1407 | 35 | * All rights reserved. | 35 | * All rights reserved. |
1408 | 36 | * | 36 | * |
1409 | 37 | * Redistribution and use in source and binary forms, with or without | 37 | * Redistribution and use in source and binary forms, with or without |
1410 | @@ -234,7 +234,7 @@ static int iwl_mvm_get_temp_cmd(struct iwl_mvm *mvm) | |||
1411 | 234 | .flags = cpu_to_le32(DTS_TRIGGER_CMD_FLAGS_TEMP), | 234 | .flags = cpu_to_le32(DTS_TRIGGER_CMD_FLAGS_TEMP), |
1412 | 235 | }; | 235 | }; |
1413 | 236 | struct iwl_ext_dts_measurement_cmd extcmd = { | 236 | struct iwl_ext_dts_measurement_cmd extcmd = { |
1415 | 237 | .control_mode = cpu_to_le32(DTS_AUTOMATIC), | 237 | .control_mode = cpu_to_le32(DTS_DIRECT_WITHOUT_MEASURE), |
1416 | 238 | }; | 238 | }; |
1417 | 239 | u32 cmdid; | 239 | u32 cmdid; |
1418 | 240 | 240 | ||
1419 | @@ -734,7 +734,8 @@ static struct thermal_zone_device_ops tzone_ops = { | |||
1420 | 734 | static void iwl_mvm_thermal_zone_register(struct iwl_mvm *mvm) | 734 | static void iwl_mvm_thermal_zone_register(struct iwl_mvm *mvm) |
1421 | 735 | { | 735 | { |
1422 | 736 | int i; | 736 | int i; |
1424 | 737 | char name[] = "iwlwifi"; | 737 | char name[16]; |
1425 | 738 | static atomic_t counter = ATOMIC_INIT(0); | ||
1426 | 738 | 739 | ||
1427 | 739 | if (!iwl_mvm_is_tt_in_fw(mvm)) { | 740 | if (!iwl_mvm_is_tt_in_fw(mvm)) { |
1428 | 740 | mvm->tz_device.tzone = NULL; | 741 | mvm->tz_device.tzone = NULL; |
1429 | @@ -744,6 +745,7 @@ static void iwl_mvm_thermal_zone_register(struct iwl_mvm *mvm) | |||
1430 | 744 | 745 | ||
1431 | 745 | BUILD_BUG_ON(ARRAY_SIZE(name) >= THERMAL_NAME_LENGTH); | 746 | BUILD_BUG_ON(ARRAY_SIZE(name) >= THERMAL_NAME_LENGTH); |
1432 | 746 | 747 | ||
1433 | 748 | sprintf(name, "iwlwifi_%u", atomic_inc_return(&counter) & 0xFF); | ||
1434 | 747 | mvm->tz_device.tzone = thermal_zone_device_register(name, | 749 | mvm->tz_device.tzone = thermal_zone_device_register(name, |
1435 | 748 | IWL_MAX_DTS_TRIPS, | 750 | IWL_MAX_DTS_TRIPS, |
1436 | 749 | IWL_WRITABLE_TRIPS_MSK, | 751 | IWL_WRITABLE_TRIPS_MSK, |
1437 | diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c b/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c | |||
1438 | index 01f248b..27e94e6 100644 | |||
1439 | --- a/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c | |||
1440 | +++ b/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c | |||
1441 | @@ -5,7 +5,7 @@ | |||
1442 | 5 | * | 5 | * |
1443 | 6 | * GPL LICENSE SUMMARY | 6 | * GPL LICENSE SUMMARY |
1444 | 7 | * | 7 | * |
1446 | 8 | * Copyright(c) 2018 - 2019 Intel Corporation | 8 | * Copyright(c) 2018 - 2020 Intel Corporation |
1447 | 9 | * | 9 | * |
1448 | 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 |
1449 | 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 |
1450 | @@ -18,7 +18,7 @@ | |||
1451 | 18 | * | 18 | * |
1452 | 19 | * BSD LICENSE | 19 | * BSD LICENSE |
1453 | 20 | * | 20 | * |
1455 | 21 | * Copyright(c) 2018 - 2019 Intel Corporation | 21 | * Copyright(c) 2018 - 2020 Intel Corporation |
1456 | 22 | * All rights reserved. | 22 | * All rights reserved. |
1457 | 23 | * | 23 | * |
1458 | 24 | * Redistribution and use in source and binary forms, with or without | 24 | * Redistribution and use in source and binary forms, with or without |
1459 | @@ -84,32 +84,35 @@ iwl_pcie_ctxt_info_dbg_enable(struct iwl_trans *trans, | |||
1460 | 84 | 84 | ||
1461 | 85 | fw_mon_cfg = &trans->dbg.fw_mon_cfg[alloc_id]; | 85 | fw_mon_cfg = &trans->dbg.fw_mon_cfg[alloc_id]; |
1462 | 86 | 86 | ||
1465 | 87 | if (le32_to_cpu(fw_mon_cfg->buf_location) == | 87 | switch (le32_to_cpu(fw_mon_cfg->buf_location)) { |
1466 | 88 | IWL_FW_INI_LOCATION_SRAM_PATH) { | 88 | case IWL_FW_INI_LOCATION_SRAM_PATH: |
1467 | 89 | dbg_flags |= IWL_PRPH_SCRATCH_EDBG_DEST_INTERNAL; | 89 | dbg_flags |= IWL_PRPH_SCRATCH_EDBG_DEST_INTERNAL; |
1468 | 90 | |||
1469 | 91 | IWL_DEBUG_FW(trans, | 90 | IWL_DEBUG_FW(trans, |
1482 | 92 | "WRT: Applying SMEM buffer destination\n"); | 91 | "WRT: Applying SMEM buffer destination\n"); |
1483 | 93 | 92 | break; | |
1472 | 94 | goto out; | ||
1473 | 95 | } | ||
1474 | 96 | |||
1475 | 97 | if (le32_to_cpu(fw_mon_cfg->buf_location) == | ||
1476 | 98 | IWL_FW_INI_LOCATION_DRAM_PATH && | ||
1477 | 99 | trans->dbg.fw_mon_ini[alloc_id].num_frags) { | ||
1478 | 100 | struct iwl_dram_data *frag = | ||
1479 | 101 | &trans->dbg.fw_mon_ini[alloc_id].frags[0]; | ||
1480 | 102 | |||
1481 | 103 | dbg_flags |= IWL_PRPH_SCRATCH_EDBG_DEST_DRAM; | ||
1484 | 104 | 93 | ||
1485 | 94 | case IWL_FW_INI_LOCATION_NPK_PATH: | ||
1486 | 95 | dbg_flags |= IWL_PRPH_SCRATCH_EDBG_DEST_TB22DTF; | ||
1487 | 105 | IWL_DEBUG_FW(trans, | 96 | IWL_DEBUG_FW(trans, |
1490 | 106 | "WRT: Applying DRAM destination (alloc_id=%u)\n", | 97 | "WRT: Applying NPK buffer destination\n"); |
1491 | 107 | alloc_id); | 98 | break; |
1492 | 108 | 99 | ||
1495 | 109 | dbg_cfg->hwm_base_addr = cpu_to_le64(frag->physical); | 100 | case IWL_FW_INI_LOCATION_DRAM_PATH: |
1496 | 110 | dbg_cfg->hwm_size = cpu_to_le32(frag->size); | 101 | if (trans->dbg.fw_mon_ini[alloc_id].num_frags) { |
1497 | 102 | struct iwl_dram_data *frag = | ||
1498 | 103 | &trans->dbg.fw_mon_ini[alloc_id].frags[0]; | ||
1499 | 104 | dbg_flags |= IWL_PRPH_SCRATCH_EDBG_DEST_DRAM; | ||
1500 | 105 | dbg_cfg->hwm_base_addr = cpu_to_le64(frag->physical); | ||
1501 | 106 | dbg_cfg->hwm_size = cpu_to_le32(frag->size); | ||
1502 | 107 | IWL_DEBUG_FW(trans, | ||
1503 | 108 | "WRT: Applying DRAM destination (alloc_id=%u, num_frags=%u)\n", | ||
1504 | 109 | alloc_id, | ||
1505 | 110 | trans->dbg.fw_mon_ini[alloc_id].num_frags); | ||
1506 | 111 | } | ||
1507 | 112 | break; | ||
1508 | 113 | default: | ||
1509 | 114 | IWL_ERR(trans, "WRT: Invalid buffer destination\n"); | ||
1510 | 111 | } | 115 | } |
1511 | 112 | |||
1512 | 113 | out: | 116 | out: |
1513 | 114 | if (dbg_flags) | 117 | if (dbg_flags) |
1514 | 115 | *control_flags |= IWL_PRPH_SCRATCH_EARLY_DEBUG_EN | dbg_flags; | 118 | *control_flags |= IWL_PRPH_SCRATCH_EARLY_DEBUG_EN | dbg_flags; |
1515 | diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c | |||
1516 | index 23c2aec..cbe49d9 100644 | |||
1517 | --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c | |||
1518 | +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c | |||
1519 | @@ -338,8 +338,10 @@ static const struct pci_device_id iwl_hw_card_ids[] = { | |||
1520 | 338 | /* Qu devices */ | 338 | /* Qu devices */ |
1521 | 339 | {IWL_PCI_DEVICE(0x02F0, PCI_ANY_ID, iwl_qu_trans_cfg)}, | 339 | {IWL_PCI_DEVICE(0x02F0, PCI_ANY_ID, iwl_qu_trans_cfg)}, |
1522 | 340 | {IWL_PCI_DEVICE(0x06F0, PCI_ANY_ID, iwl_qu_trans_cfg)}, | 340 | {IWL_PCI_DEVICE(0x06F0, PCI_ANY_ID, iwl_qu_trans_cfg)}, |
1525 | 341 | {IWL_PCI_DEVICE(0x34F0, PCI_ANY_ID, iwl_qu_trans_cfg)}, | 341 | |
1526 | 342 | {IWL_PCI_DEVICE(0x3DF0, PCI_ANY_ID, iwl_qu_trans_cfg)}, | 342 | {IWL_PCI_DEVICE(0x34F0, PCI_ANY_ID, iwl_qu_medium_latency_trans_cfg)}, |
1527 | 343 | {IWL_PCI_DEVICE(0x3DF0, PCI_ANY_ID, iwl_qu_medium_latency_trans_cfg)}, | ||
1528 | 344 | {IWL_PCI_DEVICE(0x4DF0, PCI_ANY_ID, iwl_qu_medium_latency_trans_cfg)}, | ||
1529 | 343 | 345 | ||
1530 | 344 | {IWL_PCI_DEVICE(0x43F0, PCI_ANY_ID, iwl_qu_long_latency_trans_cfg)}, | 346 | {IWL_PCI_DEVICE(0x43F0, PCI_ANY_ID, iwl_qu_long_latency_trans_cfg)}, |
1531 | 345 | {IWL_PCI_DEVICE(0xA0F0, PCI_ANY_ID, iwl_qu_long_latency_trans_cfg)}, | 347 | {IWL_PCI_DEVICE(0xA0F0, PCI_ANY_ID, iwl_qu_long_latency_trans_cfg)}, |
1532 | @@ -356,12 +358,17 @@ static const struct pci_device_id iwl_hw_card_ids[] = { | |||
1533 | 356 | {IWL_PCI_DEVICE(0x2725, 0x0310, iwlax210_2ax_cfg_ty_gf_a0)}, | 358 | {IWL_PCI_DEVICE(0x2725, 0x0310, iwlax210_2ax_cfg_ty_gf_a0)}, |
1534 | 357 | {IWL_PCI_DEVICE(0x2725, 0x0510, iwlax210_2ax_cfg_ty_gf_a0)}, | 359 | {IWL_PCI_DEVICE(0x2725, 0x0510, iwlax210_2ax_cfg_ty_gf_a0)}, |
1535 | 358 | {IWL_PCI_DEVICE(0x2725, 0x0A10, iwlax210_2ax_cfg_ty_gf_a0)}, | 360 | {IWL_PCI_DEVICE(0x2725, 0x0A10, iwlax210_2ax_cfg_ty_gf_a0)}, |
1541 | 359 | {IWL_PCI_DEVICE(0x2725, 0x00B0, iwlax411_2ax_cfg_so_gf4_a0)}, | 361 | {IWL_PCI_DEVICE(0x2725, 0x00B0, iwlax411_2ax_cfg_sosnj_gf4_a0)}, |
1542 | 360 | {IWL_PCI_DEVICE(0x7A70, 0x0090, iwlax211_2ax_cfg_so_gf_a0)}, | 362 | {IWL_PCI_DEVICE(0x2726, 0x0090, iwlax211_cfg_snj_gf_a0)}, |
1543 | 361 | {IWL_PCI_DEVICE(0x7A70, 0x0310, iwlax211_2ax_cfg_so_gf_a0)}, | 363 | {IWL_PCI_DEVICE(0x2726, 0x00B0, iwlax411_2ax_cfg_sosnj_gf4_a0)}, |
1544 | 362 | {IWL_PCI_DEVICE(0x7A70, 0x0510, iwlax211_2ax_cfg_so_gf_a0)}, | 364 | {IWL_PCI_DEVICE(0x2726, 0x0510, iwlax211_cfg_snj_gf_a0)}, |
1545 | 363 | {IWL_PCI_DEVICE(0x7A70, 0x0A10, iwlax211_2ax_cfg_so_gf_a0)}, | 365 | {IWL_PCI_DEVICE(0x7A70, 0x0090, iwlax211_2ax_cfg_so_gf_a0_long)}, |
1546 | 366 | {IWL_PCI_DEVICE(0x7A70, 0x00B0, iwlax411_2ax_cfg_so_gf4_a0_long)}, | ||
1547 | 367 | {IWL_PCI_DEVICE(0x7A70, 0x0310, iwlax211_2ax_cfg_so_gf_a0_long)}, | ||
1548 | 368 | {IWL_PCI_DEVICE(0x7A70, 0x0510, iwlax211_2ax_cfg_so_gf_a0_long)}, | ||
1549 | 369 | {IWL_PCI_DEVICE(0x7A70, 0x0A10, iwlax211_2ax_cfg_so_gf_a0_long)}, | ||
1550 | 364 | {IWL_PCI_DEVICE(0x7AF0, 0x0090, iwlax211_2ax_cfg_so_gf_a0)}, | 370 | {IWL_PCI_DEVICE(0x7AF0, 0x0090, iwlax211_2ax_cfg_so_gf_a0)}, |
1551 | 371 | {IWL_PCI_DEVICE(0x7AF0, 0x00B0, iwlax411_2ax_cfg_so_gf4_a0)}, | ||
1552 | 365 | {IWL_PCI_DEVICE(0x7AF0, 0x0310, iwlax211_2ax_cfg_so_gf_a0)}, | 372 | {IWL_PCI_DEVICE(0x7AF0, 0x0310, iwlax211_2ax_cfg_so_gf_a0)}, |
1553 | 366 | {IWL_PCI_DEVICE(0x7AF0, 0x0510, iwlax211_2ax_cfg_so_gf_a0)}, | 373 | {IWL_PCI_DEVICE(0x7AF0, 0x0510, iwlax211_2ax_cfg_so_gf_a0)}, |
1554 | 367 | {IWL_PCI_DEVICE(0x7AF0, 0x0A10, iwlax211_2ax_cfg_so_gf_a0)}, | 374 | {IWL_PCI_DEVICE(0x7AF0, 0x0A10, iwlax211_2ax_cfg_so_gf_a0)}, |
1555 | @@ -461,6 +468,32 @@ static const struct iwl_dev_info iwl_dev_info_table[] = { | |||
1556 | 461 | IWL_DEV_INFO(0x34F0, 0x4070, iwl_ax201_cfg_qu_hr, NULL), | 468 | IWL_DEV_INFO(0x34F0, 0x4070, iwl_ax201_cfg_qu_hr, NULL), |
1557 | 462 | IWL_DEV_INFO(0x34F0, 0x4244, iwl_ax101_cfg_qu_hr, NULL), | 469 | IWL_DEV_INFO(0x34F0, 0x4244, iwl_ax101_cfg_qu_hr, NULL), |
1558 | 463 | 470 | ||
1559 | 471 | IWL_DEV_INFO(0x3DF0, 0x0044, iwl_ax101_cfg_qu_hr, NULL), | ||
1560 | 472 | IWL_DEV_INFO(0x3DF0, 0x0070, iwl_ax201_cfg_qu_hr, NULL), | ||
1561 | 473 | IWL_DEV_INFO(0x3DF0, 0x0074, iwl_ax201_cfg_qu_hr, NULL), | ||
1562 | 474 | IWL_DEV_INFO(0x3DF0, 0x0078, iwl_ax201_cfg_qu_hr, NULL), | ||
1563 | 475 | IWL_DEV_INFO(0x3DF0, 0x007C, iwl_ax201_cfg_qu_hr, NULL), | ||
1564 | 476 | IWL_DEV_INFO(0x3DF0, 0x0244, iwl_ax101_cfg_qu_hr, NULL), | ||
1565 | 477 | IWL_DEV_INFO(0x3DF0, 0x0310, iwl_ax201_cfg_qu_hr, NULL), | ||
1566 | 478 | IWL_DEV_INFO(0x3DF0, 0x1651, killer1650s_2ax_cfg_qu_b0_hr_b0, NULL), | ||
1567 | 479 | IWL_DEV_INFO(0x3DF0, 0x1652, killer1650i_2ax_cfg_qu_b0_hr_b0, NULL), | ||
1568 | 480 | IWL_DEV_INFO(0x3DF0, 0x2074, iwl_ax201_cfg_qu_hr, NULL), | ||
1569 | 481 | IWL_DEV_INFO(0x3DF0, 0x4070, iwl_ax201_cfg_qu_hr, NULL), | ||
1570 | 482 | IWL_DEV_INFO(0x3DF0, 0x4244, iwl_ax101_cfg_qu_hr, NULL), | ||
1571 | 483 | |||
1572 | 484 | IWL_DEV_INFO(0x4DF0, 0x0044, iwl_ax101_cfg_qu_hr, NULL), | ||
1573 | 485 | IWL_DEV_INFO(0x4DF0, 0x0070, iwl_ax201_cfg_qu_hr, NULL), | ||
1574 | 486 | IWL_DEV_INFO(0x4DF0, 0x0074, iwl_ax201_cfg_qu_hr, NULL), | ||
1575 | 487 | IWL_DEV_INFO(0x4DF0, 0x0078, iwl_ax201_cfg_qu_hr, NULL), | ||
1576 | 488 | IWL_DEV_INFO(0x4DF0, 0x007C, iwl_ax201_cfg_qu_hr, NULL), | ||
1577 | 489 | IWL_DEV_INFO(0x4DF0, 0x0244, iwl_ax101_cfg_qu_hr, NULL), | ||
1578 | 490 | IWL_DEV_INFO(0x4DF0, 0x0310, iwl_ax201_cfg_qu_hr, NULL), | ||
1579 | 491 | IWL_DEV_INFO(0x4DF0, 0x1651, killer1650s_2ax_cfg_qu_b0_hr_b0, NULL), | ||
1580 | 492 | IWL_DEV_INFO(0x4DF0, 0x1652, killer1650i_2ax_cfg_qu_b0_hr_b0, NULL), | ||
1581 | 493 | IWL_DEV_INFO(0x4DF0, 0x2074, iwl_ax201_cfg_qu_hr, NULL), | ||
1582 | 494 | IWL_DEV_INFO(0x4DF0, 0x4070, iwl_ax201_cfg_qu_hr, NULL), | ||
1583 | 495 | IWL_DEV_INFO(0x4DF0, 0x4244, iwl_ax101_cfg_qu_hr, NULL), | ||
1584 | 496 | |||
1585 | 464 | IWL_DEV_INFO(0x2720, 0x0000, iwl22000_2ax_cfg_qnj_hr_b0, NULL), | 497 | IWL_DEV_INFO(0x2720, 0x0000, iwl22000_2ax_cfg_qnj_hr_b0, NULL), |
1586 | 465 | IWL_DEV_INFO(0x2720, 0x0040, iwl22000_2ax_cfg_qnj_hr_b0, NULL), | 498 | IWL_DEV_INFO(0x2720, 0x0040, iwl22000_2ax_cfg_qnj_hr_b0, NULL), |
1587 | 466 | IWL_DEV_INFO(0x2720, 0x0044, iwl22000_2ax_cfg_qnj_hr_b0, NULL), | 499 | IWL_DEV_INFO(0x2720, 0x0044, iwl22000_2ax_cfg_qnj_hr_b0, NULL), |
1588 | diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c | |||
1589 | index e646ac3..54f57f2 100644 | |||
1590 | --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c | |||
1591 | +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c | |||
1592 | @@ -1055,21 +1055,8 @@ static int iwl_pcie_load_given_ucode(struct iwl_trans *trans, | |||
1593 | 1055 | return ret; | 1055 | return ret; |
1594 | 1056 | } | 1056 | } |
1595 | 1057 | 1057 | ||
1609 | 1058 | /* supported for 7000 only for the moment */ | 1058 | if (iwl_pcie_dbg_on(trans)) |
1597 | 1059 | if (iwlwifi_mod_params.fw_monitor && | ||
1598 | 1060 | trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_7000) { | ||
1599 | 1061 | struct iwl_dram_data *fw_mon = &trans->dbg.fw_mon; | ||
1600 | 1062 | |||
1601 | 1063 | iwl_pcie_alloc_fw_monitor(trans, 0); | ||
1602 | 1064 | if (fw_mon->size) { | ||
1603 | 1065 | iwl_write_prph(trans, MON_BUFF_BASE_ADDR, | ||
1604 | 1066 | fw_mon->physical >> 4); | ||
1605 | 1067 | iwl_write_prph(trans, MON_BUFF_END_ADDR, | ||
1606 | 1068 | (fw_mon->physical + fw_mon->size) >> 4); | ||
1607 | 1069 | } | ||
1608 | 1070 | } else if (iwl_pcie_dbg_on(trans)) { | ||
1610 | 1071 | iwl_pcie_apply_destination(trans); | 1059 | iwl_pcie_apply_destination(trans); |
1611 | 1072 | } | ||
1612 | 1073 | 1060 | ||
1613 | 1074 | #ifdef CPTCFG_IWLWIFI_DEVICE_TESTMODE | 1061 | #ifdef CPTCFG_IWLWIFI_DEVICE_TESTMODE |
1614 | 1075 | iwl_dnt_configure(trans, image); | 1062 | iwl_dnt_configure(trans, image); |
1615 | diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | |||
1616 | index bd35097..3478ee8 100644 | |||
1617 | --- a/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | |||
1618 | +++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | |||
1619 | @@ -340,7 +340,7 @@ static int iwl_pcie_gen2_set_tb_with_wa(struct iwl_trans *trans, | |||
1620 | 340 | } | 340 | } |
1621 | 341 | IWL_WARN(trans, | 341 | IWL_WARN(trans, |
1622 | 342 | "TB bug workaround: copied %d bytes from 0x%llx to 0x%llx\n", | 342 | "TB bug workaround: copied %d bytes from 0x%llx to 0x%llx\n", |
1624 | 343 | len, oldphys, phys); | 343 | len, (unsigned long long)oldphys, (unsigned long long)phys); |
1625 | 344 | 344 | ||
1626 | 345 | ret = 0; | 345 | ret = 0; |
1627 | 346 | unmap: | 346 | unmap: |
1628 | diff --git a/drivers/net/wireless/intel/iwlwifi/xvt/fw.c b/drivers/net/wireless/intel/iwlwifi/xvt/fw.c | |||
1629 | index 6755e7d..392e0da 100644 | |||
1630 | --- a/drivers/net/wireless/intel/iwlwifi/xvt/fw.c | |||
1631 | +++ b/drivers/net/wireless/intel/iwlwifi/xvt/fw.c | |||
1632 | @@ -360,6 +360,9 @@ int iwl_xvt_run_fw(struct iwl_xvt *xvt, u32 ucode_type) | |||
1633 | 360 | iwl_trans_stop_device(xvt->trans); | 360 | iwl_trans_stop_device(xvt->trans); |
1634 | 361 | } | 361 | } |
1635 | 362 | 362 | ||
1636 | 363 | iwl_dbg_tlv_time_point(&xvt->fwrt, IWL_FW_INI_TIME_POINT_AFTER_ALIVE, | ||
1637 | 364 | NULL); | ||
1638 | 365 | |||
1639 | 363 | if (iwl_xvt_is_unified_fw(xvt)) { | 366 | if (iwl_xvt_is_unified_fw(xvt)) { |
1640 | 364 | ret = iwl_xvt_send_extended_config(xvt); | 367 | ret = iwl_xvt_send_extended_config(xvt); |
1641 | 365 | if (ret) { | 368 | if (ret) { |
1642 | @@ -377,11 +380,13 @@ int iwl_xvt_run_fw(struct iwl_xvt *xvt, u32 ucode_type) | |||
1643 | 377 | IWL_UCODE_TLV_CAPA_SET_LTR_GEN2))) | 380 | IWL_UCODE_TLV_CAPA_SET_LTR_GEN2))) |
1644 | 378 | WARN_ON(iwl_xvt_config_ltr(xvt)); | 381 | WARN_ON(iwl_xvt_config_ltr(xvt)); |
1645 | 379 | 382 | ||
1651 | 380 | xvt->fwrt.dump.conf = FW_DBG_INVALID; | 383 | if (!iwl_trans_dbg_ini_valid(xvt->trans)) { |
1652 | 381 | /* if we have a destination, assume EARLY START */ | 384 | xvt->fwrt.dump.conf = FW_DBG_INVALID; |
1653 | 382 | if (xvt->fw->dbg.dest_tlv) | 385 | /* if we have a destination, assume EARLY START */ |
1654 | 383 | xvt->fwrt.dump.conf = FW_DBG_START_FROM_ALIVE; | 386 | if (xvt->fw->dbg.dest_tlv) |
1655 | 384 | iwl_fw_start_dbg_conf(&xvt->fwrt, FW_DBG_START_FROM_ALIVE); | 387 | xvt->fwrt.dump.conf = FW_DBG_START_FROM_ALIVE; |
1656 | 388 | iwl_fw_start_dbg_conf(&xvt->fwrt, FW_DBG_START_FROM_ALIVE); | ||
1657 | 389 | } | ||
1658 | 385 | 390 | ||
1659 | 386 | return ret; | 391 | return ret; |
1660 | 387 | } | 392 | } |
1661 | diff --git a/drivers/net/wireless/intel/iwlwifi/xvt/user-infc.c b/drivers/net/wireless/intel/iwlwifi/xvt/user-infc.c | |||
1662 | index 5cca001..4fda9a7 100644 | |||
1663 | --- a/drivers/net/wireless/intel/iwlwifi/xvt/user-infc.c | |||
1664 | +++ b/drivers/net/wireless/intel/iwlwifi/xvt/user-infc.c | |||
1665 | @@ -85,6 +85,7 @@ | |||
1666 | 85 | #include "iwl-trans.h" | 85 | #include "iwl-trans.h" |
1667 | 86 | #include "fw/dbg.h" | 86 | #include "fw/dbg.h" |
1668 | 87 | #include "fw/acpi.h" | 87 | #include "fw/acpi.h" |
1669 | 88 | #include "fw/img.h" | ||
1670 | 88 | 89 | ||
1671 | 89 | #define XVT_UCODE_CALIB_TIMEOUT (CPTCFG_IWL_TIMEOUT_FACTOR * HZ) | 90 | #define XVT_UCODE_CALIB_TIMEOUT (CPTCFG_IWL_TIMEOUT_FACTOR * HZ) |
1672 | 90 | #define XVT_SCU_BASE (0xe6a00000) | 91 | #define XVT_SCU_BASE (0xe6a00000) |
1673 | @@ -310,7 +311,7 @@ static int iwl_xvt_set_sw_config(struct iwl_xvt *xvt, | |||
1674 | 310 | { | 311 | { |
1675 | 311 | struct iwl_xvt_sw_cfg_request *sw_cfg = | 312 | struct iwl_xvt_sw_cfg_request *sw_cfg = |
1676 | 312 | (struct iwl_xvt_sw_cfg_request *)data_in->data; | 313 | (struct iwl_xvt_sw_cfg_request *)data_in->data; |
1678 | 313 | struct iwl_phy_cfg_cmd *fw_calib_cmd_cfg = | 314 | struct iwl_phy_cfg_cmd_v3 *fw_calib_cmd_cfg = |
1679 | 314 | xvt->sw_stack_cfg.fw_calib_cmd_cfg; | 315 | xvt->sw_stack_cfg.fw_calib_cmd_cfg; |
1680 | 315 | __le32 cfg_mask = cpu_to_le32(sw_cfg->cfg_mask), | 316 | __le32 cfg_mask = cpu_to_le32(sw_cfg->cfg_mask), |
1681 | 316 | fw_calib_event, fw_calib_flow, | 317 | fw_calib_event, fw_calib_flow, |
1682 | @@ -370,7 +371,7 @@ static int iwl_xvt_get_sw_config(struct iwl_xvt *xvt, | |||
1683 | 370 | { | 371 | { |
1684 | 371 | struct iwl_xvt_sw_cfg_request *get_cfg_req; | 372 | struct iwl_xvt_sw_cfg_request *get_cfg_req; |
1685 | 372 | struct iwl_xvt_sw_cfg_request *sw_cfg; | 373 | struct iwl_xvt_sw_cfg_request *sw_cfg; |
1687 | 373 | struct iwl_phy_cfg_cmd *fw_calib_cmd_cfg = | 374 | struct iwl_phy_cfg_cmd_v3 *fw_calib_cmd_cfg = |
1688 | 374 | xvt->sw_stack_cfg.fw_calib_cmd_cfg; | 375 | xvt->sw_stack_cfg.fw_calib_cmd_cfg; |
1689 | 375 | __le32 event_trigger, flow_trigger; | 376 | __le32 event_trigger, flow_trigger; |
1690 | 376 | int i, u; | 377 | int i, u; |
1691 | @@ -425,9 +426,10 @@ static int iwl_xvt_get_sw_config(struct iwl_xvt *xvt, | |||
1692 | 425 | 426 | ||
1693 | 426 | static int iwl_xvt_send_phy_cfg_cmd(struct iwl_xvt *xvt, u32 ucode_type) | 427 | static int iwl_xvt_send_phy_cfg_cmd(struct iwl_xvt *xvt, u32 ucode_type) |
1694 | 427 | { | 428 | { |
1696 | 428 | struct iwl_phy_cfg_cmd *calib_cmd_cfg = | 429 | struct iwl_phy_cfg_cmd_v3 *calib_cmd_cfg = |
1697 | 429 | &xvt->sw_stack_cfg.fw_calib_cmd_cfg[ucode_type]; | 430 | &xvt->sw_stack_cfg.fw_calib_cmd_cfg[ucode_type]; |
1698 | 430 | int err; | 431 | int err; |
1699 | 432 | size_t cmd_size; | ||
1700 | 431 | 433 | ||
1701 | 432 | IWL_DEBUG_INFO(xvt, "Sending Phy CFG command: 0x%x\n", | 434 | IWL_DEBUG_INFO(xvt, "Sending Phy CFG command: 0x%x\n", |
1702 | 433 | calib_cmd_cfg->phy_cfg); | 435 | calib_cmd_cfg->phy_cfg); |
1703 | @@ -437,10 +439,14 @@ static int iwl_xvt_send_phy_cfg_cmd(struct iwl_xvt *xvt, u32 ucode_type) | |||
1704 | 437 | calib_cmd_cfg->calib_control.event_trigger = 0; | 439 | calib_cmd_cfg->calib_control.event_trigger = 0; |
1705 | 438 | calib_cmd_cfg->calib_control.flow_trigger = 0; | 440 | calib_cmd_cfg->calib_control.flow_trigger = 0; |
1706 | 439 | } | 441 | } |
1707 | 442 | cmd_size = iwl_fw_lookup_cmd_ver(xvt->fw, IWL_ALWAYS_LONG_GROUP, | ||
1708 | 443 | PHY_CONFIGURATION_CMD) == 3 ? | ||
1709 | 444 | sizeof(struct iwl_phy_cfg_cmd_v3) : | ||
1710 | 445 | sizeof(struct iwl_phy_cfg_cmd_v1); | ||
1711 | 440 | 446 | ||
1712 | 441 | /* Sending calibration configuration control data */ | 447 | /* Sending calibration configuration control data */ |
1713 | 442 | err = iwl_xvt_send_cmd_pdu(xvt, PHY_CONFIGURATION_CMD, 0, | 448 | err = iwl_xvt_send_cmd_pdu(xvt, PHY_CONFIGURATION_CMD, 0, |
1715 | 443 | sizeof(*calib_cmd_cfg), calib_cmd_cfg); | 449 | cmd_size, calib_cmd_cfg); |
1716 | 444 | if (err) | 450 | if (err) |
1717 | 445 | IWL_ERR(xvt, "Error (%d) running INIT calibrations control\n", | 451 | IWL_ERR(xvt, "Error (%d) running INIT calibrations control\n", |
1718 | 446 | err); | 452 | err); |
1719 | diff --git a/drivers/net/wireless/intel/iwlwifi/xvt/xvt.h b/drivers/net/wireless/intel/iwlwifi/xvt/xvt.h | |||
1720 | index fd88766..005ad0b 100644 | |||
1721 | --- a/drivers/net/wireless/intel/iwlwifi/xvt/xvt.h | |||
1722 | +++ b/drivers/net/wireless/intel/iwlwifi/xvt/xvt.h | |||
1723 | @@ -191,13 +191,13 @@ struct tx_payload { | |||
1724 | 191 | /** | 191 | /** |
1725 | 192 | * iwl_sw_stack_config - Holds active SW stack config as set from user space | 192 | * iwl_sw_stack_config - Holds active SW stack config as set from user space |
1726 | 193 | * @load_mask: Which FW are to be loaded during SW stack up | 193 | * @load_mask: Which FW are to be loaded during SW stack up |
1728 | 194 | * @iwl_phy_cfg_cmd: Which calibrations should be done | 194 | * @fw_calib_cmd_cfg: Which calibrations should be done |
1729 | 195 | */ | 195 | */ |
1730 | 196 | struct iwl_sw_stack_config { | 196 | struct iwl_sw_stack_config { |
1731 | 197 | u32 load_mask; | 197 | u32 load_mask; |
1732 | 198 | u32 calib_override_mask; | 198 | u32 calib_override_mask; |
1733 | 199 | u32 fw_dbg_flags; | 199 | u32 fw_dbg_flags; |
1735 | 200 | struct iwl_phy_cfg_cmd fw_calib_cmd_cfg[IWL_UCODE_TYPE_MAX]; | 200 | struct iwl_phy_cfg_cmd_v3 fw_calib_cmd_cfg[IWL_UCODE_TYPE_MAX]; |
1736 | 201 | }; | 201 | }; |
1737 | 202 | 202 | ||
1738 | 203 | /* Note: This structure is read from the device with IO accesses, | 203 | /* Note: This structure is read from the device with IO accesses, |
1739 | diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h | |||
1740 | index 5444959..5a8df7a 100644 | |||
1741 | --- a/include/linux/ieee80211.h | |||
1742 | +++ b/include/linux/ieee80211.h | |||
1743 | @@ -1439,9 +1439,7 @@ struct ieee80211_ht_operation { | |||
1744 | 1439 | #define IEEE80211_AP_INFO_TBTT_HDR_FILTERED 0x4 | 1439 | #define IEEE80211_AP_INFO_TBTT_HDR_FILTERED 0x4 |
1745 | 1440 | #define IEEE80211_AP_INFO_TBTT_HDR_COLOC 0x8 | 1440 | #define IEEE80211_AP_INFO_TBTT_HDR_COLOC 0x8 |
1746 | 1441 | #define IEEE80211_AP_INFO_TBTT_HDR_COUNT 0xF0 | 1441 | #define IEEE80211_AP_INFO_TBTT_HDR_COUNT 0xF0 |
1747 | 1442 | #define IEEE80211_TBTT_INFO_OFFSET_BSSID 7 | ||
1748 | 1443 | #define IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM 8 | 1442 | #define IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM 8 |
1749 | 1444 | #define IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID 11 | ||
1750 | 1445 | #define IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM 12 | 1443 | #define IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM 12 |
1751 | 1446 | 1444 | ||
1752 | 1447 | #define IEEE80211_RNR_TBTT_PARAMS_OCT_RECOMMENDED 0x1 | 1445 | #define IEEE80211_RNR_TBTT_PARAMS_OCT_RECOMMENDED 0x1 |
1753 | @@ -1450,6 +1448,7 @@ struct ieee80211_ht_operation { | |||
1754 | 1450 | #define IEEE80211_RNR_TBTT_PARAMS_TRANSMITTED_BSSID 0x8 | 1448 | #define IEEE80211_RNR_TBTT_PARAMS_TRANSMITTED_BSSID 0x8 |
1755 | 1451 | #define IEEE80211_RNR_TBTT_PARAMS_COLOC_ESS 0x10 | 1449 | #define IEEE80211_RNR_TBTT_PARAMS_COLOC_ESS 0x10 |
1756 | 1452 | #define IEEE80211_RNR_TBTT_PARAMS_PROBE_ACTIVE 0x20 | 1450 | #define IEEE80211_RNR_TBTT_PARAMS_PROBE_ACTIVE 0x20 |
1757 | 1451 | #define IEEE80211_RNR_TBTT_PARAMS_COLOC_AP 0x40 | ||
1758 | 1453 | 1452 | ||
1759 | 1454 | struct cfg80211_neighbor_ap_info { | 1453 | struct cfg80211_neighbor_ap_info { |
1760 | 1455 | u8 tbtt_info_hdr; | 1454 | u8 tbtt_info_hdr; |
1761 | diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c | |||
1762 | index 67335a7..05b9404 100644 | |||
1763 | --- a/net/mac80211/mlme.c | |||
1764 | +++ b/net/mac80211/mlme.c | |||
1765 | @@ -8,7 +8,7 @@ | |||
1766 | 8 | * Copyright 2007, Michael Wu <flamingice@sourmilk.net> | 8 | * Copyright 2007, Michael Wu <flamingice@sourmilk.net> |
1767 | 9 | * Copyright 2013-2014 Intel Mobile Communications GmbH | 9 | * Copyright 2013-2014 Intel Mobile Communications GmbH |
1768 | 10 | * Copyright (C) 2015 - 2017 Intel Deutschland GmbH | 10 | * Copyright (C) 2015 - 2017 Intel Deutschland GmbH |
1770 | 11 | * Copyright (C) 2018 - 2019 Intel Corporation | 11 | * Copyright (C) 2018 - 2020 Intel Corporation |
1771 | 12 | */ | 12 | */ |
1772 | 13 | 13 | ||
1773 | 14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
1774 | @@ -193,21 +193,25 @@ ieee80211_determine_chantype_6ghz(struct ieee80211_sub_if_data *sdata, | |||
1775 | 193 | he_chandef.width = NL80211_CHAN_WIDTH_80; | 193 | he_chandef.width = NL80211_CHAN_WIDTH_80; |
1776 | 194 | break; | 194 | break; |
1777 | 195 | case IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_160MHZ: | 195 | case IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_160MHZ: |
1782 | 196 | /* FIXME: not sure this is right - the spec is weird */ | 196 | if (abs(he_6ghz_oper->ccfs1 - he_6ghz_oper->ccfs0) == 8) |
1779 | 197 | if (he_6ghz_oper->ccfs1) | ||
1780 | 198 | he_chandef.width = NL80211_CHAN_WIDTH_80P80; | ||
1781 | 199 | else | ||
1783 | 200 | he_chandef.width = NL80211_CHAN_WIDTH_160; | 197 | he_chandef.width = NL80211_CHAN_WIDTH_160; |
1784 | 198 | else | ||
1785 | 199 | he_chandef.width = NL80211_CHAN_WIDTH_80P80; | ||
1786 | 201 | break; | 200 | break; |
1787 | 202 | } | 201 | } |
1788 | 203 | 202 | ||
1796 | 204 | he_chandef.center_freq1 = | 203 | if (he_chandef.width == NL80211_CHAN_WIDTH_160) { |
1797 | 205 | ieee80211_channel_to_frequency(he_6ghz_oper->ccfs0, | 204 | he_chandef.center_freq1 = |
1798 | 206 | NL80211_BAND_6GHZ); | 205 | ieee80211_channel_to_frequency(he_6ghz_oper->ccfs1, |
1799 | 207 | he_chandef.center_freq2 = | 206 | NL80211_BAND_6GHZ); |
1800 | 208 | ieee80211_channel_to_frequency(he_6ghz_oper->ccfs1, | 207 | } else { |
1801 | 209 | NL80211_BAND_6GHZ); | 208 | he_chandef.center_freq1 = |
1802 | 210 | 209 | ieee80211_channel_to_frequency(he_6ghz_oper->ccfs0, | |
1803 | 210 | NL80211_BAND_6GHZ); | ||
1804 | 211 | he_chandef.center_freq2 = | ||
1805 | 212 | ieee80211_channel_to_frequency(he_6ghz_oper->ccfs1, | ||
1806 | 213 | NL80211_BAND_6GHZ); | ||
1807 | 214 | } | ||
1808 | 211 | if (!cfg80211_chandef_valid(&he_chandef)) { | 215 | if (!cfg80211_chandef_valid(&he_chandef)) { |
1809 | 212 | sdata_info(sdata, | 216 | sdata_info(sdata, |
1810 | 213 | "HE 6GHz operation resulted in invalid chandef: %d MHz/%d/%d MHz/%d MHz\n", | 217 | "HE 6GHz operation resulted in invalid chandef: %d MHz/%d/%d MHz/%d MHz\n", |
1811 | @@ -403,8 +407,8 @@ out: | |||
1812 | 403 | ret |= ieee80211_chandef_downgrade(chandef); | 407 | ret |= ieee80211_chandef_downgrade(chandef); |
1813 | 404 | } | 408 | } |
1814 | 405 | 409 | ||
1817 | 406 | if (!cfg80211_chandef_usable(sdata->wdev.wiphy, chandef, | 410 | if (!he_oper || !cfg80211_chandef_usable(sdata->wdev.wiphy, chandef, |
1818 | 407 | IEEE80211_CHAN_NO_HE)) | 411 | IEEE80211_CHAN_NO_HE)) |
1819 | 408 | ret |= IEEE80211_STA_DISABLE_HE; | 412 | ret |= IEEE80211_STA_DISABLE_HE; |
1820 | 409 | 413 | ||
1821 | 410 | if (chandef->width != vht_chandef.width && !tracking) | 414 | if (chandef->width != vht_chandef.width && !tracking) |
1822 | @@ -779,6 +783,13 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) | |||
1823 | 779 | struct ieee80211_chanctx_conf *chanctx_conf; | 783 | struct ieee80211_chanctx_conf *chanctx_conf; |
1824 | 780 | struct ieee80211_channel *chan; | 784 | struct ieee80211_channel *chan; |
1825 | 781 | u32 rates = 0; | 785 | u32 rates = 0; |
1826 | 786 | struct element *ext_capa = NULL; | ||
1827 | 787 | |||
1828 | 788 | /* we know it's writable, cast away the const */ | ||
1829 | 789 | if (assoc_data->ie_len) | ||
1830 | 790 | ext_capa = (void *)cfg80211_find_elem(WLAN_EID_EXT_CAPABILITY, | ||
1831 | 791 | assoc_data->ie, | ||
1832 | 792 | assoc_data->ie_len); | ||
1833 | 782 | 793 | ||
1834 | 783 | sdata_assert_lock(sdata); | 794 | sdata_assert_lock(sdata); |
1835 | 784 | 795 | ||
1836 | @@ -929,7 +940,15 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) | |||
1837 | 929 | *pos++ = ieee80211_chandef_max_power(&chanctx_conf->def); | 940 | *pos++ = ieee80211_chandef_max_power(&chanctx_conf->def); |
1838 | 930 | } | 941 | } |
1839 | 931 | 942 | ||
1841 | 932 | if (capab & WLAN_CAPABILITY_SPECTRUM_MGMT) { | 943 | /* |
1842 | 944 | * Per spec, we shouldn't include the list of channels if we advertise | ||
1843 | 945 | * support for extended channel switching, but we've always done that; | ||
1844 | 946 | * (for now?) apply this restriction only on the (new) 6 GHz band. | ||
1845 | 947 | */ | ||
1846 | 948 | if (capab & WLAN_CAPABILITY_SPECTRUM_MGMT && | ||
1847 | 949 | (sband->band != NL80211_BAND_6GHZ || | ||
1848 | 950 | !ext_capa || ext_capa->datalen < 1 || | ||
1849 | 951 | !(ext_capa->data[0] & WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING))) { | ||
1850 | 933 | /* TODO: get this in reg domain format */ | 952 | /* TODO: get this in reg domain format */ |
1851 | 934 | pos = skb_put(skb, 2 * sband->n_channels + 2); | 953 | pos = skb_put(skb, 2 * sband->n_channels + 2); |
1852 | 935 | *pos++ = WLAN_EID_SUPPORTED_CHANNELS; | 954 | *pos++ = WLAN_EID_SUPPORTED_CHANNELS; |
1853 | @@ -943,18 +962,9 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) | |||
1854 | 943 | 962 | ||
1855 | 944 | /* Set MBSSID support for HE AP if needed */ | 963 | /* Set MBSSID support for HE AP if needed */ |
1856 | 945 | if (ieee80211_hw_check(&local->hw, SUPPORTS_ONLY_HE_MULTI_BSSID) && | 964 | if (ieee80211_hw_check(&local->hw, SUPPORTS_ONLY_HE_MULTI_BSSID) && |
1869 | 946 | !(ifmgd->flags & IEEE80211_STA_DISABLE_HE) && assoc_data->ie_len) { | 965 | !(ifmgd->flags & IEEE80211_STA_DISABLE_HE) && assoc_data->ie_len && |
1870 | 947 | struct element *elem; | 966 | ext_capa && ext_capa->datalen >= 3) |
1871 | 948 | 967 | ext_capa->data[2] |= WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT; | |
1860 | 949 | /* we know it's writable, cast away the const */ | ||
1861 | 950 | elem = (void *)cfg80211_find_elem(WLAN_EID_EXT_CAPABILITY, | ||
1862 | 951 | assoc_data->ie, | ||
1863 | 952 | assoc_data->ie_len); | ||
1864 | 953 | |||
1865 | 954 | /* We can probably assume both always true */ | ||
1866 | 955 | if (elem && elem->datalen >= 3) | ||
1867 | 956 | elem->data[2] |= WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT; | ||
1868 | 957 | } | ||
1872 | 958 | 968 | ||
1873 | 959 | /* if present, add any custom IEs that go before HT */ | 969 | /* if present, add any custom IEs that go before HT */ |
1874 | 960 | if (assoc_data->ie_len) { | 970 | if (assoc_data->ie_len) { |
1875 | @@ -1445,7 +1455,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, | |||
1876 | 1445 | if (!res) { | 1455 | if (!res) { |
1877 | 1446 | ch_switch.timestamp = timestamp; | 1456 | ch_switch.timestamp = timestamp; |
1878 | 1447 | ch_switch.device_timestamp = device_timestamp; | 1457 | ch_switch.device_timestamp = device_timestamp; |
1880 | 1448 | ch_switch.block_tx = beacon ? csa_ie.mode : 0; | 1458 | ch_switch.block_tx = csa_ie.mode; |
1881 | 1449 | ch_switch.chandef = csa_ie.chandef; | 1459 | ch_switch.chandef = csa_ie.chandef; |
1882 | 1450 | ch_switch.count = csa_ie.count; | 1460 | ch_switch.count = csa_ie.count; |
1883 | 1451 | ch_switch.delay = csa_ie.max_switch_time; | 1461 | ch_switch.delay = csa_ie.max_switch_time; |
1884 | @@ -1538,7 +1548,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, | |||
1885 | 1538 | 1548 | ||
1886 | 1539 | sdata->vif.csa_active = true; | 1549 | sdata->vif.csa_active = true; |
1887 | 1540 | sdata->csa_chandef = csa_ie.chandef; | 1550 | sdata->csa_chandef = csa_ie.chandef; |
1889 | 1541 | sdata->csa_block_tx = ch_switch.block_tx; | 1551 | sdata->csa_block_tx = csa_ie.mode; |
1890 | 1542 | ifmgd->csa_ignored_same_chan = false; | 1552 | ifmgd->csa_ignored_same_chan = false; |
1891 | 1543 | 1553 | ||
1892 | 1544 | if (sdata->csa_block_tx) | 1554 | if (sdata->csa_block_tx) |
1893 | @@ -1572,7 +1582,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, | |||
1894 | 1572 | * reset when the disconnection worker runs. | 1582 | * reset when the disconnection worker runs. |
1895 | 1573 | */ | 1583 | */ |
1896 | 1574 | sdata->vif.csa_active = true; | 1584 | sdata->vif.csa_active = true; |
1898 | 1575 | sdata->csa_block_tx = ch_switch.block_tx; | 1585 | sdata->csa_block_tx = csa_ie.mode; |
1899 | 1576 | 1586 | ||
1900 | 1577 | ieee80211_queue_work(&local->hw, &ifmgd->csa_connection_drop_work); | 1587 | ieee80211_queue_work(&local->hw, &ifmgd->csa_connection_drop_work); |
1901 | 1578 | mutex_unlock(&local->chanctx_mtx); | 1588 | mutex_unlock(&local->chanctx_mtx); |
1902 | @@ -3777,13 +3787,28 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata, | |||
1903 | 3777 | struct ieee80211_mgmt *mgmt = (void *)skb->data; | 3787 | struct ieee80211_mgmt *mgmt = (void *)skb->data; |
1904 | 3778 | struct ieee80211_if_managed *ifmgd; | 3788 | struct ieee80211_if_managed *ifmgd; |
1905 | 3779 | struct ieee80211_rx_status *rx_status = (void *) skb->cb; | 3789 | struct ieee80211_rx_status *rx_status = (void *) skb->cb; |
1906 | 3790 | struct ieee80211_channel *channel; | ||
1907 | 3780 | size_t baselen, len = skb->len; | 3791 | size_t baselen, len = skb->len; |
1908 | 3781 | 3792 | ||
1909 | 3782 | ifmgd = &sdata->u.mgd; | 3793 | ifmgd = &sdata->u.mgd; |
1910 | 3783 | 3794 | ||
1911 | 3784 | sdata_assert_lock(sdata); | 3795 | sdata_assert_lock(sdata); |
1912 | 3785 | 3796 | ||
1914 | 3786 | if (!ether_addr_equal(mgmt->da, sdata->vif.addr)) | 3797 | /* |
1915 | 3798 | * According to Draft P802.11ax D6.0 clause 26.17.2.3.2: | ||
1916 | 3799 | * "If a 6 GHz AP receives a Probe Request frame and responds with | ||
1917 | 3800 | * a Probe Response frame [..], the Address 1 field of the Probe | ||
1918 | 3801 | * Response frame shall be set to the broadcast address [..]" | ||
1919 | 3802 | * So, on 6GHz band we should also accept broadcast responses. | ||
1920 | 3803 | */ | ||
1921 | 3804 | channel = ieee80211_get_channel(sdata->local->hw.wiphy, | ||
1922 | 3805 | rx_status->freq); | ||
1923 | 3806 | if (!channel) | ||
1924 | 3807 | return; | ||
1925 | 3808 | |||
1926 | 3809 | if (!ether_addr_equal(mgmt->da, sdata->vif.addr) && | ||
1927 | 3810 | (channel->band != NL80211_BAND_6GHZ || | ||
1928 | 3811 | !is_broadcast_ether_addr(mgmt->da))) | ||
1929 | 3787 | return; /* ignore ProbeResp to foreign address */ | 3812 | return; /* ignore ProbeResp to foreign address */ |
1930 | 3788 | 3813 | ||
1931 | 3789 | baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt; | 3814 | baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt; |
1932 | diff --git a/net/wireless/core.h b/net/wireless/core.h | |||
1933 | index 3c4ff6c..e5bc6ec 100644 | |||
1934 | --- a/net/wireless/core.h | |||
1935 | +++ b/net/wireless/core.h | |||
1936 | @@ -385,7 +385,7 @@ void cfg80211_mlme_down(struct cfg80211_registered_device *rdev, | |||
1937 | 385 | struct net_device *dev); | 385 | struct net_device *dev); |
1938 | 386 | int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_pid, | 386 | int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_pid, |
1939 | 387 | u16 frame_type, const u8 *match_data, | 387 | u16 frame_type, const u8 *match_data, |
1941 | 388 | int match_len); | 388 | int match_len, struct netlink_ext_ack *extack); |
1942 | 389 | void cfg80211_mlme_unreg_wk(struct work_struct *wk); | 389 | void cfg80211_mlme_unreg_wk(struct work_struct *wk); |
1943 | 390 | void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlpid); | 390 | void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlpid); |
1944 | 391 | void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev); | 391 | void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev); |
1945 | diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c | |||
1946 | index 1b5cf1a..0657c5a 100644 | |||
1947 | --- a/net/wireless/mlme.c | |||
1948 | +++ b/net/wireless/mlme.c | |||
1949 | @@ -4,6 +4,7 @@ | |||
1950 | 4 | * | 4 | * |
1951 | 5 | * Copyright (c) 2009, Jouni Malinen <j@w1.fi> | 5 | * Copyright (c) 2009, Jouni Malinen <j@w1.fi> |
1952 | 6 | * Copyright (c) 2015 Intel Deutschland GmbH | 6 | * Copyright (c) 2015 Intel Deutschland GmbH |
1953 | 7 | * Copyright (C) 2019 Intel Corporation | ||
1954 | 7 | */ | 8 | */ |
1955 | 8 | 9 | ||
1956 | 9 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
1957 | @@ -470,7 +471,7 @@ void cfg80211_mlme_unreg_wk(struct work_struct *wk) | |||
1958 | 470 | 471 | ||
1959 | 471 | int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid, | 472 | int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid, |
1960 | 472 | u16 frame_type, const u8 *match_data, | 473 | u16 frame_type, const u8 *match_data, |
1962 | 473 | int match_len) | 474 | int match_len, struct netlink_ext_ack *extack) |
1963 | 474 | { | 475 | { |
1964 | 475 | struct wiphy *wiphy = wdev->wiphy; | 476 | struct wiphy *wiphy = wdev->wiphy; |
1965 | 476 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); | 477 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); |
1966 | @@ -481,15 +482,38 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid, | |||
1967 | 481 | if (!wdev->wiphy->mgmt_stypes) | 482 | if (!wdev->wiphy->mgmt_stypes) |
1968 | 482 | return -EOPNOTSUPP; | 483 | return -EOPNOTSUPP; |
1969 | 483 | 484 | ||
1971 | 484 | if ((frame_type & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_MGMT) | 485 | if ((frame_type & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_MGMT) { |
1972 | 486 | NL_SET_ERR_MSG(extack, "frame type not management"); | ||
1973 | 485 | return -EINVAL; | 487 | return -EINVAL; |
1974 | 488 | } | ||
1975 | 486 | 489 | ||
1977 | 487 | if (frame_type & ~(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) | 490 | if (frame_type & ~(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) { |
1978 | 491 | NL_SET_ERR_MSG(extack, "Invalid frame type"); | ||
1979 | 488 | return -EINVAL; | 492 | return -EINVAL; |
1980 | 493 | } | ||
1981 | 489 | 494 | ||
1982 | 490 | mgmt_type = (frame_type & IEEE80211_FCTL_STYPE) >> 4; | 495 | mgmt_type = (frame_type & IEEE80211_FCTL_STYPE) >> 4; |
1984 | 491 | if (!(wdev->wiphy->mgmt_stypes[wdev->iftype].rx & BIT(mgmt_type))) | 496 | if (!(wdev->wiphy->mgmt_stypes[wdev->iftype].rx & BIT(mgmt_type))) { |
1985 | 497 | NL_SET_ERR_MSG(extack, | ||
1986 | 498 | "Registration to specific type not supported"); | ||
1987 | 499 | return -EINVAL; | ||
1988 | 500 | } | ||
1989 | 501 | |||
1990 | 502 | /* | ||
1991 | 503 | * To support Pre Association Security Negotiation (PASN), registration | ||
1992 | 504 | * for authentication frames should be supported. However, as some | ||
1993 | 505 | * versions of the user space daemons wrongly register to all types of | ||
1994 | 506 | * authentication frames (which might result in unexpected behavior) | ||
1995 | 507 | * allow such registration if the request is for a specific | ||
1996 | 508 | * authentication algorithm number. | ||
1997 | 509 | */ | ||
1998 | 510 | if (wdev->iftype == NL80211_IFTYPE_STATION && | ||
1999 | 511 | (frame_type & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_AUTH && | ||
2000 | 512 | !(match_data && match_len >= 2)) { | ||
2001 | 513 | NL_SET_ERR_MSG(extack, | ||
2002 | 514 | "Authentication algorithm number required"); | ||
2003 | 492 | return -EINVAL; | 515 | return -EINVAL; |
2004 | 516 | } | ||
2005 | 493 | 517 | ||
2006 | 494 | nreg = kzalloc(sizeof(*reg) + match_len, GFP_KERNEL); | 518 | nreg = kzalloc(sizeof(*reg) + match_len, GFP_KERNEL); |
2007 | 495 | if (!nreg) | 519 | if (!nreg) |
2008 | @@ -504,6 +528,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid, | |||
2009 | 504 | continue; | 528 | continue; |
2010 | 505 | 529 | ||
2011 | 506 | if (memcmp(reg->match, match_data, mlen) == 0) { | 530 | if (memcmp(reg->match, match_data, mlen) == 0) { |
2012 | 531 | NL_SET_ERR_MSG(extack, "Match already configured"); | ||
2013 | 507 | err = -EALREADY; | 532 | err = -EALREADY; |
2014 | 508 | break; | 533 | break; |
2015 | 509 | } | 534 | } |
2016 | diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c | |||
2017 | index 56d8559..fa70b33 100644 | |||
2018 | --- a/net/wireless/nl80211.c | |||
2019 | +++ b/net/wireless/nl80211.c | |||
2020 | @@ -10430,7 +10430,8 @@ static int nl80211_register_mgmt(struct sk_buff *skb, struct genl_info *info) | |||
2021 | 10430 | return cfg80211_mlme_register_mgmt(wdev, genl_info_snd_portid(info), | 10430 | return cfg80211_mlme_register_mgmt(wdev, genl_info_snd_portid(info), |
2022 | 10431 | frame_type, | 10431 | frame_type, |
2023 | 10432 | nla_data(info->attrs[NL80211_ATTR_FRAME_MATCH]), | 10432 | nla_data(info->attrs[NL80211_ATTR_FRAME_MATCH]), |
2025 | 10433 | nla_len(info->attrs[NL80211_ATTR_FRAME_MATCH])); | 10433 | nla_len(info->attrs[NL80211_ATTR_FRAME_MATCH]), |
2026 | 10434 | genl_info_extack(info)); | ||
2027 | 10434 | } | 10435 | } |
2028 | 10435 | 10436 | ||
2029 | 10436 | static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info) | 10437 | static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info) |
2030 | diff --git a/net/wireless/scan.c b/net/wireless/scan.c | |||
2031 | index ac6cf47..eeef8d9 100644 | |||
2032 | --- a/net/wireless/scan.c | |||
2033 | +++ b/net/wireless/scan.c | |||
2034 | @@ -484,8 +484,8 @@ static bool cfg80211_bss_expire_oldest(struct cfg80211_registered_device *rdev) | |||
2035 | 484 | return ret; | 484 | return ret; |
2036 | 485 | } | 485 | } |
2037 | 486 | 486 | ||
2040 | 487 | static void cfg80211_parse_bss_param(u8 data, | 487 | static u8 cfg80211_parse_bss_param(u8 data, |
2041 | 488 | struct cfg80211_colocated_ap *coloc_ap) | 488 | struct cfg80211_colocated_ap *coloc_ap) |
2042 | 489 | { | 489 | { |
2043 | 490 | coloc_ap->oct_recommended = | 490 | coloc_ap->oct_recommended = |
2044 | 491 | u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_OCT_RECOMMENDED); | 491 | u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_OCT_RECOMMENDED); |
2045 | @@ -499,6 +499,8 @@ static void cfg80211_parse_bss_param(u8 data, | |||
2046 | 499 | u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_PROBE_ACTIVE); | 499 | u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_PROBE_ACTIVE); |
2047 | 500 | coloc_ap->colocated_ess = | 500 | coloc_ap->colocated_ess = |
2048 | 501 | u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_COLOC_ESS); | 501 | u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_COLOC_ESS); |
2049 | 502 | |||
2050 | 503 | return u8_get_bits(data, IEEE80211_RNR_TBTT_PARAMS_COLOC_AP); | ||
2051 | 502 | } | 504 | } |
2052 | 503 | 505 | ||
2053 | 504 | static int cfg80211_calc_short_ssid(const struct cfg80211_bss_ies *ies, | 506 | static int cfg80211_calc_short_ssid(const struct cfg80211_bss_ies *ies, |
2054 | @@ -524,7 +526,7 @@ static void cfg80211_free_coloc_ap_list(struct list_head *coloc_ap_list) | |||
2055 | 524 | } | 526 | } |
2056 | 525 | 527 | ||
2057 | 526 | static int cfg80211_parse_ap_info(struct cfg80211_colocated_ap *entry, | 528 | static int cfg80211_parse_ap_info(struct cfg80211_colocated_ap *entry, |
2059 | 527 | const u8 *pos, u8 length, bool filtered, | 529 | const u8 *pos, u8 length, |
2060 | 528 | const struct element *ssid_elem, | 530 | const struct element *ssid_elem, |
2061 | 529 | int s_ssid_tmp) | 531 | int s_ssid_tmp) |
2062 | 530 | { | 532 | { |
2063 | @@ -534,25 +536,24 @@ static int cfg80211_parse_ap_info(struct cfg80211_colocated_ap *entry, | |||
2064 | 534 | memcpy(entry->bssid, pos, ETH_ALEN); | 536 | memcpy(entry->bssid, pos, ETH_ALEN); |
2065 | 535 | pos += ETH_ALEN; | 537 | pos += ETH_ALEN; |
2066 | 536 | 538 | ||
2070 | 537 | if (length == IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID || | 539 | if (length == IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM) { |
2068 | 538 | length == | ||
2069 | 539 | IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM) { | ||
2071 | 540 | memcpy(&entry->short_ssid, pos, | 540 | memcpy(&entry->short_ssid, pos, |
2072 | 541 | sizeof(entry->short_ssid)); | 541 | sizeof(entry->short_ssid)); |
2073 | 542 | pos += 4; | 542 | pos += 4; |
2074 | 543 | } | 543 | } |
2075 | 544 | 544 | ||
2080 | 545 | if (length == | 545 | /* skip non colocated APs */ |
2081 | 546 | IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM) { | 546 | if (!cfg80211_parse_bss_param(*pos, entry)) |
2082 | 547 | cfg80211_parse_bss_param(*pos, entry); | 547 | return -EINVAL; |
2083 | 548 | pos++; | 548 | pos++; |
2084 | 549 | 549 | ||
2085 | 550 | if (length == IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM) { | ||
2086 | 550 | /* no information about the short ssid - ignore it */ | 551 | /* no information about the short ssid - ignore it */ |
2087 | 551 | if (!entry->same_ssid) | 552 | if (!entry->same_ssid) |
2088 | 552 | return -EINVAL; | 553 | return -EINVAL; |
2089 | 553 | } | 554 | } |
2090 | 554 | 555 | ||
2092 | 555 | if (entry->same_ssid || filtered) { | 556 | if (entry->same_ssid) { |
2093 | 556 | entry->short_ssid = s_ssid_tmp; | 557 | entry->short_ssid = s_ssid_tmp; |
2094 | 557 | memcpy(&entry->ssid, &ssid_elem->data, | 558 | memcpy(&entry->ssid, &ssid_elem->data, |
2095 | 558 | ssid_elem->datalen); | 559 | ssid_elem->datalen); |
2096 | @@ -584,37 +585,35 @@ static int cfg80211_parse_colocated_ap(const struct cfg80211_bss_ies *ies, | |||
2097 | 584 | 585 | ||
2098 | 585 | /* RNR IE may contain more than one NEIGHBOR_AP_INFO */ | 586 | /* RNR IE may contain more than one NEIGHBOR_AP_INFO */ |
2099 | 586 | while (pos + IEEE80211_MIN_AP_NEIGHBOR_INFO_SIZE <= end) { | 587 | while (pos + IEEE80211_MIN_AP_NEIGHBOR_INFO_SIZE <= end) { |
2100 | 587 | bool filtered, colocated; | ||
2101 | 588 | struct cfg80211_neighbor_ap_info *ap_info; | 588 | struct cfg80211_neighbor_ap_info *ap_info; |
2102 | 589 | enum nl80211_band band; | 589 | enum nl80211_band band; |
2103 | 590 | int freq; | 590 | int freq; |
2104 | 591 | u8 length, i, count; | 591 | u8 length, i, count; |
2105 | 592 | 592 | ||
2106 | 593 | ap_info = (struct cfg80211_neighbor_ap_info *)pos; | 593 | ap_info = (struct cfg80211_neighbor_ap_info *)pos; |
2107 | 594 | filtered = u8_get_bits(ap_info->tbtt_info_hdr, | ||
2108 | 595 | IEEE80211_AP_INFO_TBTT_HDR_FILTERED); | ||
2109 | 596 | colocated = u8_get_bits(ap_info->tbtt_info_hdr, | ||
2110 | 597 | IEEE80211_AP_INFO_TBTT_HDR_COLOC); | ||
2111 | 598 | count = u8_get_bits(ap_info->tbtt_info_hdr, | 594 | count = u8_get_bits(ap_info->tbtt_info_hdr, |
2112 | 599 | IEEE80211_AP_INFO_TBTT_HDR_COUNT) + 1; | 595 | IEEE80211_AP_INFO_TBTT_HDR_COUNT) + 1; |
2113 | 600 | length = ap_info->tbtt_info_len; | 596 | length = ap_info->tbtt_info_len; |
2114 | 601 | 597 | ||
2115 | 602 | pos += sizeof(*ap_info); | 598 | pos += sizeof(*ap_info); |
2116 | 603 | 599 | ||
2118 | 604 | ieee80211_operating_class_to_band(ap_info->op_class, &band); | 600 | if (!ieee80211_operating_class_to_band(ap_info->op_class, |
2119 | 601 | &band)) | ||
2120 | 602 | break; | ||
2121 | 603 | |||
2122 | 605 | freq = ieee80211_channel_to_frequency(ap_info->channel, band); | 604 | freq = ieee80211_channel_to_frequency(ap_info->channel, band); |
2123 | 606 | 605 | ||
2124 | 607 | if (end - pos < count * ap_info->tbtt_info_len) | 606 | if (end - pos < count * ap_info->tbtt_info_len) |
2126 | 608 | return 0; | 607 | break; |
2127 | 609 | 608 | ||
2128 | 610 | /* | 609 | /* |
2131 | 611 | * TBTT info must include both BSSID and (short SSID or SSID) | 610 | * TBTT info must include bss param + BSSID + |
2132 | 612 | * ignore other options, and move to the next AP info | 611 | * (short SSID or same_ssid bit to be set). |
2133 | 612 | * ignore other options, and move to the | ||
2134 | 613 | * next AP info | ||
2135 | 613 | */ | 614 | */ |
2140 | 614 | if (!colocated || band != NL80211_BAND_6GHZ || | 615 | if (band != NL80211_BAND_6GHZ || |
2141 | 615 | (length != IEEE80211_TBTT_INFO_OFFSET_BSSID && | 616 | (length != IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM && |
2138 | 616 | length != IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM && | ||
2139 | 617 | length != IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID && | ||
2142 | 618 | length < IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM)) { | 617 | length < IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM)) { |
2143 | 619 | pos += count * ap_info->tbtt_info_len; | 618 | pos += count * ap_info->tbtt_info_len; |
2144 | 620 | continue; | 619 | continue; |
2145 | @@ -626,15 +625,12 @@ static int cfg80211_parse_colocated_ap(const struct cfg80211_bss_ies *ies, | |||
2146 | 626 | entry = kzalloc(sizeof(*entry) + IEEE80211_MAX_SSID_LEN, | 625 | entry = kzalloc(sizeof(*entry) + IEEE80211_MAX_SSID_LEN, |
2147 | 627 | GFP_ATOMIC); | 626 | GFP_ATOMIC); |
2148 | 628 | 627 | ||
2153 | 629 | if (!entry) { | 628 | if (!entry) |
2154 | 630 | cfg80211_free_coloc_ap_list(&ap_list); | 629 | break; |
2151 | 631 | return 0; | ||
2152 | 632 | } | ||
2155 | 633 | 630 | ||
2156 | 634 | entry->center_freq = freq; | 631 | entry->center_freq = freq; |
2157 | 635 | 632 | ||
2160 | 636 | if (!cfg80211_parse_ap_info(entry, pos, length, | 633 | if (!cfg80211_parse_ap_info(entry, pos, length, elem, |
2159 | 637 | filtered, elem, | ||
2161 | 638 | s_ssid_tmp)){ | 634 | s_ssid_tmp)){ |
2162 | 639 | n_coloc++; | 635 | n_coloc++; |
2163 | 640 | list_add_tail(&entry->list, &ap_list); | 636 | list_add_tail(&entry->list, &ap_list); |
2164 | diff --git a/versions b/versions | |||
2165 | index e38a8a8..a3eee32 100644 | |||
2166 | --- a/versions | |||
2167 | +++ b/versions | |||
2168 | @@ -2,4 +2,4 @@ BACKPORTS_VERSION="(see git)" | |||
2169 | 2 | BACKPORTED_KERNEL_VERSION="(see git)" | 2 | BACKPORTED_KERNEL_VERSION="(see git)" |
2170 | 3 | BACKPORTED_KERNEL_NAME="iwlwifi" | 3 | BACKPORTED_KERNEL_NAME="iwlwifi" |
2171 | 4 | BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__ | 4 | BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__ |
2173 | 5 | BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:8286:2451d0de" | 5 | BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:8324:9176b151" |
Landed.