1 /* 2 * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * 6 * Permission to use, copy, modify, and/or distribute this software for 7 * any purpose with or without fee is hereby granted, provided that the 8 * above copyright notice and this permission notice appear in all 9 * copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 12 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 13 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 14 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 15 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 16 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 17 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 18 * PERFORMANCE OF THIS SOFTWARE. 19 */ 20 21 /** 22 * DOC: This file has the DFS dispatcher API which is exposed to outside of DFS 23 * component. 24 */ 25 26 #ifndef _WLAN_DFS_TGT_API_H_ 27 #define _WLAN_DFS_TGT_API_H_ 28 29 #include <wlan_dfs_public_struct.h> 30 31 #define WLAN_DFS_RESET_TIME_S 7 32 #define WLAN_DFS_WAIT (60 + WLAN_DFS_RESET_TIME_S) /* 60 seconds */ 33 #define WLAN_DFS_WAIT_MS ((WLAN_DFS_WAIT) * 1000) /*in MS*/ 34 35 /* Command id to send test radar to firmware */ 36 #define DFS_PHYERR_OFFLOAD_TEST_SET_RADAR 0 37 38 /* Segment ID corresponding to primary segment */ 39 #define SEG_ID_PRIMARY 0 40 41 /* Segment ID corresponding to secondary segment */ 42 #define SEG_ID_SECONDARY 1 43 44 /* dfs_radar_args_for_unit_test: Radar parameters to be sent in unit test cmd. 45 * @IDX_CMD_ID: Index id pointing to command id value 46 * @IDX_PDEV_ID: Index id pointing to pdev id value 47 * @IDX_RADAR_PARAM1_ID: Index pointing to packed arguments value that includes 48 * 1). Segment ID, 49 * 2). Chirp information (is chirp or non chirp), 50 * 3). Frequency offset. 51 * 4). Detector ID. 52 * 53 * The packed argument structure is: 54 * 55 * ------------------------------32 bits arg---------------------------- 56 * 57 * -------18 bits------|1 bit|--2 bits-|-------8 bits------|1 bit|2 bits| 58 * ______________________________________________________________________ 59 *| | | | | | | | | | | | | | | | | | | 60 *|---18 Unused bits---| x | x | | x |x|x|x| |x|x|x|x| |x| x | x | x | 61 *|____________________|_____|___|_|___|_|_|_|_|_|_|_|_|_|_|_____|___|___| 62 * 63 * |_____|_________|___________________|_____|_______| 64 * sign det.ID freq.offset Chirp seg.ID 65 * 66 * @DFS_UNIT_TEST_NUM_ARGS: Number of arguments for bangradar unit test 67 * command. 68 * @DFS_MAX_NUM_UNIT_TEST_ARGS: Maximum number of arguments for unit test 69 * command in radar simulation. 70 */ 71 enum { 72 IDX_CMD_ID = 0, 73 IDX_PDEV_ID, 74 IDX_RADAR_PARAM1_ID, 75 DFS_UNIT_TEST_NUM_ARGS, 76 DFS_MAX_NUM_UNIT_TEST_ARGS = DFS_UNIT_TEST_NUM_ARGS 77 }; 78 79 #define SEG_ID_SHIFT 0 80 #define IS_CHIRP_SHIFT 2 81 #define FREQ_OFF_SHIFT 3 82 #define DET_ID_SHIFT 11 83 #define FREQ_OFFSET_SIGNBIT_SHIFT 13 84 #define SEG_ID_MASK 0x03 85 #define IS_CHIRP_MASK 0x01 86 #define FREQ_OFFSET_MASK 0xFF 87 #define DET_ID_MASK 0x03 88 #define FREQ_OFFSET_SIGNBIT_MASK 0x01 89 90 /** 91 * struct dfs_emulate_bang_radar_test_cmd - Unit test command structure to send 92 * WMI command to firmware from host 93 * and simulate bangradar event. 94 * @vdev_id: vdev id 95 * @num_args: number of arguments 96 * @args: arguments 97 */ 98 struct dfs_emulate_bang_radar_test_cmd { 99 uint32_t vdev_id; 100 uint32_t num_args; 101 uint32_t args[DFS_MAX_NUM_UNIT_TEST_ARGS]; 102 }; 103 104 /** 105 * struct vdev_adfs_complete_status - OCAC complete status event param 106 * @vdev_id: Physical device identifier 107 * @chan_freq: Channel number 108 * @chan_width: Channel Width 109 * @center_freq1 : For 20/40/80/160Mhz, it is the center of the corresponding 110 * band. For 80P80/165MHz, it is the center of the left 80MHz. 111 * @center_freq2 : It is valid and non-zero only for 80P80/165MHz. It indicates 112 * the Center Frequency of the right 80MHz segment. 113 * @ocac_status: off channel cac status 114 */ 115 struct vdev_adfs_complete_status { 116 uint32_t vdev_id; 117 uint32_t chan_freq; 118 uint32_t chan_width; 119 uint32_t center_freq1; 120 uint32_t center_freq2; 121 uint32_t ocac_status; 122 }; 123 124 extern struct dfs_to_mlme global_dfs_to_mlme; 125 126 #ifdef DFS_COMPONENT_ENABLE 127 /** 128 * tgt_dfs_set_current_channel_for_freq() - Fill dfs channel structure from 129 * dfs_channel structure. 130 * @pdev: Pointer to DFS pdev object. 131 * @dfs_ch_freq: Frequency in Mhz. 132 * @dfs_ch_flags: Channel flags. 133 * @dfs_ch_flagext: Extended channel flags. 134 * @dfs_ch_ieee: IEEE channel number. 135 * @dfs_ch_vhtop_ch_freq_seg1: Channel Center frequency1. 136 * @dfs_ch_vhtop_ch_freq_seg2: Channel Center frequency2. 137 * @dfs_ch_mhz_freq_seg1: Channel center frequency of primary segment in MHZ. 138 * @dfs_ch_mhz_freq_seg2: Channel center frequency of secondary segment in MHZ 139 * applicable only for 80+80MHZ mode of operation. 140 * @dfs_ch_op_puncturing: Puncturing pattern followed in current operating 141 * channel. 142 * @is_channel_updated: Boolean to represent channel update. 143 */ 144 #ifdef CONFIG_CHAN_FREQ_API 145 QDF_STATUS 146 tgt_dfs_set_current_channel_for_freq(struct wlan_objmgr_pdev *pdev, 147 uint16_t dfs_ch_freq, 148 uint64_t dfs_ch_flags, 149 uint16_t dfs_ch_flagext, 150 uint8_t dfs_ch_ieee, 151 uint8_t dfs_ch_vhtop_ch_freq_seg1, 152 uint8_t dfs_ch_vhtop_ch_freq_seg2, 153 uint16_t dfs_ch_mhz_freq_seg1, 154 uint16_t dfs_ch_mhz_freq_seg2, 155 uint16_t dfs_ch_op_puncturing, 156 bool *is_channel_updated); 157 #endif 158 159 /** 160 * tgt_dfs_radar_enable() - Enables the radar. 161 * @pdev: Pointer to DFS pdev object. 162 * @no_cac: If no_cac is 0, it cancels the CAC. 163 * @opmode: operating mode 164 * @enable: disable/enable radar 165 * 166 * This is called each time a channel change occurs, to (potentially) enable 167 * the radar code. 168 */ 169 QDF_STATUS tgt_dfs_radar_enable( 170 struct wlan_objmgr_pdev *pdev, 171 int no_cac, uint32_t opmode, bool enable); 172 173 /** 174 * tgt_dfs_control()- Used to process ioctls related to DFS. 175 * @pdev: Pointer to DFS pdev object. 176 * @id: Command type. 177 * @indata: Input buffer. 178 * @insize: size of the input buffer. 179 * @outdata: A buffer for the results. 180 * @outsize: Size of the output buffer. 181 * @error: returned error 182 */ 183 QDF_STATUS tgt_dfs_control(struct wlan_objmgr_pdev *pdev, 184 u_int id, 185 void *indata, 186 uint32_t insize, 187 void *outdata, 188 uint32_t *outsize, 189 int *error); 190 191 /** 192 * tgt_dfs_get_radars() - Based on the chipset, calls init radar table functions 193 * @pdev: Pointer to DFS pdev object. 194 * 195 * Wrapper function for dfs_get_radars(). This function called from 196 * outside of DFS component. 197 */ 198 QDF_STATUS tgt_dfs_get_radars(struct wlan_objmgr_pdev *pdev); 199 200 /** 201 * tgt_dfs_process_radar_ind() - Process radar found indication. 202 * @pdev: Pointer to DFS pdev object. 203 * @radar_found: radar found info. 204 * 205 * Process radar found indication. 206 * 207 * Return QDF_STATUS. 208 */ 209 QDF_STATUS tgt_dfs_process_radar_ind(struct wlan_objmgr_pdev *pdev, 210 struct radar_found_info *radar_found); 211 #else 212 213 static inline QDF_STATUS tgt_dfs_radar_enable( 214 struct wlan_objmgr_pdev *pdev, 215 int no_cac, uint32_t opmode, bool enable) 216 { 217 return QDF_STATUS_SUCCESS; 218 } 219 220 static inline QDF_STATUS tgt_dfs_control(struct wlan_objmgr_pdev *pdev, 221 u_int id, 222 void *indata, 223 uint32_t insize, 224 void *outdata, 225 uint32_t *outsize, 226 int *error) 227 { 228 return QDF_STATUS_SUCCESS; 229 } 230 231 static inline QDF_STATUS tgt_dfs_get_radars(struct wlan_objmgr_pdev *pdev) 232 { 233 return QDF_STATUS_SUCCESS; 234 } 235 236 static inline QDF_STATUS tgt_dfs_process_radar_ind( 237 struct wlan_objmgr_pdev *pdev, 238 struct radar_found_info *radar_found) 239 { 240 return QDF_STATUS_SUCCESS; 241 } 242 #endif 243 244 #ifdef WLAN_DFS_PARTIAL_OFFLOAD 245 /** 246 * tgt_dfs_process_phyerr() - Process phyerr. 247 * @pdev: Pointer to DFS pdev object. 248 * @buf: Phyerr buffer. 249 * @datalen: phyerr buffer length. 250 * @r_rssi: RSSI. 251 * @r_ext_rssi: Extension channel RSSI. 252 * @r_rs_tstamp: Timestamp. 253 * @r_fulltsf: TSF64. 254 * 255 * Wrapper function for dfs_process_phyerr(). This function called from 256 * outside of DFS component. 257 */ 258 QDF_STATUS tgt_dfs_process_phyerr(struct wlan_objmgr_pdev *pdev, 259 void *buf, 260 uint16_t datalen, 261 uint8_t r_rssi, 262 uint8_t r_ext_rssi, 263 uint32_t r_rs_tstamp, 264 uint64_t r_fulltsf); 265 #else 266 static inline QDF_STATUS tgt_dfs_process_phyerr(struct wlan_objmgr_pdev *pdev, 267 void *buf, 268 uint16_t datalen, 269 uint8_t r_rssi, 270 uint8_t r_ext_rssi, 271 uint32_t r_rs_tstamp, 272 uint64_t r_fulltsf) 273 { 274 return QDF_STATUS_SUCCESS; 275 } 276 #endif 277 278 /** 279 * tgt_dfs_process_phyerr_filter_offload() - Process radar event. 280 * Wrapper function for dfs_process_phyerr_filter_offload(). This function 281 * called from outside of DFS component. 282 * @pdev: Pointer to DFS pdev object. 283 * @wlan_radar_event: pointer to radar_event_info. 284 * 285 * Return: QDF_STATUS 286 */ 287 QDF_STATUS tgt_dfs_process_phyerr_filter_offload(struct wlan_objmgr_pdev *pdev, 288 struct radar_event_info *wlan_radar_event); 289 290 /** 291 * tgt_dfs_is_phyerr_filter_offload() - Is phyerr filter offload. 292 * @psoc: Pointer to psoc object. 293 * @is_phyerr_filter_offload: Pointer to is_phyerr_filter_offload. 294 * 295 * Return: QDF_STATUS 296 */ 297 QDF_STATUS tgt_dfs_is_phyerr_filter_offload(struct wlan_objmgr_psoc *psoc, 298 bool *is_phyerr_filter_offload); 299 300 /** 301 * tgt_dfs_destroy_object() - Destroys the DFS object. 302 * @pdev: Pointer to DFS pdev object. 303 * 304 * Wrapper function for dfs_destroy_object(). This function called from 305 * outside of DFS component. 306 */ 307 QDF_STATUS tgt_dfs_destroy_object(struct wlan_objmgr_pdev *pdev); 308 309 #ifdef MOBILE_DFS_SUPPORT 310 /** 311 * tgt_dfs_set_tx_leakage_threshold() - set tx_leakage_threshold. 312 * @pdev: Pointer to DFS pdev object. 313 * 314 * Return QDF_STATUS. 315 */ 316 QDF_STATUS tgt_dfs_set_tx_leakage_threshold(struct wlan_objmgr_pdev *pdev); 317 #else 318 static inline QDF_STATUS tgt_dfs_set_tx_leakage_threshold 319 (struct wlan_objmgr_pdev *pdev) 320 { 321 return QDF_STATUS_SUCCESS; 322 } 323 #endif 324 325 /** 326 * tgt_dfs_is_precac_timer_running() - Check whether precac timer is running. 327 * @pdev: Pointer to DFS pdev object. 328 * @is_precac_timer_running: Pointer to save precac timer value. 329 * 330 * Wrapper function for dfs_is_precac_timer_running(). This function called from 331 * outside of DFS component. 332 */ 333 QDF_STATUS tgt_dfs_is_precac_timer_running(struct wlan_objmgr_pdev *pdev, 334 bool *is_precac_timer_running); 335 336 /** 337 * tgt_dfs_set_agile_precac_state() - set state for Agile Precac. 338 * 339 * @pdev: Pointer to DFS pdev object. 340 * @agile_precac_state: Agile Precac state 341 * 342 * wrapper function for dfs_set_agile_precac_state. 343 * This function called from outside of dfs component. 344 */ 345 QDF_STATUS tgt_dfs_set_agile_precac_state(struct wlan_objmgr_pdev *pdev, 346 int agile_precac_state); 347 348 /** 349 * tgt_dfs_agile_precac_start() - Start agile precac 350 * 351 * @pdev: Pointer to DFS pdev object. 352 * 353 * wrapper function for dfs_set_agile_precac_state. 354 * This function called from outside of dfs component. 355 */ 356 QDF_STATUS tgt_dfs_agile_precac_start(struct wlan_objmgr_pdev *pdev); 357 358 /** 359 * tgt_dfs_ocac_complete() - Process off channel cac complete indication. 360 * @pdev: Pointer to DFS pdev object. 361 * @ocac_status: Off channel CAC complete status. 362 * 363 * wrapper function for dfs_set_agile_precac_state. 364 * This function called from outside of dfs component. 365 */ 366 QDF_STATUS tgt_dfs_ocac_complete(struct wlan_objmgr_pdev *pdev, 367 struct vdev_adfs_complete_status *ocac_status); 368 369 /** 370 * tgt_dfs_cac_complete() - Process cac complete indication. 371 * @pdev: Pointer to DFS pdev object. 372 * @vdev_id: vdev id. 373 * 374 * Process cac complete indication from firmware. 375 * 376 * Return QDF_STATUS. 377 */ 378 QDF_STATUS tgt_dfs_cac_complete(struct wlan_objmgr_pdev *pdev, 379 uint32_t vdev_id); 380 381 /** 382 * tgt_dfs_reg_ev_handler() - Register dfs events. 383 * @psoc: Pointer to psoc. 384 * 385 * Register dfs events. 386 * 387 * Return: QDF_STATUS. 388 */ 389 QDF_STATUS tgt_dfs_reg_ev_handler(struct wlan_objmgr_psoc *psoc); 390 391 /** 392 * tgt_dfs_stop() - Clear dfs timers. 393 * @pdev: Pointer to pdev object 394 */ 395 QDF_STATUS tgt_dfs_stop(struct wlan_objmgr_pdev *pdev); 396 397 /** 398 * tgt_dfs_process_emulate_bang_radar_cmd() - Process to emulate dfs bangradar 399 * command. 400 * @pdev: Pointer to DFS pdev object. 401 * @dfs_unit_test: bang radar emulation command 402 * 403 * Process to emulate dfs bangradar command. 404 * 405 * Return: QDF_STATUS. 406 */ 407 QDF_STATUS tgt_dfs_process_emulate_bang_radar_cmd(struct wlan_objmgr_pdev *pdev, 408 struct dfs_emulate_bang_radar_test_cmd *dfs_unit_test); 409 410 #ifdef MOBILE_DFS_SUPPORT 411 /** 412 * tgt_dfs_set_phyerr_filter_offload() - config phyerr filter offload 413 * @pdev: Pointer to DFS pdev object. 414 * 415 * Return: QDF_STATUS 416 */ 417 QDF_STATUS tgt_dfs_set_phyerr_filter_offload(struct wlan_objmgr_pdev *pdev); 418 #else 419 static inline QDF_STATUS tgt_dfs_set_phyerr_filter_offload 420 (struct wlan_objmgr_pdev *pdev) 421 { 422 return QDF_STATUS_SUCCESS; 423 } 424 #endif 425 426 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 427 /** 428 * tgt_dfs_send_avg_params_to_fw() - send average radar parameters to fw. 429 * @pdev: Pointer to DFS pdev object. 430 * @params: Pointer to dfs radar average parameters. 431 * 432 * Return: QDF_STATUS 433 */ 434 QDF_STATUS 435 tgt_dfs_send_avg_params_to_fw(struct wlan_objmgr_pdev *pdev, 436 struct dfs_radar_found_params *params); 437 #endif 438 439 /** 440 * tgt_dfs_action_on_status_from_fw() - trigger the action to be taken based on 441 * host dfs status received from fw. 442 * @pdev: Pointer to pdev object. 443 * @status: Pointer to the host dfs status received from fw. 444 * 445 * Return: QDF_STATUS 446 */ 447 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 448 QDF_STATUS tgt_dfs_action_on_status_from_fw(struct wlan_objmgr_pdev *pdev, 449 uint32_t *status); 450 #else 451 static inline 452 QDF_STATUS tgt_dfs_action_on_status_from_fw(struct wlan_objmgr_pdev *pdev, 453 uint32_t *status) 454 { 455 return QDF_STATUS_SUCCESS; 456 } 457 #endif 458 459 /** 460 * tgt_dfs_is_radar_enabled() - checks if radar detection is enabled. 461 * @pdev: Pointer to pdev object. 462 * @ignore_dfs: Pointer to check the value. If 1, radar detection is disabled. 463 */ 464 void tgt_dfs_is_radar_enabled(struct wlan_objmgr_pdev *pdev, int *ignore_dfs); 465 466 /** 467 * tgt_dfs_reset_spoof_test() - reset the dfs spoof check variables 468 * @pdev: Pointer to pdev object. 469 * 470 * Return: QDF_STATUS 471 */ 472 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 473 QDF_STATUS tgt_dfs_reset_spoof_test(struct wlan_objmgr_pdev *pdev); 474 #else 475 static inline 476 QDF_STATUS tgt_dfs_reset_spoof_test(struct wlan_objmgr_pdev *pdev) 477 { 478 return QDF_STATUS_SUCCESS; 479 } 480 #endif 481 482 /** 483 * tgt_dfs_enable_stadfs() - Enable/Disable STADFS capability. 484 * @pdev: Pointer to DFS pdev object. 485 * @val: input value. 486 */ 487 #ifdef QCA_SUPPORT_STA_DFS 488 void tgt_dfs_enable_stadfs(struct wlan_objmgr_pdev *pdev, bool val); 489 #else 490 static inline 491 void tgt_dfs_enable_stadfs(struct wlan_objmgr_pdev *pdev, bool val) 492 { 493 } 494 #endif 495 496 /** 497 * tgt_dfs_is_stadfs_enabled() - Get STADFS capability 498 * @pdev: Pointer to DFS pdev object. 499 * 500 * Return: true if STADFS is enabled, else false. 501 */ 502 #ifdef QCA_SUPPORT_STA_DFS 503 bool tgt_dfs_is_stadfs_enabled(struct wlan_objmgr_pdev *pdev); 504 #else 505 static inline 506 bool tgt_dfs_is_stadfs_enabled(struct wlan_objmgr_pdev *pdev) 507 { 508 return false; 509 } 510 #endif 511 512 /** 513 * tgt_dfs_is_5ghz_supported_in_pdev() - Check if the input pdev supports 5GHZ. 514 * @pdev: Pointer to DFS pdev object. 515 * 516 * Return: true if the pdev supports 5GHz, else false. 517 */ 518 bool tgt_dfs_is_5ghz_supported_in_pdev(struct wlan_objmgr_pdev *pdev); 519 520 #if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD) 521 /** 522 * tgt_dfs_send_usenol_pdev_param() - Send usenol pdev param to FW. 523 * @pdev: Pointer to pdev object. 524 * @usenol: Value of usenol 525 * 526 * Return: QDF_STATUS 527 */ 528 QDF_STATUS tgt_dfs_send_usenol_pdev_param(struct wlan_objmgr_pdev *pdev, 529 bool usenol); 530 531 /** 532 * tgt_dfs_send_subchan_marking() - Send subchannel marking pdev param to FW. 533 * @pdev: Pointer to pdev object. 534 * @subchanmark: Value of subchannel_marking. 535 * 536 * Return: QDF_STATUS 537 */ 538 QDF_STATUS tgt_dfs_send_subchan_marking(struct wlan_objmgr_pdev *pdev, 539 bool subchanmark); 540 #else 541 static inline 542 QDF_STATUS tgt_dfs_send_usenol_pdev_param(struct wlan_objmgr_pdev *pdev, 543 bool usenol) 544 { 545 return QDF_STATUS_SUCCESS; 546 } 547 548 static inline QDF_STATUS 549 tgt_dfs_send_subchan_marking(struct wlan_objmgr_pdev *pdev, bool subchanmark) 550 { 551 return QDF_STATUS_SUCCESS; 552 } 553 #endif 554 #ifdef QCA_SUPPORT_AGILE_DFS 555 /** 556 * tgt_dfs_set_fw_adfs_support() - Set FW aDFS support in dfs object. 557 * @pdev: Pointer to pdev object. 558 * @fw_adfs_support_160: aDFS enabled when pdev is on 160/80P80MHz. 559 * @fw_adfs_support_non_160: aDFS enabled when pdev is on 20/40/80MHz. 560 * @fw_adfs_support_320: aDFS enabled when pdev is on 320 MHz. 561 * 562 * Return: void. 563 */ 564 void tgt_dfs_set_fw_adfs_support(struct wlan_objmgr_pdev *pdev, 565 bool fw_adfs_support_160, 566 bool fw_adfs_support_non_160, 567 bool fw_adfs_support_320); 568 #else 569 static inline 570 void tgt_dfs_set_fw_adfs_support(struct wlan_objmgr_pdev *pdev, 571 bool fw_adfs_support_160, 572 bool fw_adfs_support_non_160, 573 bool fw_adfs_support_320) 574 { 575 } 576 #endif 577 578 #ifdef QCA_HW_MODE_SWITCH 579 /** 580 * tgt_dfs_init_tmp_psoc_nol() - Init temporary psoc NOL structure. 581 * @pdev: Pointer to pdev object. 582 * @num_radios: Number of radios in the psoc. 583 * 584 * Return: void. 585 */ 586 void tgt_dfs_init_tmp_psoc_nol(struct wlan_objmgr_pdev *pdev, 587 uint8_t num_radios); 588 589 /** 590 * tgt_dfs_deinit_tmp_psoc_nol() - De-init temporary psoc NOL structure. 591 * @pdev: Pointer to pdev object. 592 * 593 * Return: void. 594 */ 595 void tgt_dfs_deinit_tmp_psoc_nol(struct wlan_objmgr_pdev *pdev); 596 597 /** 598 * tgt_dfs_save_dfs_nol_in_psoc() - Save NOL data of given pdev. 599 * @pdev: Pointer to pdev object. 600 * @pdev_id: The pdev ID which will have the NOL data. 601 * 602 * Based on the frequency of the NOL channel, copy it to the target pdev_id 603 * structure in psoc. 604 * 605 * Return: void. 606 */ 607 void tgt_dfs_save_dfs_nol_in_psoc(struct wlan_objmgr_pdev *pdev, 608 uint8_t pdev_id); 609 610 /** 611 * tgt_dfs_reinit_nol_from_psoc_copy() - Reinit saved NOL data to corresponding 612 * pdevs. 613 * @pdev: Pointer to pdev object. 614 * @pdev_id: pdev_id of the given pdev. 615 * @low_5ghz_freq: The low 5GHz frequency value of the target pdev id. 616 * @high_5ghz_freq: The high 5GHz frequency value of the target pdev id. 617 * 618 * Return: void. 619 */ 620 void tgt_dfs_reinit_nol_from_psoc_copy(struct wlan_objmgr_pdev *pdev, 621 uint8_t pdev_id, 622 uint16_t low_5ghz_freq, 623 uint16_t high_5ghz_freq); 624 625 /** 626 * tgt_dfs_reinit_precac_lists() - Reinit preCAC lists. 627 * @src_pdev: Source pdev object from which the preCAC list is copied. 628 * @dest_pdev: Destination pdev object to which the preCAC list is copied. 629 * @low_5g_freq: Low 5G frequency value of the destination DFS. 630 * @high_5g_freq: High 5G frequency value of the destination DFS. 631 * 632 * Copy all the preCAC list entries from the source pdev object to the 633 * destination pdev object which fall within the frequency range of 634 * low_5g_freq and high_5g_freq. 635 * 636 * Return: None (void). 637 */ 638 void tgt_dfs_reinit_precac_lists(struct wlan_objmgr_pdev *src_pdev, 639 struct wlan_objmgr_pdev *dest_pdev, 640 uint16_t low_5g_freq, 641 uint16_t high_5g_freq); 642 643 /** 644 * tgt_dfs_complete_deferred_tasks() - Process HW mode switch completion and 645 * handle deferred tasks. 646 * @pdev: Pointer to primary pdev object. 647 * 648 * Return: void. 649 */ 650 void tgt_dfs_complete_deferred_tasks(struct wlan_objmgr_pdev *pdev); 651 #else 652 static inline 653 void tgt_dfs_init_tmp_psoc_nol(struct wlan_objmgr_pdev *pdev, 654 uint8_t num_radios) 655 { 656 } 657 658 static inline 659 void tgt_dfs_deinit_tmp_psoc_nol(struct wlan_objmgr_pdev *pdev) 660 { 661 } 662 663 static inline 664 void tgt_dfs_save_dfs_nol_in_psoc(struct wlan_objmgr_pdev *pdev, 665 uint8_t pdev_id) 666 { 667 } 668 669 static inline 670 void tgt_dfs_reinit_nol_from_psoc_copy(struct wlan_objmgr_pdev *pdev, 671 uint8_t pdev_id, 672 uint16_t low_5ghz_freq, 673 uint16_t high_5ghz_freq) 674 { 675 } 676 677 static inline 678 void tgt_dfs_reinit_precac_lists(struct wlan_objmgr_pdev *src_pdev, 679 struct wlan_objmgr_pdev *dest_pdev, 680 uint16_t low_5g_freq, 681 uint16_t high_5g_freq) 682 { 683 } 684 685 static inline 686 void tgt_dfs_complete_deferred_tasks(struct wlan_objmgr_pdev *pdev) 687 { 688 } 689 #endif 690 #endif /* _WLAN_DFS_TGT_API_H_ */ 691