1 /* 2 * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2022 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 * @enable: disable/enable radar 164 * 165 * This is called each time a channel change occurs, to (potentially) enable 166 * the radar code. 167 */ 168 QDF_STATUS tgt_dfs_radar_enable( 169 struct wlan_objmgr_pdev *pdev, 170 int no_cac, uint32_t opmode, bool enable); 171 172 /** 173 * tgt_dfs_control()- Used to process ioctls related to DFS. 174 * @pdev: Pointer to DFS pdev object. 175 * @id: Command type. 176 * @indata: Input buffer. 177 * @insize: size of the input buffer. 178 * @outdata: A buffer for the results. 179 * @outsize: Size of the output buffer. 180 */ 181 QDF_STATUS tgt_dfs_control(struct wlan_objmgr_pdev *pdev, 182 u_int id, 183 void *indata, 184 uint32_t insize, 185 void *outdata, 186 uint32_t *outsize, 187 int *error); 188 189 /** 190 * tgt_dfs_get_radars() - Based on the chipset, calls init radar table functions 191 * @pdev: Pointer to DFS pdev object. 192 * 193 * Wrapper function for dfs_get_radars(). This function called from 194 * outside of DFS component. 195 */ 196 QDF_STATUS tgt_dfs_get_radars(struct wlan_objmgr_pdev *pdev); 197 198 /** 199 * tgt_dfs_process_radar_ind() - Process radar found indication. 200 * @pdev: Pointer to DFS pdev object. 201 * @radar_found: radar found info. 202 * 203 * Process radar found indication. 204 * 205 * Return QDF_STATUS. 206 */ 207 QDF_STATUS tgt_dfs_process_radar_ind(struct wlan_objmgr_pdev *pdev, 208 struct radar_found_info *radar_found); 209 #else 210 211 static inline QDF_STATUS tgt_dfs_radar_enable( 212 struct wlan_objmgr_pdev *pdev, 213 int no_cac, uint32_t opmode, bool enable) 214 { 215 return QDF_STATUS_SUCCESS; 216 } 217 218 static inline QDF_STATUS tgt_dfs_control(struct wlan_objmgr_pdev *pdev, 219 u_int id, 220 void *indata, 221 uint32_t insize, 222 void *outdata, 223 uint32_t *outsize, 224 int *error) 225 { 226 return QDF_STATUS_SUCCESS; 227 } 228 229 static inline QDF_STATUS tgt_dfs_get_radars(struct wlan_objmgr_pdev *pdev) 230 { 231 return QDF_STATUS_SUCCESS; 232 } 233 234 static inline QDF_STATUS tgt_dfs_process_radar_ind( 235 struct wlan_objmgr_pdev *pdev, 236 struct radar_found_info *radar_found) 237 { 238 return QDF_STATUS_SUCCESS; 239 } 240 #endif 241 242 #ifdef WLAN_DFS_PARTIAL_OFFLOAD 243 /** 244 * tgt_dfs_process_phyerr() - Process phyerr. 245 * @pdev: Pointer to DFS pdev object. 246 * @buf: Phyerr buffer. 247 * @datalen: phyerr buffer length. 248 * @r_rssi: RSSI. 249 * @r_ext_rssi: Extension channel RSSI. 250 * @r_rs_tstamp: Timestamp. 251 * @r_fulltsf: TSF64. 252 * 253 * Wrapper function for dfs_process_phyerr(). This function called from 254 * outside of DFS component. 255 */ 256 QDF_STATUS tgt_dfs_process_phyerr(struct wlan_objmgr_pdev *pdev, 257 void *buf, 258 uint16_t datalen, 259 uint8_t r_rssi, 260 uint8_t r_ext_rssi, 261 uint32_t r_rs_tstamp, 262 uint64_t r_fulltsf); 263 #else 264 static inline QDF_STATUS tgt_dfs_process_phyerr(struct wlan_objmgr_pdev *pdev, 265 void *buf, 266 uint16_t datalen, 267 uint8_t r_rssi, 268 uint8_t r_ext_rssi, 269 uint32_t r_rs_tstamp, 270 uint64_t r_fulltsf) 271 { 272 return QDF_STATUS_SUCCESS; 273 } 274 #endif 275 276 /** 277 * tgt_dfs_process_phyerr_filter_offload() - Process radar event. 278 * Wrapper function for dfs_process_phyerr_filter_offload(). This function 279 * called from outside of DFS component. 280 * @pdev: Pointer to DFS pdev object. 281 * @wlan_radar_event: pointer to radar_event_info. 282 * 283 * Return: QDF_STATUS 284 */ 285 QDF_STATUS tgt_dfs_process_phyerr_filter_offload(struct wlan_objmgr_pdev *pdev, 286 struct radar_event_info *wlan_radar_event); 287 288 /** 289 * tgt_dfs_is_phyerr_filter_offload() - Is phyerr filter offload. 290 * @psoc: Pointer to psoc object. 291 * @is_phyerr_filter_offload: Pointer to is_phyerr_filter_offload. 292 * 293 * Return: QDF_STATUS 294 */ 295 QDF_STATUS tgt_dfs_is_phyerr_filter_offload(struct wlan_objmgr_psoc *psoc, 296 bool *is_phyerr_filter_offload); 297 298 /** 299 * tgt_dfs_destroy_object() - Destroys the DFS object. 300 * @pdev: Pointer to DFS pdev object. 301 * 302 * Wrapper function for dfs_destroy_object(). This function called from 303 * outside of DFS component. 304 */ 305 QDF_STATUS tgt_dfs_destroy_object(struct wlan_objmgr_pdev *pdev); 306 307 #ifdef MOBILE_DFS_SUPPORT 308 /** 309 * tgt_dfs_set_tx_leakage_threshold() - set tx_leakage_threshold. 310 * @pdev: Pointer to DFS pdev object. 311 * 312 * Return QDF_STATUS. 313 */ 314 QDF_STATUS tgt_dfs_set_tx_leakage_threshold(struct wlan_objmgr_pdev *pdev); 315 #else 316 static inline QDF_STATUS tgt_dfs_set_tx_leakage_threshold 317 (struct wlan_objmgr_pdev *pdev) 318 { 319 return QDF_STATUS_SUCCESS; 320 } 321 #endif 322 323 /** 324 * tgt_dfs_is_precac_timer_running() - Check whether precac timer is running. 325 * @pdev: Pointer to DFS pdev object. 326 * @is_precac_timer_running: Pointer to save precac timer value. 327 * 328 * Wrapper function for dfs_is_precac_timer_running(). This function called from 329 * outside of DFS component. 330 */ 331 QDF_STATUS tgt_dfs_is_precac_timer_running(struct wlan_objmgr_pdev *pdev, 332 bool *is_precac_timer_running); 333 334 /** 335 * tgt_dfs_set_agile_precac_state() - set state for Agile Precac. 336 * 337 * @pdev: Pointer to DFS pdev object. 338 * @agile_precac_state: Agile Precac state 339 * 340 * wrapper function for dfs_set_agile_precac_state. 341 * This function called from outside of dfs component. 342 */ 343 QDF_STATUS tgt_dfs_set_agile_precac_state(struct wlan_objmgr_pdev *pdev, 344 int agile_precac_state); 345 346 /** 347 * tgt_dfs_agile_precac_start() - Start agile precac 348 * 349 * @pdev: Pointer to DFS pdev object. 350 * 351 * wrapper function for dfs_set_agile_precac_state. 352 * This function called from outside of dfs component. 353 */ 354 QDF_STATUS tgt_dfs_agile_precac_start(struct wlan_objmgr_pdev *pdev); 355 356 /** 357 * tgt_dfs_ocac_complete() - Process off channel cac complete indication. 358 * @pdev: Pointer to DFS pdev object. 359 * @vdev_adfs_complete_status: Off channel CAC complete status. 360 * 361 * wrapper function for dfs_set_agile_precac_state. 362 * This function called from outside of dfs component. 363 */ 364 QDF_STATUS tgt_dfs_ocac_complete(struct wlan_objmgr_pdev *pdev, 365 struct vdev_adfs_complete_status *ocac_status); 366 367 /** 368 * tgt_dfs_cac_complete() - Process cac complete indication. 369 * @pdev: Pointer to DFS pdev object. 370 * @vdev_id: vdev id. 371 * 372 * Process cac complete indication from firmware. 373 * 374 * Return QDF_STATUS. 375 */ 376 QDF_STATUS tgt_dfs_cac_complete(struct wlan_objmgr_pdev *pdev, 377 uint32_t vdev_id); 378 379 /** 380 * tgt_dfs_reg_ev_handler() - Register dfs events. 381 * @psoc: Pointer to psoc. 382 * 383 * Register dfs events. 384 * 385 * Return: QDF_STATUS. 386 */ 387 QDF_STATUS tgt_dfs_reg_ev_handler(struct wlan_objmgr_psoc *psoc); 388 389 /** 390 * tgt_dfs_stop() - Clear dfs timers. 391 * @dfs: Pointer to wlan_dfs structure. 392 */ 393 QDF_STATUS tgt_dfs_stop(struct wlan_objmgr_pdev *pdev); 394 395 /** 396 * tgt_dfs_process_emulate_bang_radar_cmd() - Process to emulate dfs bangradar 397 * command. 398 * @pdev: Pointer to DFS pdev object. 399 * 400 * Process to emulate dfs bangradar command. 401 * 402 * Return: QDF_STATUS. 403 */ 404 QDF_STATUS tgt_dfs_process_emulate_bang_radar_cmd(struct wlan_objmgr_pdev *pdev, 405 struct dfs_emulate_bang_radar_test_cmd *dfs_unit_test); 406 407 #ifdef MOBILE_DFS_SUPPORT 408 /** 409 * tgt_dfs_set_phyerr_filter_offload() - config phyerr filter offload 410 * @pdev: Pointer to DFS pdev object. 411 * 412 * Return: QDF_STATUS 413 */ 414 QDF_STATUS tgt_dfs_set_phyerr_filter_offload(struct wlan_objmgr_pdev *pdev); 415 #else 416 static inline QDF_STATUS tgt_dfs_set_phyerr_filter_offload 417 (struct wlan_objmgr_pdev *pdev) 418 { 419 return QDF_STATUS_SUCCESS; 420 } 421 #endif 422 423 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 424 /** 425 * tgt_dfs_send_avg_params_to_fw() - send average radar parameters to fw. 426 * @pdev: Pointer to DFS pdev object. 427 * @params: Pointer to dfs radar average parameters. 428 * 429 * Return: QDF_STATUS 430 */ 431 QDF_STATUS 432 tgt_dfs_send_avg_params_to_fw(struct wlan_objmgr_pdev *pdev, 433 struct dfs_radar_found_params *params); 434 #endif 435 436 /** 437 * tgt_dfs_action_on_status_from_fw() - trigger the action to be taken based on 438 * host dfs status received from fw. 439 * @pdev: Pointer to pdev object. 440 * @status: Pointer to the host dfs status received from fw. 441 * 442 * Return: QDF_STATUS 443 */ 444 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 445 QDF_STATUS tgt_dfs_action_on_status_from_fw(struct wlan_objmgr_pdev *pdev, 446 uint32_t *status); 447 #else 448 static inline 449 QDF_STATUS tgt_dfs_action_on_status_from_fw(struct wlan_objmgr_pdev *pdev, 450 uint32_t *status) 451 { 452 return QDF_STATUS_SUCCESS; 453 } 454 #endif 455 456 /** 457 * tgt_dfs_is_radar_enabled() - checks if radar detection is enabled. 458 * @pdev: Pointer to pdev object. 459 * @ignore_dfs: Pointer to check the value. If 1, radar detection is disabled. 460 */ 461 void tgt_dfs_is_radar_enabled(struct wlan_objmgr_pdev *pdev, int *ignore_dfs); 462 463 /** 464 * tgt_dfs_reset_spoof_test() - reset the dfs spoof check variables 465 * @pdev: Pointer to pdev object. 466 * 467 * Return: QDF_STATUS 468 */ 469 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 470 QDF_STATUS tgt_dfs_reset_spoof_test(struct wlan_objmgr_pdev *pdev); 471 #else 472 static inline 473 QDF_STATUS tgt_dfs_reset_spoof_test(struct wlan_objmgr_pdev *pdev) 474 { 475 return QDF_STATUS_SUCCESS; 476 } 477 #endif 478 479 /** 480 * tgt_dfs_enable_stadfs() - Enable/Disable STADFS capability. 481 * @pdev: Pointer to DFS pdev object. 482 * @val: input value. 483 */ 484 #ifdef QCA_SUPPORT_STA_DFS 485 void tgt_dfs_enable_stadfs(struct wlan_objmgr_pdev *pdev, bool val); 486 #else 487 static inline 488 void tgt_dfs_enable_stadfs(struct wlan_objmgr_pdev *pdev, bool val) 489 { 490 } 491 #endif 492 493 /** 494 * tgt_dfs_is_stadfs_enabled() - Get STADFS capability 495 * @pdev: Pointer to DFS pdev object. 496 * 497 * Return: true if STADFS is enabled, else false. 498 */ 499 #ifdef QCA_SUPPORT_STA_DFS 500 bool tgt_dfs_is_stadfs_enabled(struct wlan_objmgr_pdev *pdev); 501 #else 502 static inline 503 bool tgt_dfs_is_stadfs_enabled(struct wlan_objmgr_pdev *pdev) 504 { 505 return false; 506 } 507 #endif 508 509 /** 510 * tgt_dfs_is_5ghz_supported_in_pdev() - Check if the input pdev supports 5GHZ. 511 * @pdev: Pointer to DFS pdev object. 512 * 513 * Return: true if the pdev supports 5GHz, else false. 514 */ 515 bool tgt_dfs_is_5ghz_supported_in_pdev(struct wlan_objmgr_pdev *pdev); 516 517 #if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD) 518 /** 519 * tgt_dfs_send_usenol_pdev_param() - Send usenol pdev param to FW. 520 * @pdev: Pointer to pdev object. 521 * @usenol: Value of usenol 522 * 523 * Return: QDF_STATUS 524 */ 525 QDF_STATUS tgt_dfs_send_usenol_pdev_param(struct wlan_objmgr_pdev *pdev, 526 bool usenol); 527 528 /** 529 * tgt_dfs_send_subchan_marking() - Send subchannel marking pdev param to FW. 530 * @pdev: Pointer to pdev object. 531 * @subchanmark: Value of subchannel_marking. 532 * 533 * Return: QDF_STATUS 534 */ 535 QDF_STATUS tgt_dfs_send_subchan_marking(struct wlan_objmgr_pdev *pdev, 536 bool subchanmark); 537 #else 538 static inline 539 QDF_STATUS tgt_dfs_send_usenol_pdev_param(struct wlan_objmgr_pdev *pdev, 540 bool usenol) 541 { 542 return QDF_STATUS_SUCCESS; 543 } 544 545 static inline QDF_STATUS 546 tgt_dfs_send_subchan_marking(struct wlan_objmgr_pdev *pdev, bool subchanmark) 547 { 548 return QDF_STATUS_SUCCESS; 549 } 550 #endif 551 #ifdef QCA_SUPPORT_AGILE_DFS 552 /** 553 * tgt_dfs_set_fw_adfs_support() - Set FW aDFS support in dfs object. 554 * @pdev: Pointer to pdev object. 555 * @fw_adfs_support_160: aDFS enabled when pdev is on 160/80P80MHz. 556 * @fw_adfs_support_non_160: aDFS enabled when pdev is on 20/40/80MHz. 557 * 558 * Return: void. 559 */ 560 void tgt_dfs_set_fw_adfs_support(struct wlan_objmgr_pdev *pdev, 561 bool fw_adfs_support_160, 562 bool fw_adfs_support_non_160); 563 #else 564 static inline 565 void tgt_dfs_set_fw_adfs_support(struct wlan_objmgr_pdev *pdev, 566 bool fw_adfs_support_160, 567 bool fw_adfs_support_non_160) 568 { 569 } 570 #endif 571 572 #ifdef QCA_HW_MODE_SWITCH 573 /** 574 * tgt_dfs_init_tmp_psoc_nol() - Init temporary psoc NOL structure. 575 * @pdev: Pointer to pdev object. 576 * @num_radios: Number of radios in the psoc. 577 * 578 * Return: void. 579 */ 580 void tgt_dfs_init_tmp_psoc_nol(struct wlan_objmgr_pdev *pdev, 581 uint8_t num_radios); 582 583 /** 584 * tgt_dfs_deinit_tmp_psoc_nol() - De-init temporary psoc NOL structure. 585 * @pdev: Pointer to pdev object. 586 * 587 * Return: void. 588 */ 589 void tgt_dfs_deinit_tmp_psoc_nol(struct wlan_objmgr_pdev *pdev); 590 591 /** 592 * tgt_dfs_save_dfs_nol_in_psoc() - Save NOL data of given pdev. 593 * @pdev: Pointer to pdev object. 594 * @pdev_id: The pdev ID which will have the NOL data. 595 * 596 * Based on the frequency of the NOL channel, copy it to the target pdev_id 597 * structure in psoc. 598 * 599 * Return: void. 600 */ 601 void tgt_dfs_save_dfs_nol_in_psoc(struct wlan_objmgr_pdev *pdev, 602 uint8_t pdev_id); 603 604 /** 605 * tgt_dfs_reinit_nol_from_psoc_copy() - Reinit saved NOL data to corresponding 606 * pdevs. 607 * @pdev: Pointer to pdev object. 608 * @pdev_id: pdev_id of the given pdev. 609 * @low_5ghz_freq: The low 5GHz frequency value of the target pdev id. 610 * @high_5ghz_freq: The high 5GHz frequency value of the target pdev id. 611 * 612 * Return: void. 613 */ 614 void tgt_dfs_reinit_nol_from_psoc_copy(struct wlan_objmgr_pdev *pdev, 615 uint8_t pdev_id, 616 uint16_t low_5ghz_freq, 617 uint16_t high_5ghz_freq); 618 619 /** 620 * tgt_dfs_reinit_precac_lists() - Reinit preCAC lists. 621 * @src_pdev: Source pdev object from which the preCAC list is copied. 622 * @dest_pdev: Destination pdev object to which the preCAC list is copied. 623 * @low_5g_freq: Low 5G frequency value of the destination DFS. 624 * @high_5g_freq: High 5G frequency value of the destination DFS. 625 * 626 * Copy all the preCAC list entries from the source pdev object to the 627 * destination pdev object which fall within the frequency range of 628 * low_5g_freq and high_5g_freq. 629 * 630 * Return: None (void). 631 */ 632 void tgt_dfs_reinit_precac_lists(struct wlan_objmgr_pdev *src_pdev, 633 struct wlan_objmgr_pdev *dest_pdev, 634 uint16_t low_5g_freq, 635 uint16_t high_5g_freq); 636 637 /** 638 * tgt_dfs_complete_deferred_tasks() - Process HW mode switch completion and 639 * handle deferred tasks. 640 * @pdev: Pointer to primary pdev object. 641 * 642 * Return: void. 643 */ 644 void tgt_dfs_complete_deferred_tasks(struct wlan_objmgr_pdev *pdev); 645 #else 646 static inline 647 void tgt_dfs_init_tmp_psoc_nol(struct wlan_objmgr_pdev *pdev, 648 uint8_t num_radios) 649 { 650 } 651 652 static inline 653 void tgt_dfs_deinit_tmp_psoc_nol(struct wlan_objmgr_pdev *pdev) 654 { 655 } 656 657 static inline 658 void tgt_dfs_save_dfs_nol_in_psoc(struct wlan_objmgr_pdev *pdev, 659 uint8_t pdev_id) 660 { 661 } 662 663 static inline 664 void tgt_dfs_reinit_nol_from_psoc_copy(struct wlan_objmgr_pdev *pdev, 665 uint8_t pdev_id, 666 uint16_t low_5ghz_freq, 667 uint16_t high_5ghz_freq) 668 { 669 } 670 671 static inline 672 void tgt_dfs_reinit_precac_lists(struct wlan_objmgr_pdev *src_pdev, 673 struct wlan_objmgr_pdev *dest_pdev, 674 uint16_t low_5g_freq, 675 uint16_t high_5g_freq) 676 { 677 } 678 679 static inline 680 void tgt_dfs_complete_deferred_tasks(struct wlan_objmgr_pdev *pdev) 681 { 682 } 683 #endif 684 #endif /* _WLAN_DFS_TGT_API_H_ */ 685