1 /* 2 * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 /** 19 * DOC: wlan_serialization_utils_i.h 20 * This file defines the prototypes for the utility helper functions 21 * for the serialization component. 22 */ 23 #ifndef __WLAN_SERIALIZATION_UTILS_I_H 24 #define __WLAN_SERIALIZATION_UTILS_I_H 25 26 #ifdef CONFIG_SERIALIZATION_V1 27 /* Include files */ 28 #include "qdf_status.h" 29 #include "qdf_list.h" 30 #include "qdf_mc_timer.h" 31 #include "wlan_objmgr_cmn.h" 32 #include "wlan_objmgr_global_obj.h" 33 #include "wlan_objmgr_psoc_obj.h" 34 #include "wlan_serialization_rules_i.h" 35 #include "wlan_scan_ucfg_api.h" 36 37 /* 38 * Below bit positions are used to identify if a 39 * serialization command is in use or marked for 40 * deletion. 41 * CMD_MARKED_FOR_DELETE - The command is about to be deleted 42 * CMD_IS_ACTIVE - The command is active and currently in use 43 */ 44 #define CMD_MARKED_FOR_DELETE 1 45 #define CMD_IS_ACTIVE 2 46 /** 47 * struct wlan_serialization_timer - Timer used for serialization 48 * @cmd: Cmd to which the timer is linked 49 * @timer: Timer associated with the command 50 * 51 * Timers are allocated statically during init, one each for the 52 * maximum active commands permitted in the system. Once a cmd is 53 * moved from pending list to active list, the timer is activated 54 * and once the cmd is completed, the timer is cancelled. Timer is 55 * also cancelled if the command is aborted 56 * 57 * The timers are maintained per psoc. A timer is associated to 58 * unique combination of pdev, cmd_type and cmd_id. 59 */ 60 struct wlan_serialization_timer { 61 struct wlan_serialization_command *cmd; 62 qdf_mc_timer_t timer; 63 }; 64 65 /** 66 * struct wlan_serialization_command_list - List of commands to be serialized 67 * @node: Node identifier in the list 68 * @cmd: Command to be serialized 69 * @active: flag to check if the node/entry is logically active 70 */ 71 struct wlan_serialization_command_list { 72 qdf_list_node_t node; 73 struct wlan_serialization_command cmd; 74 unsigned long cmd_in_use; 75 }; 76 77 /** 78 * struct wlan_serialization_pdev_priv_obj - pdev obj data for serialization 79 * @active_list: list to hold the non-scan commands currently being executed 80 * @pending_list list: to hold the non-scan commands currently pending 81 * @active_scan_list: list to hold the scan commands currently active 82 * @pending_scan_list: list to hold the scan commands currently pending 83 * @global_cmd_pool_list: list to hold the global buffers 84 * @pdev_ser_list_lock: A per pdev lock to protect the concurrent operations 85 * on the queues. 86 * 87 * Serialization component maintains linked lists to store the commands 88 * sent by other components to get serialized. All the lists are per 89 * pdev. The maximum number of active scans is determined by the firmware. 90 * There is only one non-scan active command per pdev at a time as per the 91 * current software architecture. cmd_ptr holds the memory allocated for 92 * each of the global cmd pool nodes and it is useful in freeing up these 93 * nodes when needed. 94 */ 95 struct wlan_serialization_pdev_priv_obj { 96 qdf_list_t active_list; 97 qdf_list_t pending_list; 98 qdf_list_t active_scan_list; 99 qdf_list_t pending_scan_list; 100 qdf_list_t global_cmd_pool_list; 101 qdf_spinlock_t pdev_ser_list_lock; 102 }; 103 104 /** 105 * struct wlan_serialization_psoc_priv_obj - psoc obj data for serialization 106 * @wlan_serialization_module_state_cb - module level callback 107 * @wlan_serialization_apply_rules_cb - pointer to apply rules on the cmd 108 * @timers - Timers associated with the active commands 109 * @max_axtive_cmds - Maximum active commands allowed 110 * 111 * Serialization component takes a command as input and checks whether to 112 * allow/deny the command. It will use the module level callback registered 113 * by each component to fetch the information needed to apply the rules. 114 * Once the information is available, the rules callback registered for each 115 * command internally by serialization will be applied to determine the 116 * checkpoint for the command. If allowed, command will be put into active/ 117 * pending list and each active command is associated with a timer. 118 */ 119 struct wlan_serialization_psoc_priv_obj { 120 wlan_serialization_comp_info_cb comp_info_cb[ 121 WLAN_SER_CMD_MAX][WLAN_UMAC_COMP_ID_MAX]; 122 wlan_serialization_apply_rules_cb apply_rules_cb[WLAN_SER_CMD_MAX]; 123 struct wlan_serialization_timer *timers; 124 uint8_t max_active_cmds; 125 }; 126 127 /** 128 * wlan_serialization_put_back_to_global_list() - put back cmd in global pool 129 * @queue: queue from which cmd needs to be taken out 130 * @ser_pdev_obj: pdev private object 131 * @cmd_list: cmd which needs to be matched 132 * 133 * command will be taken off from the queue and will be put back to global 134 * pool of free command buffers. 135 * 136 * Return: QDF_STATUS 137 */ 138 QDF_STATUS 139 wlan_serialization_put_back_to_global_list(qdf_list_t *queue, 140 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj, 141 struct wlan_serialization_command_list *cmd_list); 142 /** 143 * wlan_serialization_move_pending_to_active() - to move pending command to 144 * active queue 145 * @cmd_type: cmd type to device to which queue the command needs to go 146 * @ser_pdev_obj: pointer to ser_pdev_obj 147 * 148 * Return: none 149 */ 150 void wlan_serialization_move_pending_to_active( 151 enum wlan_serialization_cmd_type cmd_type, 152 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj); 153 /** 154 * wlan_serialization_get_pdev_from_cmd() - get pdev from provided cmd 155 * @cmd: pointer to actual command 156 * 157 * This API will get the pointer to pdev through checking type of cmd 158 * 159 * Return: pointer to pdev 160 */ 161 struct wlan_objmgr_pdev* 162 wlan_serialization_get_pdev_from_cmd(struct wlan_serialization_command *cmd); 163 164 /** 165 * wlan_serialization_get_cmd_from_queue() - to extract command from given queue 166 * @queue: pointer to queue 167 * @nnode: next node to extract 168 * @ser_pdev_obj: Serialization PDEV object pointer 169 * 170 * This API will try to extract node from queue which is next to prev node. If 171 * no previous node is given then take out the front node of the queue. 172 * 173 * Return: QDF_STATUS 174 */ 175 QDF_STATUS wlan_serialization_get_cmd_from_queue(qdf_list_t *queue, 176 qdf_list_node_t **nnode, 177 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj); 178 179 /** 180 * wlan_serialization_is_active_cmd_allowed() - check to see if command 181 * is allowed in active queue 182 * @pdev: pointer to pdev structure 183 * @cmd_type: type of command to check against 184 * 185 * Takes the command type and based on the type, it checks scan command queue 186 * or nonscan command queue to see if active command is allowed or no 187 * 188 * Return: true if allowed else false 189 */ 190 bool wlan_serialization_is_active_cmd_allowed( 191 struct wlan_serialization_command *cmd); 192 193 /** 194 * wlan_serialization_cleanup_all_timers() - to clean-up all timers 195 * 196 * @psoc_ser_ob: pointer to serialization psoc private object 197 * 198 * This API is to cleanup all the timers. it can be used when serialization 199 * module is exiting. it will make sure that if timer is running then it will 200 * stop and destroys the timer 201 * 202 * Return: QDF_STATUS 203 */ 204 QDF_STATUS wlan_serialization_cleanup_all_timers( 205 struct wlan_serialization_psoc_priv_obj *psoc_ser_ob); 206 207 /** 208 * wlan_serialization_find_and_remove_cmd() - to find cmd from queue and remove 209 * @cmd_info: pointer to command related information 210 * 211 * This api will find command from active queue and removes the command 212 * 213 * Return: QDF_STATUS 214 */ 215 QDF_STATUS wlan_serialization_find_and_remove_cmd( 216 struct wlan_serialization_queued_cmd_info *cmd_info); 217 218 /** 219 * wlan_serialization_find_and_cancel_cmd() - to find cmd from queue and cancel 220 * @cmd_info: pointer to command related information 221 * 222 * This api will find command from active queue and pending queue and 223 * removes the command. If it is in active queue then it will notifies the 224 * requester that it is in active queue and from there it expects requester 225 * to send remove command 226 * 227 * Return: wlan_serialization_cmd_status 228 */ 229 enum wlan_serialization_cmd_status 230 wlan_serialization_find_and_cancel_cmd( 231 struct wlan_serialization_queued_cmd_info *cmd_info); 232 /** 233 * wlan_serialization_enqueue_cmd() - Enqueue the cmd to pending/active Queue 234 * @cmd: Command information 235 * @is_cmd_for_active_queue: whether command is for active queue 236 * @cmd_list: command which needs to be inserted in active queue 237 * Return: Status of the serialization request 238 */ 239 enum wlan_serialization_status 240 wlan_serialization_enqueue_cmd( 241 struct wlan_serialization_command *cmd, 242 uint8_t is_cmd_for_active_queue, 243 struct wlan_serialization_command_list **pcmd_list); 244 245 /** 246 * wlan_serialization_dequeue_cmd() - dequeue the cmd to pending/active Queue 247 * @cmd: Command information 248 * @is_cmd_for_active_queue: whether command is for active queue 249 * 250 * Return: Status of the serialization request 251 */ 252 enum wlan_serialization_cmd_status 253 wlan_serialization_dequeue_cmd(struct wlan_serialization_command *cmd, 254 uint8_t is_cmd_for_active_queue); 255 /** 256 * wlan_serialization_find_and_stop_timer() - to find and stop the timer 257 * @psoc: pointer to psoc 258 * @cmd: pointer to actual command 259 * 260 * find the timer associated with command, stop it and destroy it 261 * 262 * Return: QDF_STATUS 263 */ 264 QDF_STATUS 265 wlan_serialization_find_and_stop_timer(struct wlan_objmgr_psoc *psoc, 266 struct wlan_serialization_command *cmd); 267 /** 268 * wlan_serialization_find_and_stop_timer() - to find and start the timer 269 * @psoc: pointer to psoc 270 * @cmd: pointer to actual command 271 * 272 * find the free timer, initialize it, and start it 273 * 274 * Return: QDF_STATUS 275 */ 276 QDF_STATUS 277 wlan_serialization_find_and_start_timer(struct wlan_objmgr_psoc *psoc, 278 struct wlan_serialization_command *cmd); 279 280 /** 281 * wlan_serialization_validate_cmd() - Validate the command 282 * @comp_id: Component ID 283 * @cmd_type: Command Type 284 * 285 * Return: QDF Status 286 */ 287 QDF_STATUS wlan_serialization_validate_cmd( 288 enum wlan_umac_comp_id comp_id, 289 enum wlan_serialization_cmd_type cmd_type); 290 291 /** 292 * wlan_serialization_validate_cmdtype() - Validate the command type 293 * @cmd_type: Command Type 294 * 295 * Return: QDF Status 296 */ 297 QDF_STATUS wlan_serialization_validate_cmdtype( 298 enum wlan_serialization_cmd_type cmd_type); 299 300 301 /** 302 * wlan_serialization_destroy_list() - Release the cmds and destroy list 303 * @ser_pdev_obj: Serialization private pdev object 304 * @list: List to be destroyed 305 * 306 * Return: None 307 */ 308 void wlan_serialization_destroy_list( 309 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj, 310 qdf_list_t *list); 311 312 /** 313 * wlan_serialization_get_psoc_priv_obj() - Return the component private obj 314 * @psoc: Pointer to the PSOC object 315 * 316 * Return: Serialization component's PSOC level private data object 317 */ 318 struct wlan_serialization_psoc_priv_obj *wlan_serialization_get_psoc_priv_obj( 319 struct wlan_objmgr_psoc *psoc); 320 321 /** 322 * wlan_serialization_get_pdev_priv_obj() - Return the component private obj 323 * @psoc: Pointer to the PDEV object 324 * 325 * Return: Serialization component's PDEV level private data object 326 */ 327 struct wlan_serialization_pdev_priv_obj *wlan_serialization_get_pdev_priv_obj( 328 struct wlan_objmgr_pdev *pdev); 329 330 /** 331 * wlan_serialization_get_psoc_obj() - Return the component private obj 332 * @psoc: Pointer to the SERIALIZATION object 333 * 334 * Return: Serialization component's level private data object 335 */ 336 struct wlan_serialization_psoc_priv_obj * 337 wlan_serialization_get_psoc_obj(struct wlan_serialization_command *cmd); 338 339 /** 340 * wlan_serialization_is_cmd_in_vdev_list() - Check Node present in VDEV list 341 * @vdev: Pointer to the VDEV object 342 * @queue: Pointer to the qdf_list_t 343 * 344 * Return: Boolean true or false 345 */ 346 bool 347 wlan_serialization_is_cmd_in_vdev_list( 348 struct wlan_objmgr_vdev *vdev, qdf_list_t *queue); 349 350 /** 351 * wlan_serialization_is_cmd_in_pdev_list() - Check Node present in PDEV list 352 * @pdev: Pointer to the PDEV object 353 * @queue: Pointer to the qdf_list_t 354 * 355 * Return: Boolean true or false 356 */ 357 bool 358 wlan_serialization_is_cmd_in_pdev_list( 359 struct wlan_objmgr_pdev *pdev, qdf_list_t *queue); 360 361 /** 362 * wlan_serialization_is_cmd_in_active_pending() - return cmd status 363 * active/pending queue 364 * @cmd_in_active: CMD in active list 365 * @cmd_in_pending: CMD in pending list 366 * 367 * Return: enum wlan_serialization_cmd_status 368 */ 369 enum wlan_serialization_cmd_status 370 wlan_serialization_is_cmd_in_active_pending(bool cmd_in_active, 371 bool cmd_in_pending); 372 373 /** 374 * wlan_serialization_remove_all_cmd_from_queue() - Remove cmd which matches 375 * @queue: queue from where command needs to be removed 376 * @ser_pdev_obj: pointer to serialization object 377 * @pdev: pointer to pdev 378 * @vdev: pointer to vdev 379 * @cmd: pointer to cmd 380 * @is_active_queue: to check if command matching is for active queue 381 * 382 * This API will remove one or more commands which match the given parameters 383 * interms of argument. For example, if user request all commands to removed 384 * which matches "vdev" then iterate through all commands, find out and remove 385 * command which matches vdev object. 386 * 387 * Return: enum wlan_serialization_cmd_status 388 */ 389 enum wlan_serialization_cmd_status 390 wlan_serialization_remove_all_cmd_from_queue(qdf_list_t *queue, 391 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj, 392 struct wlan_objmgr_pdev *pdev, struct wlan_objmgr_vdev *vdev, 393 struct wlan_serialization_command *cmd, 394 uint8_t is_active_queue); 395 /** 396 * wlan_serialization_is_cmd_present_queue() - Check if same command 397 * is already present active or pending queue 398 * @cmd: pointer to command which we need to find 399 * @is_active_queue: flag to find the command in active or pending queue 400 * 401 * This API will check the given command is already present in active or 402 * pending queue based on flag 403 * If present then return true otherwise false 404 * 405 * Return: true or false 406 */ 407 bool wlan_serialization_is_cmd_present_queue( 408 struct wlan_serialization_command *cmd, 409 uint8_t is_active_queue); 410 411 /** 412 * wlan_serialization_activate_cmd() - activate cmd in active queue 413 * @cmd_list: Command needs to be activated 414 * @ser_pdev_obj: Serialization private pdev object 415 * 416 * Return: None 417 */ 418 void wlan_serialization_activate_cmd( 419 struct wlan_serialization_command_list *cmd_list, 420 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj); 421 422 /** 423 * wlan_serialization_list_empty() - check if the list is empty 424 * @queue: Queue/List that needs to be checked for emptiness 425 * @ser_pdev_obj: Serialization private pdev object 426 * 427 * Return: true if list is empty and false otherwise 428 */ 429 bool wlan_serialization_list_empty( 430 qdf_list_t *queue, 431 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj); 432 433 /** 434 * wlan_serialization_list_size() - Find the size of the provided queue 435 * @queue: Queue/List for which the size/length is to be returned 436 * @ser_pdev_obj: Serialization private pdev object 437 * 438 * Return: size/length of the queue/list 439 */ 440 uint32_t wlan_serialization_list_size( 441 qdf_list_t *queue, 442 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj); 443 /** 444 * wlan_serialization_acquire_lock() - to acquire lock for serialization module 445 * @obj: pdev private object 446 * 447 * This API will acquire lock for serialization module. Mutex or spinlock will 448 * be decided based on the context of the operation. 449 * 450 * Return: QDF_STATUS based on outcome of the operation 451 */ 452 QDF_STATUS 453 wlan_serialization_acquire_lock(struct wlan_serialization_pdev_priv_obj *obj); 454 455 /** 456 * wlan_serialization_release_lock() - to release lock for serialization module 457 * @obj: pdev private object 458 * 459 * This API will release lock for serialization module. Mutex or spinlock will 460 * be decided based on the context of the operation. 461 * 462 * Return: QDF_STATUS based on outcome of the operation 463 */ 464 QDF_STATUS 465 wlan_serialization_release_lock(struct wlan_serialization_pdev_priv_obj *obj); 466 467 /** 468 * wlan_serialization_create_lock() - to create lock for serialization module 469 * @obj: pdev private object 470 * 471 * This API will create a lock for serialization module. 472 * 473 * Return: QDF_STATUS based on outcome of the operation 474 */ 475 QDF_STATUS 476 wlan_serialization_create_lock(struct wlan_serialization_pdev_priv_obj *obj); 477 478 /** 479 * wlan_serialization_destroy_lock() - to destroy lock for serialization module 480 * 481 * This API will destroy a lock for serialization module. 482 * 483 * Return: QDF_STATUS based on outcome of the operation 484 */ 485 QDF_STATUS 486 wlan_serialization_destroy_lock(struct wlan_serialization_pdev_priv_obj *obj); 487 /** 488 * wlan_serialization_match_cmd_scan_id() - Check for a match on given nnode 489 * @nnode: The node on which the matching has to be done 490 * @cmd: Command that needs to be filled if there is a match 491 * @scan_id: Scan ID to be matched 492 * @vdev: VDEV object to be matched 493 * @ser_pdev_obj: Serialization PDEV Object pointer. 494 * 495 * This API will check if the scan ID and VDEV of the given nnode are 496 * matching with the one's that are being passed to this function. 497 * 498 * Return: True if matched,false otherwise. 499 */ 500 bool wlan_serialization_match_cmd_scan_id( 501 qdf_list_node_t *nnode, 502 struct wlan_serialization_command **cmd, 503 uint16_t scan_id, struct wlan_objmgr_vdev *vdev, 504 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj); 505 /** 506 * wlan_serialization_match_cmd_id_type() - Check for a match on given nnode 507 * @nnode: The node on which the matching has to be done 508 * @cmd: Command that needs to be matched 509 * @ser_pdev_obj: Serialization PDEV Object pointer. 510 * 511 * This API will check if the cmd ID and cmd type of the given nnode are 512 * matching with the one's that are being passed to this function. 513 * 514 * Return: True if matched,false otherwise. 515 */ 516 bool wlan_serialization_match_cmd_id_type( 517 qdf_list_node_t *nnode, 518 struct wlan_serialization_command *cmd, 519 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj); 520 /** 521 * wlan_serialization_match_cmd_vdev() - Check for a match on given nnode 522 * @nnode: The node on which the matching has to be done 523 * @vdev: VDEV object that needs to be matched 524 * 525 * This API will check if the VDEV object of the given nnode are 526 * matching with the one's that are being passed to this function. 527 * 528 * Return: True if matched,false otherwise. 529 */ 530 bool wlan_serialization_match_cmd_vdev(qdf_list_node_t *nnode, 531 struct wlan_objmgr_vdev *vdev); 532 /** 533 * wlan_serialization_match_cmd_pdev() - Check for a match on given nnode 534 * @nnode: The node on which the matching has to be done 535 * @pdev: VDEV object that needs to be matched 536 * 537 * This API will check if the PDEV object of the given nnode are 538 * matching with the one's that are being passed to this function. 539 * 540 * Return: True if matched,false otherwise. 541 */ 542 bool wlan_serialization_match_cmd_pdev(qdf_list_node_t *nnode, 543 struct wlan_objmgr_pdev *pdev); 544 /** 545 * wlan_serialization_remove_front() - Remove the front node of the list 546 * @list: List from which the node is to be removed 547 * @node: Pointer to store the node that is removed 548 * @ser_pdev_obj: Serialization PDEV Object pointer 549 * 550 * Return: QDF_STATUS Success or Failure 551 */ 552 QDF_STATUS wlan_serialization_remove_front( 553 qdf_list_t *list, 554 qdf_list_node_t **node, 555 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj); 556 /** 557 * wlan_serialization_remove_node() - Remove the given node from the list 558 * @list: List from which the node is to be removed 559 * @node: Pointer to the node that is to be removed 560 * @ser_pdev_obj: Serialization PDEV Object pointer 561 * 562 * Return: QDF_STATUS Success or Failure 563 */ 564 QDF_STATUS wlan_serialization_remove_node( 565 qdf_list_t *list, 566 qdf_list_node_t *node, 567 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj); 568 /** 569 * wlan_serialization_insert_front() - Insert a node into the front of the list 570 * @list: List to which the node is to be inserted 571 * @node: Pointer to the node that is to be inserted 572 * @ser_pdev_obj: Serialization PDEV Object pointer 573 * 574 * Return: QDF_STATUS Success or Failure 575 */ 576 QDF_STATUS wlan_serialization_insert_front( 577 qdf_list_t *list, 578 qdf_list_node_t *node, 579 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj); 580 /** 581 * wlan_serialization_insert_back() - Insert a node into the back of the list 582 * @list: List to which the node is to be inserted 583 * @node: Pointer to the node that is to be inserted 584 * @ser_pdev_obj: Serialization PDEV Object pointer 585 * 586 * Return: QDF_STATUS Success or Failure 587 */ 588 QDF_STATUS wlan_serialization_insert_back( 589 qdf_list_t *list, 590 qdf_list_node_t *node, 591 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj); 592 /** 593 * wlan_serialization_peek_front() - Peek the front node of the list 594 * @list: List on which the node is to be peeked 595 * @node: Pointer to the store the node that is being peeked 596 * @ser_pdev_obj: Serialization PDEV Object pointer 597 * 598 * Return: QDF_STATUS Success or Failure 599 */ 600 QDF_STATUS wlan_serialization_peek_front( 601 qdf_list_t *list, 602 qdf_list_node_t **node, 603 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj); 604 /** 605 * wlan_serialization_peek_next() - Peek the next node of the list 606 * @list: List on which the node is to be peeked 607 * @node1: Input node which is previous to the node to be peeked 608 * @node2: Pointer to the store the node that is being peeked 609 * @ser_pdev_obj: Serialization PDEV Object pointer 610 * 611 * Return: QDF_STATUS Success or Failure 612 */ 613 QDF_STATUS wlan_serialization_peek_next( 614 qdf_list_t *list, 615 qdf_list_node_t *node1, 616 qdf_list_node_t **node2, 617 struct wlan_serialization_pdev_priv_obj *ser_pdev_obj); 618 #else /*New serialization code*/ 619 /* Include files */ 620 #include <qdf_status.h> 621 #include <qdf_list.h> 622 #include <qdf_mc_timer.h> 623 #include <wlan_objmgr_cmn.h> 624 #include <wlan_objmgr_global_obj.h> 625 #include <wlan_objmgr_psoc_obj.h> 626 #include <wlan_scan_ucfg_api.h> 627 #include "wlan_serialization_rules_i.h" 628 629 /* 630 * Below bit positions are used to identify if a 631 * serialization command is in use or marked for 632 * deletion. 633 * CMD_MARKED_FOR_ACTIVATION - The command is about to be activated 634 * CMD_IS_ACTIVE - The command is active and currently in use 635 */ 636 #define CMD_MARKED_FOR_ACTIVATION 1 637 #define CMD_IS_ACTIVE 2 638 /** 639 * struct wlan_serialization_timer - Timer used for serialization 640 * @cmd: Cmd to which the timer is linked 641 * @timer: Timer associated with the command 642 * 643 * Timers are allocated statically during init, one each for the 644 * maximum active commands permitted in the system. Once a cmd is 645 * moved from pending list to active list, the timer is activated 646 * and once the cmd is completed, the timer is cancelled. Timer is 647 * also cancelled if the command is aborted 648 * 649 * The timers are maintained per psoc. A timer is associated to 650 * unique combination of pdev, cmd_type and cmd_id. 651 */ 652 struct wlan_serialization_timer { 653 struct wlan_serialization_command *cmd; 654 qdf_timer_t timer; 655 }; 656 657 /** 658 * enum wlan_serialization_node - Types of available nodes in serialization list 659 * @WLAN_SER_PDEV_NODE: pdev node from the pdev queue 660 * @WLAN_SER_VDEV_NODE: vdev node from the vdev queue 661 */ 662 enum wlan_serialization_node { 663 WLAN_SER_PDEV_NODE, 664 WLAN_SER_VDEV_NODE, 665 }; 666 667 /** 668 * struct wlan_serialization_command_list - List of commands to be serialized 669 * @pdev_node: PDEV node identifier in the list 670 * @vdev_node: VDEV node identifier in the list 671 * @cmd: Command to be serialized 672 * @cmd_in_use: flag to check if the node/entry is logically active 673 */ 674 struct wlan_serialization_command_list { 675 qdf_list_node_t pdev_node; 676 qdf_list_node_t vdev_node; 677 struct wlan_serialization_command cmd; 678 unsigned long cmd_in_use; 679 }; 680 681 /** 682 * struct wlan_serialization_pdev_queue - queue data related to pdev 683 * @active_list: list to hold the commands currently being executed 684 * @pending_list: list to hold the commands currently pending 685 * @cmd_pool_list: list to hold the global command pool 686 * @vdev_active_cmd_bitmap: Active cmd bitmap of vdev for the given pdev 687 * @blocking_cmd_active: Indicate if a blocking cmd is in active execution 688 * @blocking_cmd_waiting: Indicate if a blocking cmd is in pending queue 689 * @pdev_queue_lock: pdev lock to protect concurrent operations on the queues 690 */ 691 struct wlan_serialization_pdev_queue { 692 qdf_list_t active_list; 693 qdf_list_t pending_list; 694 qdf_list_t cmd_pool_list; 695 uint32_t vdev_active_cmd_bitmap; 696 bool blocking_cmd_active; 697 uint16_t blocking_cmd_waiting; 698 qdf_spinlock_t pdev_queue_lock; 699 }; 700 701 /** 702 * struct wlan_serialization_vdev_queue - queue data related to vdev 703 * @active_list: list to hold the commands currently being executed 704 * @pending_list list: to hold the commands currently pending 705 */ 706 struct wlan_serialization_vdev_queue { 707 qdf_list_t active_list; 708 qdf_list_t pending_list; 709 }; 710 711 /** 712 * enum wlan_serialization_pdev_queue_type - Types of available pdev queues 713 * @QUEUE_COMP_SCAN: Scan queue 714 * @QUEUE_COMP_NON_SCAN: Non Scan queue 715 */ 716 enum serialization_pdev_queue_type { 717 SER_PDEV_QUEUE_COMP_SCAN, 718 SER_PDEV_QUEUE_COMP_NON_SCAN, 719 SER_PDEV_QUEUE_COMP_MAX, 720 }; 721 722 /** 723 * enum wlan_serialization_vdev_queue_type - Types of available vdev queues 724 * @QUEUE_COMP_NON_SCAN: Non Scan queue 725 */ 726 enum serialization_vdev_queue_type { 727 SER_VDEV_QUEUE_COMP_NON_SCAN, 728 SER_VDEV_QUEUE_COMP_MAX, 729 }; 730 731 /** 732 * enum wlan_serialization_match_type - Comparison options for a command 733 * @WLAN_SER_MATCH_VDEV: Compare vdev 734 * @WLAN_SER_MATCH_PDEV: Compare pdev 735 * @WLAN_SER_MATCH_CMD_TYPE: Compare command type 736 * @WLAN_SER_MATCH_CMD_TYPE_VDEV: Compare command type and vdev 737 * @WLAN_SER_MATCH_CMD_ID: Compare command id 738 * @WLAN_SER_MATCH_CMD_ID_VDEV: Compare command id and vdev 739 */ 740 enum wlan_serialization_match_type { 741 WLAN_SER_MATCH_VDEV, 742 WLAN_SER_MATCH_PDEV, 743 WLAN_SER_MATCH_CMD_TYPE, 744 WLAN_SER_MATCH_CMD_TYPE_VDEV, 745 WLAN_SER_MATCH_CMD_ID, 746 WLAN_SER_MATCH_CMD_ID_VDEV, 747 WLAN_SER_MATCH_MAX, 748 }; 749 750 /** 751 * struct wlan_ser_pdev_obj - pdev obj data for serialization 752 * @pdev_q: Array of pdev queues 753 */ 754 struct wlan_ser_pdev_obj { 755 struct wlan_serialization_pdev_queue pdev_q[SER_PDEV_QUEUE_COMP_MAX]; 756 }; 757 758 /** 759 * struct wlan_ser_vdev_priv_obj - Serialization private object of vdev 760 * @vdev_q: Array of vdev queues 761 */ 762 struct wlan_ser_vdev_obj { 763 struct wlan_serialization_vdev_queue vdev_q[SER_VDEV_QUEUE_COMP_MAX]; 764 }; 765 766 /** 767 * struct wlan_ser_psoc_obj - psoc obj data for serialization 768 * @comp_info_cb - module level callback 769 * @apply_rules_cb - pointer to apply rules on the cmd 770 * @timers - Timers associated with the active commands 771 * @max_axtive_cmds - Maximum active commands allowed 772 * 773 * Serialization component takes a command as input and checks whether to 774 * allow/deny the command. It will use the module level callback registered 775 * by each component to fetch the information needed to apply the rules. 776 * Once the information is available, the rules callback registered for each 777 * command internally by serialization will be applied to determine the 778 * checkpoint for the command. If allowed, command will be put into active/ 779 * pending list and each active command is associated with a timer. 780 */ 781 struct wlan_ser_psoc_obj { 782 wlan_serialization_comp_info_cb comp_info_cb[ 783 WLAN_SER_CMD_MAX][WLAN_UMAC_COMP_ID_MAX]; 784 wlan_serialization_apply_rules_cb apply_rules_cb[WLAN_SER_CMD_MAX]; 785 struct wlan_serialization_timer *timers; 786 uint8_t max_active_cmds; 787 qdf_spinlock_t timer_lock; 788 }; 789 790 /** 791 * wlan_serialization_remove_cmd_from_queue() - to remove command from 792 * given queue 793 * @queue: queue from which command needs to be removed 794 * @cmd: command to match in the queue 795 * @pcmd_list: Pointer to command list containing the command 796 * @ser_pdev_obj: pointer to private pdev serialization object 797 * @node_type: Pdev node or vdev node 798 * 799 * This API takes the queue, it matches the provided command from this queue 800 * and removes it. Before removing the command, it will notify the caller 801 * that if it needs to remove any memory allocated by caller. 802 * 803 * Return: QDF_STATUS_SUCCESS on success, error code on failure 804 */ 805 QDF_STATUS 806 wlan_serialization_remove_cmd_from_queue( 807 qdf_list_t *queue, 808 struct wlan_serialization_command *cmd, 809 struct wlan_serialization_command_list **pcmd_list, 810 struct wlan_ser_pdev_obj *ser_pdev_obj, 811 enum wlan_serialization_node node_type); 812 813 /** 814 * wlan_serialization_add_cmd_from_queue() - Add a cmd to 815 * given queue 816 * @queue: queue from which command needs to be removed 817 * @cmd_list: Pointer to command list containing the command 818 * @ser_pdev_obj: pointer to private pdev serialization object 819 * @is_cmd_for_active_queue: Add cmd to active or pending queue 820 * @node_type: Pdev node or vdev node 821 * 822 * Return: Status of the serialization request 823 */ 824 enum wlan_serialization_status 825 wlan_serialization_add_cmd_to_queue( 826 qdf_list_t *queue, 827 struct wlan_serialization_command_list *cmd_list, 828 struct wlan_ser_pdev_obj *ser_pdev_obj, 829 uint8_t is_cmd_for_active_queue, 830 enum wlan_serialization_node node_type); 831 832 /** 833 * wlan_serialization_get_psoc_from_cmd() - get psoc from provided cmd 834 * @cmd: pointer to actual command 835 * 836 * This API will get the pointer to psoc through checking type of cmd 837 * 838 * Return: pointer to psoc 839 */ 840 struct wlan_objmgr_psoc* 841 wlan_serialization_get_psoc_from_cmd(struct wlan_serialization_command *cmd); 842 843 /** 844 * wlan_serialization_get_pdev_from_cmd() - get pdev from provided cmd 845 * @cmd: pointer to actual command 846 * 847 * This API will get the pointer to pdev through checking type of cmd 848 * 849 * Return: pointer to pdev 850 */ 851 struct wlan_objmgr_pdev* 852 wlan_serialization_get_pdev_from_cmd(struct wlan_serialization_command *cmd); 853 854 /** 855 * wlan_serialization_get_vdev_from_cmd() - get vdev from provided cmd 856 * @cmd: pointer to actual command 857 * 858 * This API will get the pointer to vdev through checking type of cmd 859 * 860 * Return: pointer to vdev 861 */ 862 struct wlan_objmgr_vdev* 863 wlan_serialization_get_vdev_from_cmd(struct wlan_serialization_command *cmd); 864 865 /** 866 * wlan_serialization_get_cmd_from_queue() - to extract command from given queue 867 * @queue: pointer to queue 868 * @nnode: next node to extract 869 * 870 * This API will try to extract node from queue which is next to prev node. If 871 * no previous node is given then take out the front node of the queue. 872 * 873 * Return: QDF_STATUS 874 */ 875 QDF_STATUS wlan_serialization_get_cmd_from_queue( 876 qdf_list_t *queue, qdf_list_node_t **nnode); 877 878 /** 879 * wlan_serialization_stop_timer() - to stop particular timer 880 * @ser_timer: pointer to serialization timer 881 * 882 * This API stops the particular timer 883 * 884 * Return: QDF_STATUS 885 */ 886 QDF_STATUS 887 wlan_serialization_stop_timer(struct wlan_serialization_timer *ser_timer); 888 889 /** 890 * wlan_serialization_cleanup_all_timers() - to clean-up all timers 891 * 892 * @psoc_ser_ob: pointer to serialization psoc private object 893 * 894 * This API is to cleanup all the timers. it can be used when serialization 895 * module is exiting. it will make sure that if timer is running then it will 896 * stop and destroys the timer 897 * 898 * Return: QDF_STATUS 899 */ 900 QDF_STATUS wlan_serialization_cleanup_all_timers( 901 struct wlan_ser_psoc_obj *psoc_ser_ob); 902 903 /** 904 * wlan_serialization_validate_cmd() - Validate the command 905 * @comp_id: Component ID 906 * @cmd_type: Command Type 907 * 908 * Return: QDF_STATUS 909 */ 910 QDF_STATUS wlan_serialization_validate_cmd( 911 enum wlan_umac_comp_id comp_id, 912 enum wlan_serialization_cmd_type cmd_type); 913 914 /** 915 * wlan_serialization_validate_cmd_list() - Validate the command list 916 * @cmd_list: Serialization command list 917 * 918 * Return: QDF_STATUS 919 */ 920 QDF_STATUS wlan_serialization_validate_cmd_list( 921 struct wlan_serialization_command_list *cmd_list); 922 923 /** 924 * wlan_serialization_validate_cmdtype() - Validate the command type 925 * @cmd_type: Command Type 926 * 927 * Return: QDF_STATUS 928 */ 929 QDF_STATUS wlan_serialization_validate_cmdtype( 930 enum wlan_serialization_cmd_type cmd_type); 931 932 /** 933 * wlan_serialization_destroy_pdev_list() - Release the pdev cmds and 934 * destroy list 935 * @pdev_queue: Pointer to the pdev queue 936 * 937 * Return: None 938 */ 939 void wlan_serialization_destroy_pdev_list( 940 struct wlan_serialization_pdev_queue *pdev_queue); 941 942 /** 943 * wlan_serialization_destroy_vdev_list() - Release the vdev cmds and 944 * destroy list 945 * @list: List to be destroyed 946 * 947 * Return: None 948 */ 949 void wlan_serialization_destroy_vdev_list(qdf_list_t *list); 950 951 /** 952 * wlan_serialization_get_psoc_obj() - Return the component private obj 953 * @psoc: Pointer to the PSOC object 954 * 955 * Return: Serialization component's PSOC level private data object 956 */ 957 struct wlan_ser_psoc_obj *wlan_serialization_get_psoc_obj( 958 struct wlan_objmgr_psoc *psoc); 959 960 /** 961 * wlan_serialization_get_pdev_obj() - Return the component private obj 962 * @psoc: Pointer to the PDEV object 963 * 964 * Return: Serialization component's PDEV level private data object 965 */ 966 struct wlan_ser_pdev_obj *wlan_serialization_get_pdev_obj( 967 struct wlan_objmgr_pdev *pdev); 968 969 /** 970 * wlan_serialization_get_vdev_obj() - Return the component private obj 971 * @vdev: Pointer to the VDEV object 972 * 973 * Return: Serialization component's VDEV level private data object 974 */ 975 struct wlan_ser_vdev_obj *wlan_serialization_get_vdev_obj( 976 struct wlan_objmgr_vdev *vdev); 977 978 /** 979 * wlan_serialization_is_cmd_in_vdev_list() - Check Node present in VDEV list 980 * @vdev: Pointer to the VDEV object 981 * @queue: Pointer to the qdf_list_t 982 * @node_type: Pdev node or vdev node 983 * 984 * Return: Boolean true or false 985 */ 986 bool 987 wlan_serialization_is_cmd_in_vdev_list( 988 struct wlan_objmgr_vdev *vdev, qdf_list_t *queue, 989 enum wlan_serialization_node node_type); 990 991 /** 992 * wlan_serialization_is_cmd_in_pdev_list() - Check Node present in PDEV list 993 * @pdev: Pointer to the PDEV object 994 * @queue: Pointer to the qdf_list_t 995 * 996 * Return: Boolean true or false 997 */ 998 bool 999 wlan_serialization_is_cmd_in_pdev_list( 1000 struct wlan_objmgr_pdev *pdev, qdf_list_t *queue); 1001 1002 /** 1003 * wlan_serialization_is_cmd_in_active_pending() - return cmd status 1004 * active/pending queue 1005 * @cmd_in_active: CMD in active list 1006 * @cmd_in_pending: CMD in pending list 1007 * 1008 * Return: enum wlan_serialization_cmd_status 1009 */ 1010 enum wlan_serialization_cmd_status 1011 wlan_serialization_is_cmd_in_active_pending( 1012 bool cmd_in_active, bool cmd_in_pending); 1013 1014 /** 1015 * wlan_serialization_is_cmd_present_in_given_queue() - Check if the cmd is 1016 * present in the given queue 1017 * @queue: List of commands which has to be searched 1018 * @cmd: Serialization command information 1019 * @node_type: Pdev node or vdev node 1020 * 1021 * Return: Boolean true or false 1022 */ 1023 bool wlan_serialization_is_cmd_present_in_given_queue( 1024 qdf_list_t *queue, 1025 struct wlan_serialization_command *cmd, 1026 enum wlan_serialization_node node_type); 1027 1028 /** 1029 * wlan_serialization_timer_destroy() - destroys the timer 1030 * @ser_timer: pointer to particular timer 1031 * 1032 * This API destroys the memory allocated by timer and assigns cmd member of 1033 * that timer structure to NULL 1034 * 1035 * Return: QDF_STATUS 1036 */ 1037 QDF_STATUS wlan_serialization_timer_destroy( 1038 struct wlan_serialization_timer *ser_timer); 1039 1040 /** 1041 * wlan_serialization_list_empty() - check if the list is empty 1042 * @queue: Queue/List that needs to be checked for emptiness 1043 * 1044 * Return: true if list is empty and false otherwise 1045 */ 1046 bool wlan_serialization_list_empty(qdf_list_t *queue); 1047 1048 /** 1049 * wlan_serialization_list_size() - Find the size of the provided queue 1050 * @queue: Queue/List for which the size/length is to be returned 1051 * 1052 * Return: size/length of the queue/list 1053 */ 1054 uint32_t wlan_serialization_list_size(qdf_list_t *queue); 1055 1056 /** 1057 * wlan_serialization_match_cmd_type() - Check for a match on given nnode 1058 * @nnode: The node on which the matching has to be done 1059 * @cmd_type: Command type that needs to be matched 1060 * @node_type: Pdev node or vdev node 1061 * 1062 * This API will check if the cmd ID and cmd type of the given nnode are 1063 * matching with the one's that are being passed to this function. 1064 * 1065 * Return: True if matched,false otherwise. 1066 */ 1067 bool wlan_serialization_match_cmd_type( 1068 qdf_list_node_t *nnode, 1069 enum wlan_serialization_cmd_type, 1070 enum wlan_serialization_node node_type); 1071 1072 /** 1073 * wlan_serialization_match_cmd_id_type() - Check for a match on given nnode 1074 * @nnode: The node on which the matching has to be done 1075 * @cmd: Command that needs to be matched 1076 * @node_type: Pdev node or vdev node 1077 * 1078 * This API will check if the cmd ID and cmd type of the given nnode are 1079 * matching with the one's that are being passed to this function. 1080 * 1081 * Return: True if matched,false otherwise. 1082 */ 1083 bool wlan_serialization_match_cmd_id_type( 1084 qdf_list_node_t *nnode, 1085 struct wlan_serialization_command *cmd, 1086 enum wlan_serialization_node node_type); 1087 1088 /** 1089 * wlan_serialization_match_cmd_vdev() - Check for a match on given nnode 1090 * @nnode: The node on which the matching has to be done 1091 * @vdev: VDEV object that needs to be matched 1092 * @node_type: Pdev node or vdev node 1093 * 1094 * This API will check if the VDEV object of the given nnode are 1095 * matching with the one's that are being passed to this function. 1096 * 1097 * Return: True if matched,false otherwise. 1098 */ 1099 bool wlan_serialization_match_cmd_vdev(qdf_list_node_t *nnode, 1100 struct wlan_objmgr_vdev *vdev, 1101 enum wlan_serialization_node node_type); 1102 1103 /** 1104 * wlan_serialization_match_cmd_pdev() - Check for a match on given nnode 1105 * @nnode: The node on which the matching has to be done 1106 * @pdev: pdev object that needs to be matched 1107 * @node_type: Node type. Pdev node or vdev node 1108 * 1109 * This API will check if the PDEV object of the given nnode are 1110 * matching with the one's that are being passed to this function. 1111 * 1112 * Return: True if matched,false otherwise. 1113 */ 1114 bool wlan_serialization_match_cmd_pdev(qdf_list_node_t *nnode, 1115 struct wlan_objmgr_pdev *pdev, 1116 enum wlan_serialization_node node_type); 1117 1118 /** 1119 * wlan_serialization_find_cmd() - Find the cmd matching the given criterias 1120 * @cmd: Serialization command information 1121 * @cmd_type: Command type to be matched 1122 * @pdev: pdev object that needs to be matched 1123 * @vdev: vdev object that needs to be matched 1124 * @node_type: Node type. Pdev node or vdev node 1125 * 1126 * Return: Pointer to the node member in the list 1127 */ 1128 qdf_list_node_t * 1129 wlan_serialization_find_cmd(qdf_list_t *queue, uint32_t match_type, 1130 struct wlan_serialization_command *cmd, 1131 enum wlan_serialization_cmd_type cmd_type, 1132 struct wlan_objmgr_pdev *pdev, 1133 struct wlan_objmgr_vdev *vdev, 1134 enum wlan_serialization_node node_type); 1135 1136 /** 1137 * wlan_serialization_remove_front() - Remove the front node of the list 1138 * @list: List from which the node is to be removed 1139 * @node: Pointer to store the node that is removed 1140 * 1141 * Return: QDF_STATUS Success or Failure 1142 */ 1143 QDF_STATUS wlan_serialization_remove_front( 1144 qdf_list_t *list, 1145 qdf_list_node_t **node); 1146 1147 /** 1148 * wlan_serialization_remove_node() - Remove the given node from the list 1149 * @list: List from which the node is to be removed 1150 * @node: Pointer to the node that is to be removed 1151 * 1152 * Return: QDF_STATUS Success or Failure 1153 */ 1154 QDF_STATUS wlan_serialization_remove_node( 1155 qdf_list_t *list, 1156 qdf_list_node_t *node); 1157 1158 /** 1159 * wlan_serialization_insert_front() - Insert a node into the front of the list 1160 * @list: List to which the node is to be inserted 1161 * @node: Pointer to the node that is to be inserted 1162 * 1163 * Return: QDF_STATUS Success or Failure 1164 */ 1165 QDF_STATUS wlan_serialization_insert_front( 1166 qdf_list_t *list, 1167 qdf_list_node_t *node); 1168 1169 /** 1170 * wlan_serialization_insert_back() - Insert a node into the back of the list 1171 * @list: List to which the node is to be inserted 1172 * @node: Pointer to the node that is to be inserted 1173 * 1174 * Return: QDF_STATUS Success or Failure 1175 */ 1176 QDF_STATUS wlan_serialization_insert_back( 1177 qdf_list_t *list, 1178 qdf_list_node_t *node); 1179 1180 /** 1181 * wlan_serialization_peek_front() - Peek the front node of the list 1182 * @list: List on which the node is to be peeked 1183 * @node: Pointer to the store the node that is being peeked 1184 * 1185 * Return: QDF_STATUS Success or Failure 1186 */ 1187 QDF_STATUS wlan_serialization_peek_front( 1188 qdf_list_t *list, 1189 qdf_list_node_t **node); 1190 1191 /** 1192 * wlan_serialization_peek_next() - Peek the next node of the list 1193 * @list: List on which the node is to be peeked 1194 * @node1: Pointer to the node1 from where the next node has to be peeked 1195 * @node2: Pointer to the store the node that is being peeked 1196 * 1197 * Return: QDF_STATUS Success or Failure 1198 */ 1199 QDF_STATUS wlan_serialization_peek_next( 1200 qdf_list_t *list, 1201 qdf_list_node_t *node1, 1202 qdf_list_node_t **node2); 1203 1204 /** 1205 * wlan_serialization_acquire_lock() - Acquire lock to the given queue 1206 * @lock: Pointer to the lock 1207 * 1208 * Return: QDF_STATUS success or failure 1209 */ 1210 QDF_STATUS 1211 wlan_serialization_acquire_lock(qdf_spinlock_t *lock); 1212 1213 /** 1214 * wlan_serialization_release_lock() - Release lock to the given queue 1215 * @lock: Pointer to the lock 1216 * 1217 * Return: QDF_STATUS success or failure 1218 */ 1219 QDF_STATUS 1220 wlan_serialization_release_lock(qdf_spinlock_t *lock); 1221 1222 /** 1223 * wlan_serialization_create_lock() - Init the lock to the given queue 1224 * @lock: Pointer to the lock 1225 * 1226 * Return: QDF_STATUS success or failure 1227 */ 1228 QDF_STATUS 1229 wlan_serialization_create_lock(qdf_spinlock_t *lock); 1230 1231 /** 1232 * wlan_serialization_destroy_lock() - Deinit the lock to the given queue 1233 * @lock: Pointer to the lock 1234 * 1235 * Return: QDF_STATUS success or failure 1236 */ 1237 QDF_STATUS 1238 wlan_serialization_destroy_lock(qdf_spinlock_t *lock); 1239 #endif 1240 #endif 1241