mac80211: brcmfmac: backport 4.19 patches preparing monitor mode support
[openwrt/staging/wigyori.git] / package / kernel / mac80211 / patches / 380-0008-ath10k-DFS-Host-Confirmation.patch
1 From 6f6eb1bcbeff48c875617b800f00f1c5d1b12290 Mon Sep 17 00:00:00 2001
2 From: Sriram R <srirrama@codeaurora.org>
3 Date: Tue, 15 May 2018 14:39:49 +0530
4 Subject: [PATCH] ath10k: DFS Host Confirmation
5
6 In the 10.4-3.6 firmware branch there's a new DFS Host confirmation
7 feature which is advertised using WMI_SERVICE_HOST_DFS_CHECK_SUPPORT flag.
8
9 This new features enables the ath10k host to send information to the
10 firmware on the specifications of detected radar type. This allows the
11 firmware to validate if the host's radar pattern detector unit is
12 operational and check if the radar information shared by host matches
13 the radar pulses sent as phy error events from firmware. If the check
14 fails the firmware won't allow use of DFS channels on AP mode when using
15 FCC regulatory region.
16
17 Hence this patch is mandatory when using a firmware from 10.4-3.6 branch.
18 Else, DFS channels on FCC regions cannot be used.
19
20 Supported Chipsets : QCA9984/QCA9888/QCA4019
21 Firmware Version : 10.4-3.6-00104
22
23 Signed-off-by: Sriram R <srirrama@codeaurora.org>
24 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
25 ---
26 drivers/net/wireless/ath/ath10k/core.h | 21 ++++
27 drivers/net/wireless/ath/ath10k/mac.c | 12 ++
28 drivers/net/wireless/ath/ath10k/wmi-ops.h | 32 +++++
29 drivers/net/wireless/ath/ath10k/wmi.c | 186 ++++++++++++++++++++++++++++--
30 drivers/net/wireless/ath/ath10k/wmi.h | 32 +++++
31 5 files changed, 273 insertions(+), 10 deletions(-)
32
33 --- a/drivers/net/wireless/ath/ath10k/core.h
34 +++ b/drivers/net/wireless/ath/ath10k/core.h
35 @@ -171,6 +171,7 @@ struct ath10k_wmi {
36 struct completion service_ready;
37 struct completion unified_ready;
38 struct completion barrier;
39 + struct completion radar_confirm;
40 wait_queue_head_t tx_credits_wq;
41 DECLARE_BITMAP(svc_map, WMI_SERVICE_MAX);
42 struct wmi_cmd_map *cmd;
43 @@ -352,6 +353,21 @@ struct ath10k_dfs_stats {
44 u32 radar_detected;
45 };
46
47 +enum ath10k_radar_confirmation_state {
48 + ATH10K_RADAR_CONFIRMATION_IDLE = 0,
49 + ATH10K_RADAR_CONFIRMATION_INPROGRESS,
50 + ATH10K_RADAR_CONFIRMATION_STOPPED,
51 +};
52 +
53 +struct ath10k_radar_found_info {
54 + u32 pri_min;
55 + u32 pri_max;
56 + u32 width_min;
57 + u32 width_max;
58 + u32 sidx_min;
59 + u32 sidx_max;
60 +};
61 +
62 #define ATH10K_MAX_NUM_PEER_IDS (1 << 11) /* htt rx_desc limit */
63
64 struct ath10k_peer {
65 @@ -1026,6 +1042,11 @@ struct ath10k {
66
67 void *ce_priv;
68
69 + /* protected by data_lock */
70 + enum ath10k_radar_confirmation_state radar_conf_state;
71 + struct ath10k_radar_found_info last_radar_info;
72 + struct work_struct radar_confirmation_work;
73 +
74 /* must be last */
75 u8 drv_priv[0] __aligned(sizeof(void *));
76 };
77 --- a/drivers/net/wireless/ath/ath10k/mac.c
78 +++ b/drivers/net/wireless/ath/ath10k/mac.c
79 @@ -3216,6 +3216,15 @@ static void ath10k_reg_notifier(struct w
80 ar->hw->wiphy->bands[NL80211_BAND_5GHZ]);
81 }
82
83 +static void ath10k_stop_radar_confirmation(struct ath10k *ar)
84 +{
85 + spin_lock_bh(&ar->data_lock);
86 + ar->radar_conf_state = ATH10K_RADAR_CONFIRMATION_STOPPED;
87 + spin_unlock_bh(&ar->data_lock);
88 +
89 + cancel_work_sync(&ar->radar_confirmation_work);
90 +}
91 +
92 /***************/
93 /* TX handlers */
94 /***************/
95 @@ -4315,6 +4324,7 @@ void ath10k_halt(struct ath10k *ar)
96
97 ath10k_scan_finish(ar);
98 ath10k_peer_cleanup_all(ar);
99 + ath10k_stop_radar_confirmation(ar);
100 ath10k_core_stop(ar);
101 ath10k_hif_power_down(ar);
102
103 @@ -4733,6 +4743,8 @@ static int ath10k_start(struct ieee80211
104 ath10k_spectral_start(ar);
105 ath10k_thermal_set_throttling(ar);
106
107 + ar->radar_conf_state = ATH10K_RADAR_CONFIRMATION_IDLE;
108 +
109 mutex_unlock(&ar->conf_mutex);
110 return 0;
111
112 --- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
113 +++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
114 @@ -53,6 +53,8 @@ struct wmi_ops {
115 struct wmi_wow_ev_arg *arg);
116 int (*pull_echo_ev)(struct ath10k *ar, struct sk_buff *skb,
117 struct wmi_echo_ev_arg *arg);
118 + int (*pull_dfs_status_ev)(struct ath10k *ar, struct sk_buff *skb,
119 + struct wmi_dfs_status_ev_arg *arg);
120 enum wmi_txbf_conf (*get_txbf_conf_scheme)(struct ath10k *ar);
121
122 struct sk_buff *(*gen_pdev_suspend)(struct ath10k *ar, u32 suspend_opt);
123 @@ -178,6 +180,9 @@ struct wmi_ops {
124 const struct wmi_tdls_peer_update_cmd_arg *arg,
125 const struct wmi_tdls_peer_capab_arg *cap,
126 const struct wmi_channel_arg *chan);
127 + struct sk_buff *(*gen_radar_found)
128 + (struct ath10k *ar,
129 + const struct ath10k_radar_found_info *arg);
130 struct sk_buff *(*gen_adaptive_qcs)(struct ath10k *ar, bool enable);
131 struct sk_buff *(*gen_pdev_get_tpc_config)(struct ath10k *ar,
132 u32 param);
133 @@ -365,6 +370,16 @@ ath10k_wmi_pull_echo_ev(struct ath10k *a
134 return ar->wmi.ops->pull_echo_ev(ar, skb, arg);
135 }
136
137 +static inline int
138 +ath10k_wmi_pull_dfs_status(struct ath10k *ar, struct sk_buff *skb,
139 + struct wmi_dfs_status_ev_arg *arg)
140 +{
141 + if (!ar->wmi.ops->pull_dfs_status_ev)
142 + return -EOPNOTSUPP;
143 +
144 + return ar->wmi.ops->pull_dfs_status_ev(ar, skb, arg);
145 +}
146 +
147 static inline enum wmi_txbf_conf
148 ath10k_wmi_get_txbf_conf_scheme(struct ath10k *ar)
149 {
150 @@ -1438,4 +1453,21 @@ ath10k_wmi_pdev_get_tpc_table_cmdid(stru
151 ar->wmi.cmd->pdev_get_tpc_table_cmdid);
152 }
153
154 +static inline int
155 +ath10k_wmi_report_radar_found(struct ath10k *ar,
156 + const struct ath10k_radar_found_info *arg)
157 +{
158 + struct sk_buff *skb;
159 +
160 + if (!ar->wmi.ops->gen_radar_found)
161 + return -EOPNOTSUPP;
162 +
163 + skb = ar->wmi.ops->gen_radar_found(ar, arg);
164 + if (IS_ERR(skb))
165 + return PTR_ERR(skb);
166 +
167 + return ath10k_wmi_cmd_send(ar, skb,
168 + ar->wmi.cmd->radar_found_cmdid);
169 +}
170 +
171 #endif
172 --- a/drivers/net/wireless/ath/ath10k/wmi.c
173 +++ b/drivers/net/wireless/ath/ath10k/wmi.c
174 @@ -34,6 +34,7 @@
175
176 #define ATH10K_WMI_BARRIER_ECHO_ID 0xBA991E9
177 #define ATH10K_WMI_BARRIER_TIMEOUT_HZ (3 * HZ)
178 +#define ATH10K_WMI_DFS_CONF_TIMEOUT_HZ (HZ / 6)
179
180 /* MAIN WMI cmd track */
181 static struct wmi_cmd_map wmi_cmd_map = {
182 @@ -198,6 +199,7 @@ static struct wmi_cmd_map wmi_cmd_map =
183 .set_cca_params_cmdid = WMI_CMD_UNSUPPORTED,
184 .pdev_bss_chan_info_request_cmdid = WMI_CMD_UNSUPPORTED,
185 .pdev_get_tpc_table_cmdid = WMI_CMD_UNSUPPORTED,
186 + .radar_found_cmdid = WMI_CMD_UNSUPPORTED,
187 };
188
189 /* 10.X WMI cmd track */
190 @@ -365,6 +367,7 @@ static struct wmi_cmd_map wmi_10x_cmd_ma
191 .set_cca_params_cmdid = WMI_CMD_UNSUPPORTED,
192 .pdev_bss_chan_info_request_cmdid = WMI_CMD_UNSUPPORTED,
193 .pdev_get_tpc_table_cmdid = WMI_CMD_UNSUPPORTED,
194 + .radar_found_cmdid = WMI_CMD_UNSUPPORTED,
195 };
196
197 /* 10.2.4 WMI cmd track */
198 @@ -532,6 +535,7 @@ static struct wmi_cmd_map wmi_10_2_4_cmd
199 .pdev_bss_chan_info_request_cmdid =
200 WMI_10_2_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
201 .pdev_get_tpc_table_cmdid = WMI_CMD_UNSUPPORTED,
202 + .radar_found_cmdid = WMI_CMD_UNSUPPORTED,
203 };
204
205 /* 10.4 WMI cmd track */
206 @@ -741,6 +745,7 @@ static struct wmi_cmd_map wmi_10_4_cmd_m
207 .tdls_set_state_cmdid = WMI_10_4_TDLS_SET_STATE_CMDID,
208 .tdls_peer_update_cmdid = WMI_10_4_TDLS_PEER_UPDATE_CMDID,
209 .tdls_set_offchan_mode_cmdid = WMI_10_4_TDLS_SET_OFFCHAN_MODE_CMDID,
210 + .radar_found_cmdid = WMI_10_4_RADAR_FOUND_CMDID,
211 };
212
213 /* MAIN WMI VDEV param map */
214 @@ -1485,6 +1490,7 @@ static struct wmi_cmd_map wmi_10_2_cmd_m
215 .pdev_get_ani_ofdm_config_cmdid = WMI_CMD_UNSUPPORTED,
216 .pdev_reserve_ast_entry_cmdid = WMI_CMD_UNSUPPORTED,
217 .pdev_get_tpc_table_cmdid = WMI_CMD_UNSUPPORTED,
218 + .radar_found_cmdid = WMI_CMD_UNSUPPORTED,
219 };
220
221 static struct wmi_pdev_param_map wmi_10_4_pdev_param_map = {
222 @@ -3638,6 +3644,68 @@ void ath10k_wmi_event_tbttoffset_update(
223 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_TBTTOFFSET_UPDATE_EVENTID\n");
224 }
225
226 +static void ath10k_radar_detected(struct ath10k *ar)
227 +{
228 + ath10k_dbg(ar, ATH10K_DBG_REGULATORY, "dfs radar detected\n");
229 + ATH10K_DFS_STAT_INC(ar, radar_detected);
230 +
231 + /* Control radar events reporting in debugfs file
232 + * dfs_block_radar_events
233 + */
234 + if (ar->dfs_block_radar_events)
235 + ath10k_info(ar, "DFS Radar detected, but ignored as requested\n");
236 + else
237 + ieee80211_radar_detected(ar->hw);
238 +}
239 +
240 +static void ath10k_radar_confirmation_work(struct work_struct *work)
241 +{
242 + struct ath10k *ar = container_of(work, struct ath10k,
243 + radar_confirmation_work);
244 + struct ath10k_radar_found_info radar_info;
245 + int ret, time_left;
246 +
247 + reinit_completion(&ar->wmi.radar_confirm);
248 +
249 + spin_lock_bh(&ar->data_lock);
250 + memcpy(&radar_info, &ar->last_radar_info, sizeof(radar_info));
251 + spin_unlock_bh(&ar->data_lock);
252 +
253 + ret = ath10k_wmi_report_radar_found(ar, &radar_info);
254 + if (ret) {
255 + ath10k_warn(ar, "failed to send radar found %d\n", ret);
256 + goto wait_complete;
257 + }
258 +
259 + time_left = wait_for_completion_timeout(&ar->wmi.radar_confirm,
260 + ATH10K_WMI_DFS_CONF_TIMEOUT_HZ);
261 + if (time_left) {
262 + /* DFS Confirmation status event received and
263 + * necessary action completed.
264 + */
265 + goto wait_complete;
266 + } else {
267 + /* DFS Confirmation event not received from FW.Considering this
268 + * as real radar.
269 + */
270 + ath10k_dbg(ar, ATH10K_DBG_REGULATORY,
271 + "dfs confirmation not received from fw, considering as radar\n");
272 + goto radar_detected;
273 + }
274 +
275 +radar_detected:
276 + ath10k_radar_detected(ar);
277 +
278 + /* Reset state to allow sending confirmation on consecutive radar
279 + * detections, unless radar confirmation is disabled/stopped.
280 + */
281 +wait_complete:
282 + spin_lock_bh(&ar->data_lock);
283 + if (ar->radar_conf_state != ATH10K_RADAR_CONFIRMATION_STOPPED)
284 + ar->radar_conf_state = ATH10K_RADAR_CONFIRMATION_IDLE;
285 + spin_unlock_bh(&ar->data_lock);
286 +}
287 +
288 static void ath10k_dfs_radar_report(struct ath10k *ar,
289 struct wmi_phyerr_ev_arg *phyerr,
290 const struct phyerr_radar_report *rr,
291 @@ -3646,8 +3714,10 @@ static void ath10k_dfs_radar_report(stru
292 u32 reg0, reg1, tsf32l;
293 struct ieee80211_channel *ch;
294 struct pulse_event pe;
295 + struct radar_detector_specs rs;
296 u64 tsf64;
297 u8 rssi, width;
298 + struct ath10k_radar_found_info *radar_info;
299
300 reg0 = __le32_to_cpu(rr->reg0);
301 reg1 = __le32_to_cpu(rr->reg1);
302 @@ -3712,25 +3782,46 @@ static void ath10k_dfs_radar_report(stru
303
304 ATH10K_DFS_STAT_INC(ar, pulses_detected);
305
306 - if (!ar->dfs_detector->add_pulse(ar->dfs_detector, &pe, NULL)) {
307 + if (!ar->dfs_detector->add_pulse(ar->dfs_detector, &pe, &rs)) {
308 ath10k_dbg(ar, ATH10K_DBG_REGULATORY,
309 "dfs no pulse pattern detected, yet\n");
310 return;
311 }
312
313 -radar_detected:
314 - ath10k_dbg(ar, ATH10K_DBG_REGULATORY, "dfs radar detected\n");
315 - ATH10K_DFS_STAT_INC(ar, radar_detected);
316 + if ((test_bit(WMI_SERVICE_HOST_DFS_CHECK_SUPPORT, ar->wmi.svc_map)) &&
317 + ar->dfs_detector->region == NL80211_DFS_FCC) {
318 + /* Consecutive radar indications need not be
319 + * sent to the firmware until we get confirmation
320 + * for the previous detected radar.
321 + */
322 + spin_lock_bh(&ar->data_lock);
323 + if (ar->radar_conf_state != ATH10K_RADAR_CONFIRMATION_IDLE) {
324 + spin_unlock_bh(&ar->data_lock);
325 + return;
326 + }
327 + ar->radar_conf_state = ATH10K_RADAR_CONFIRMATION_INPROGRESS;
328 + radar_info = &ar->last_radar_info;
329
330 - /* Control radar events reporting in debugfs file
331 - * dfs_block_radar_events
332 - */
333 - if (ar->dfs_block_radar_events) {
334 - ath10k_info(ar, "DFS Radar detected, but ignored as requested\n");
335 + radar_info->pri_min = rs.pri_min;
336 + radar_info->pri_max = rs.pri_max;
337 + radar_info->width_min = rs.width_min;
338 + radar_info->width_max = rs.width_max;
339 + /*TODO Find sidx_min and sidx_max */
340 + radar_info->sidx_min = MS(reg0, RADAR_REPORT_REG0_PULSE_SIDX);
341 + radar_info->sidx_max = MS(reg0, RADAR_REPORT_REG0_PULSE_SIDX);
342 +
343 + ath10k_dbg(ar, ATH10K_DBG_REGULATORY,
344 + "sending wmi radar found cmd pri_min %d pri_max %d width_min %d width_max %d sidx_min %d sidx_max %d\n",
345 + radar_info->pri_min, radar_info->pri_max,
346 + radar_info->width_min, radar_info->width_max,
347 + radar_info->sidx_min, radar_info->sidx_max);
348 + ieee80211_queue_work(ar->hw, &ar->radar_confirmation_work);
349 + spin_unlock_bh(&ar->data_lock);
350 return;
351 }
352
353 - ieee80211_radar_detected(ar->hw);
354 +radar_detected:
355 + ath10k_radar_detected(ar);
356 }
357
358 static int ath10k_dfs_fft_report(struct ath10k *ar,
359 @@ -4080,6 +4171,47 @@ void ath10k_wmi_event_phyerr(struct ath1
360 }
361 }
362
363 +static int
364 +ath10k_wmi_10_4_op_pull_dfs_status_ev(struct ath10k *ar, struct sk_buff *skb,
365 + struct wmi_dfs_status_ev_arg *arg)
366 +{
367 + struct wmi_dfs_status_ev_arg *ev = (void *)skb->data;
368 +
369 + if (skb->len < sizeof(*ev))
370 + return -EPROTO;
371 +
372 + arg->status = ev->status;
373 +
374 + return 0;
375 +}
376 +
377 +static void
378 +ath10k_wmi_event_dfs_status_check(struct ath10k *ar, struct sk_buff *skb)
379 +{
380 + struct wmi_dfs_status_ev_arg status_arg = {};
381 + int ret;
382 +
383 + ret = ath10k_wmi_pull_dfs_status(ar, skb, &status_arg);
384 +
385 + if (ret) {
386 + ath10k_warn(ar, "failed to parse dfs status event: %d\n", ret);
387 + return;
388 + }
389 +
390 + ath10k_dbg(ar, ATH10K_DBG_REGULATORY,
391 + "dfs status event received from fw: %d\n",
392 + status_arg.status);
393 +
394 + /* Even in case of radar detection failure we follow the same
395 + * behaviour as if radar is detected i.e to switch to a different
396 + * channel.
397 + */
398 + if (status_arg.status == WMI_HW_RADAR_DETECTED ||
399 + status_arg.status == WMI_RADAR_DETECTION_FAIL)
400 + ath10k_radar_detected(ar);
401 + complete(&ar->wmi.radar_confirm);
402 +}
403 +
404 void ath10k_wmi_event_roam(struct ath10k *ar, struct sk_buff *skb)
405 {
406 struct wmi_roam_ev_arg arg = {};
407 @@ -5814,6 +5946,9 @@ static void ath10k_wmi_10_4_op_rx(struct
408 case WMI_10_4_PDEV_TPC_TABLE_EVENTID:
409 ath10k_wmi_event_tpc_final_table(ar, skb);
410 break;
411 + case WMI_10_4_DFS_STATUS_CHECK_EVENTID:
412 + ath10k_wmi_event_dfs_status_check(ar, skb);
413 + break;
414 default:
415 ath10k_warn(ar, "Unknown eventid: %d\n", id);
416 break;
417 @@ -8332,6 +8467,32 @@ ath10k_wmi_10_4_gen_tdls_peer_update(str
418 }
419
420 static struct sk_buff *
421 +ath10k_wmi_10_4_gen_radar_found(struct ath10k *ar,
422 + const struct ath10k_radar_found_info *arg)
423 +{
424 + struct wmi_radar_found_info *cmd;
425 + struct sk_buff *skb;
426 +
427 + skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd));
428 + if (!skb)
429 + return ERR_PTR(-ENOMEM);
430 +
431 + cmd = (struct wmi_radar_found_info *)skb->data;
432 + cmd->pri_min = __cpu_to_le32(arg->pri_min);
433 + cmd->pri_max = __cpu_to_le32(arg->pri_max);
434 + cmd->width_min = __cpu_to_le32(arg->width_min);
435 + cmd->width_max = __cpu_to_le32(arg->width_max);
436 + cmd->sidx_min = __cpu_to_le32(arg->sidx_min);
437 + cmd->sidx_max = __cpu_to_le32(arg->sidx_max);
438 +
439 + ath10k_dbg(ar, ATH10K_DBG_WMI,
440 + "wmi radar found pri_min %d pri_max %d width_min %d width_max %d sidx_min %d sidx_max %d\n",
441 + arg->pri_min, arg->pri_max, arg->width_min,
442 + arg->width_max, arg->sidx_min, arg->sidx_max);
443 + return skb;
444 +}
445 +
446 +static struct sk_buff *
447 ath10k_wmi_op_gen_echo(struct ath10k *ar, u32 value)
448 {
449 struct wmi_echo_cmd *cmd;
450 @@ -8668,6 +8829,7 @@ static const struct wmi_ops wmi_10_4_ops
451 .pull_svc_rdy = ath10k_wmi_main_op_pull_svc_rdy_ev,
452 .pull_rdy = ath10k_wmi_op_pull_rdy_ev,
453 .pull_roam_ev = ath10k_wmi_op_pull_roam_ev,
454 + .pull_dfs_status_ev = ath10k_wmi_10_4_op_pull_dfs_status_ev,
455 .get_txbf_conf_scheme = ath10k_wmi_10_4_txbf_conf_scheme,
456
457 .gen_pdev_suspend = ath10k_wmi_op_gen_pdev_suspend,
458 @@ -8714,6 +8876,7 @@ static const struct wmi_ops wmi_10_4_ops
459 .gen_tdls_peer_update = ath10k_wmi_10_4_gen_tdls_peer_update,
460 .gen_pdev_get_tpc_table_cmdid =
461 ath10k_wmi_10_4_op_gen_pdev_get_tpc_table_cmdid,
462 + .gen_radar_found = ath10k_wmi_10_4_gen_radar_found,
463
464 /* shared with 10.2 */
465 .pull_echo_ev = ath10k_wmi_op_pull_echo_ev,
466 @@ -8776,8 +8939,11 @@ int ath10k_wmi_attach(struct ath10k *ar)
467 init_completion(&ar->wmi.service_ready);
468 init_completion(&ar->wmi.unified_ready);
469 init_completion(&ar->wmi.barrier);
470 + init_completion(&ar->wmi.radar_confirm);
471
472 INIT_WORK(&ar->svc_rdy_work, ath10k_wmi_event_service_ready_work);
473 + INIT_WORK(&ar->radar_confirmation_work,
474 + ath10k_radar_confirmation_work);
475
476 return 0;
477 }
478 --- a/drivers/net/wireless/ath/ath10k/wmi.h
479 +++ b/drivers/net/wireless/ath/ath10k/wmi.h
480 @@ -959,6 +959,7 @@ struct wmi_cmd_map {
481 u32 vdev_sifs_trigger_time_cmdid;
482 u32 pdev_wds_entry_list_cmdid;
483 u32 tdls_set_offchan_mode_cmdid;
484 + u32 radar_found_cmdid;
485 };
486
487 /*
488 @@ -1792,6 +1793,11 @@ enum wmi_10_4_cmd_id {
489 WMI_10_4_TDLS_SET_STATE_CMDID,
490 WMI_10_4_TDLS_PEER_UPDATE_CMDID,
491 WMI_10_4_TDLS_SET_OFFCHAN_MODE_CMDID,
492 + WMI_10_4_PDEV_SEND_FD_CMDID,
493 + WMI_10_4_ENABLE_FILS_CMDID,
494 + WMI_10_4_PDEV_SET_BRIDGE_MACADDR_CMDID,
495 + WMI_10_4_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID,
496 + WMI_10_4_RADAR_FOUND_CMDID,
497 WMI_10_4_PDEV_UTF_CMDID = WMI_10_4_END_CMDID - 1,
498 };
499
500 @@ -1867,6 +1873,9 @@ enum wmi_10_4_event_id {
501 WMI_10_4_PDEV_TPC_TABLE_EVENTID,
502 WMI_10_4_PDEV_WDS_ENTRY_LIST_EVENTID,
503 WMI_10_4_TDLS_PEER_EVENTID,
504 + WMI_10_4_HOST_SWFDA_EVENTID,
505 + WMI_10_4_ESP_ESTIMATE_EVENTID,
506 + WMI_10_4_DFS_STATUS_CHECK_EVENTID,
507 WMI_10_4_PDEV_UTF_EVENTID = WMI_10_4_END_EVENTID - 1,
508 };
509
510 @@ -3379,6 +3388,25 @@ struct wmi_10_4_phyerr_event {
511 u8 buf[0];
512 } __packed;
513
514 +struct wmi_radar_found_info {
515 + __le32 pri_min;
516 + __le32 pri_max;
517 + __le32 width_min;
518 + __le32 width_max;
519 + __le32 sidx_min;
520 + __le32 sidx_max;
521 +} __packed;
522 +
523 +enum wmi_radar_confirmation_status {
524 + /* Detected radar was due to SW pulses */
525 + WMI_SW_RADAR_DETECTED = 0,
526 +
527 + WMI_RADAR_DETECTION_FAIL = 1,
528 +
529 + /* Real radar detected */
530 + WMI_HW_RADAR_DETECTED = 2,
531 +};
532 +
533 #define PHYERR_TLV_SIG 0xBB
534 #define PHYERR_TLV_TAG_SEARCH_FFT_REPORT 0xFB
535 #define PHYERR_TLV_TAG_RADAR_PULSE_SUMMARY 0xF8
536 @@ -6586,6 +6614,10 @@ struct wmi_phyerr_hdr_arg {
537 const void *phyerrs;
538 };
539
540 +struct wmi_dfs_status_ev_arg {
541 + u32 status;
542 +};
543 +
544 struct wmi_svc_rdy_ev_arg {
545 __le32 min_tx_power;
546 __le32 max_tx_power;