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 }; 788 789 /** 790 * wlan_serialization_remove_cmd_from_queue() - to remove command from 791 * given queue 792 * @queue: queue from which command needs to be removed 793 * @cmd: command to match in the queue 794 * @pcmd_list: Pointer to command list containing the command 795 * @ser_pdev_obj: pointer to private pdev serialization object 796 * @node_type: Pdev node or vdev node 797 * 798 * This API takes the queue, it matches the provided command from this queue 799 * and removes it. Before removing the command, it will notify the caller 800 * that if it needs to remove any memory allocated by caller. 801 * 802 * Return: QDF_STATUS_SUCCESS on success, error code on failure 803 */ 804 QDF_STATUS 805 wlan_serialization_remove_cmd_from_queue( 806 qdf_list_t *queue, 807 struct wlan_serialization_command *cmd, 808 struct wlan_serialization_command_list **pcmd_list, 809 struct wlan_ser_pdev_obj *ser_pdev_obj, 810 enum wlan_serialization_node node_type); 811 812 /** 813 * wlan_serialization_add_cmd_from_queue() - Add a cmd to 814 * given queue 815 * @queue: queue from which command needs to be removed 816 * @cmd_list: Pointer to command list containing the command 817 * @ser_pdev_obj: pointer to private pdev serialization object 818 * @is_cmd_for_active_queue: Add cmd to active or pending queue 819 * @node_type: Pdev node or vdev node 820 * 821 * Return: Status of the serialization request 822 */ 823 enum wlan_serialization_status 824 wlan_serialization_add_cmd_to_queue( 825 qdf_list_t *queue, 826 struct wlan_serialization_command_list *cmd_list, 827 struct wlan_ser_pdev_obj *ser_pdev_obj, 828 uint8_t is_cmd_for_active_queue, 829 enum wlan_serialization_node node_type); 830 831 /** 832 * wlan_serialization_get_psoc_from_cmd() - get psoc from provided cmd 833 * @cmd: pointer to actual command 834 * 835 * This API will get the pointer to psoc through checking type of cmd 836 * 837 * Return: pointer to psoc 838 */ 839 struct wlan_objmgr_psoc* 840 wlan_serialization_get_psoc_from_cmd(struct wlan_serialization_command *cmd); 841 842 /** 843 * wlan_serialization_get_pdev_from_cmd() - get pdev from provided cmd 844 * @cmd: pointer to actual command 845 * 846 * This API will get the pointer to pdev through checking type of cmd 847 * 848 * Return: pointer to pdev 849 */ 850 struct wlan_objmgr_pdev* 851 wlan_serialization_get_pdev_from_cmd(struct wlan_serialization_command *cmd); 852 853 /** 854 * wlan_serialization_get_vdev_from_cmd() - get vdev from provided cmd 855 * @cmd: pointer to actual command 856 * 857 * This API will get the pointer to vdev through checking type of cmd 858 * 859 * Return: pointer to vdev 860 */ 861 struct wlan_objmgr_vdev* 862 wlan_serialization_get_vdev_from_cmd(struct wlan_serialization_command *cmd); 863 864 /** 865 * wlan_serialization_get_cmd_from_queue() - to extract command from given queue 866 * @queue: pointer to queue 867 * @nnode: next node to extract 868 * 869 * This API will try to extract node from queue which is next to prev node. If 870 * no previous node is given then take out the front node of the queue. 871 * 872 * Return: QDF_STATUS 873 */ 874 QDF_STATUS wlan_serialization_get_cmd_from_queue( 875 qdf_list_t *queue, qdf_list_node_t **nnode); 876 877 /** 878 * wlan_serialization_stop_timer() - to stop particular timer 879 * @ser_timer: pointer to serialization timer 880 * 881 * This API stops the particular timer 882 * 883 * Return: QDF_STATUS 884 */ 885 QDF_STATUS 886 wlan_serialization_stop_timer(struct wlan_serialization_timer *ser_timer); 887 888 /** 889 * wlan_serialization_cleanup_all_timers() - to clean-up all timers 890 * 891 * @psoc_ser_ob: pointer to serialization psoc private object 892 * 893 * This API is to cleanup all the timers. it can be used when serialization 894 * module is exiting. it will make sure that if timer is running then it will 895 * stop and destroys the timer 896 * 897 * Return: QDF_STATUS 898 */ 899 QDF_STATUS wlan_serialization_cleanup_all_timers( 900 struct wlan_ser_psoc_obj *psoc_ser_ob); 901 902 /** 903 * wlan_serialization_validate_cmd() - Validate the command 904 * @comp_id: Component ID 905 * @cmd_type: Command Type 906 * 907 * Return: QDF_STATUS 908 */ 909 QDF_STATUS wlan_serialization_validate_cmd( 910 enum wlan_umac_comp_id comp_id, 911 enum wlan_serialization_cmd_type cmd_type); 912 913 /** 914 * wlan_serialization_validate_cmd_list() - Validate the command list 915 * @cmd_list: Serialization command list 916 * 917 * Return: QDF_STATUS 918 */ 919 QDF_STATUS wlan_serialization_validate_cmd_list( 920 struct wlan_serialization_command_list *cmd_list); 921 922 /** 923 * wlan_serialization_validate_cmdtype() - Validate the command type 924 * @cmd_type: Command Type 925 * 926 * Return: QDF_STATUS 927 */ 928 QDF_STATUS wlan_serialization_validate_cmdtype( 929 enum wlan_serialization_cmd_type cmd_type); 930 931 /** 932 * wlan_serialization_destroy_pdev_list() - Release the pdev cmds and 933 * destroy list 934 * @pdev_queue: Pointer to the pdev queue 935 * 936 * Return: None 937 */ 938 void wlan_serialization_destroy_pdev_list( 939 struct wlan_serialization_pdev_queue *pdev_queue); 940 941 /** 942 * wlan_serialization_destroy_vdev_list() - Release the vdev cmds and 943 * destroy list 944 * @list: List to be destroyed 945 * 946 * Return: None 947 */ 948 void wlan_serialization_destroy_vdev_list(qdf_list_t *list); 949 950 /** 951 * wlan_serialization_get_psoc_obj() - Return the component private obj 952 * @psoc: Pointer to the PSOC object 953 * 954 * Return: Serialization component's PSOC level private data object 955 */ 956 struct wlan_ser_psoc_obj *wlan_serialization_get_psoc_obj( 957 struct wlan_objmgr_psoc *psoc); 958 959 /** 960 * wlan_serialization_get_pdev_obj() - Return the component private obj 961 * @psoc: Pointer to the PDEV object 962 * 963 * Return: Serialization component's PDEV level private data object 964 */ 965 struct wlan_ser_pdev_obj *wlan_serialization_get_pdev_obj( 966 struct wlan_objmgr_pdev *pdev); 967 968 /** 969 * wlan_serialization_get_vdev_obj() - Return the component private obj 970 * @vdev: Pointer to the VDEV object 971 * 972 * Return: Serialization component's VDEV level private data object 973 */ 974 struct wlan_ser_vdev_obj *wlan_serialization_get_vdev_obj( 975 struct wlan_objmgr_vdev *vdev); 976 977 /** 978 * wlan_serialization_is_cmd_in_vdev_list() - Check Node present in VDEV list 979 * @vdev: Pointer to the VDEV object 980 * @queue: Pointer to the qdf_list_t 981 * @node_type: Pdev node or vdev node 982 * 983 * Return: Boolean true or false 984 */ 985 bool 986 wlan_serialization_is_cmd_in_vdev_list( 987 struct wlan_objmgr_vdev *vdev, qdf_list_t *queue, 988 enum wlan_serialization_node node_type); 989 990 /** 991 * wlan_serialization_is_cmd_in_pdev_list() - Check Node present in PDEV list 992 * @pdev: Pointer to the PDEV object 993 * @queue: Pointer to the qdf_list_t 994 * 995 * Return: Boolean true or false 996 */ 997 bool 998 wlan_serialization_is_cmd_in_pdev_list( 999 struct wlan_objmgr_pdev *pdev, qdf_list_t *queue); 1000 1001 /** 1002 * wlan_serialization_is_cmd_in_active_pending() - return cmd status 1003 * active/pending queue 1004 * @cmd_in_active: CMD in active list 1005 * @cmd_in_pending: CMD in pending list 1006 * 1007 * Return: enum wlan_serialization_cmd_status 1008 */ 1009 enum wlan_serialization_cmd_status 1010 wlan_serialization_is_cmd_in_active_pending( 1011 bool cmd_in_active, bool cmd_in_pending); 1012 1013 /** 1014 * wlan_serialization_is_cmd_present_in_given_queue() - Check if the cmd is 1015 * present in the given queue 1016 * @queue: List of commands which has to be searched 1017 * @cmd: Serialization command information 1018 * @node_type: Pdev node or vdev node 1019 * 1020 * Return: Boolean true or false 1021 */ 1022 bool wlan_serialization_is_cmd_present_in_given_queue( 1023 qdf_list_t *queue, 1024 struct wlan_serialization_command *cmd, 1025 enum wlan_serialization_node node_type); 1026 1027 /** 1028 * wlan_serialization_timer_destroy() - destroys the timer 1029 * @ser_timer: pointer to particular timer 1030 * 1031 * This API destroys the memory allocated by timer and assigns cmd member of 1032 * that timer structure to NULL 1033 * 1034 * Return: QDF_STATUS 1035 */ 1036 QDF_STATUS wlan_serialization_timer_destroy( 1037 struct wlan_serialization_timer *ser_timer); 1038 1039 /** 1040 * wlan_serialization_list_empty() - check if the list is empty 1041 * @queue: Queue/List that needs to be checked for emptiness 1042 * 1043 * Return: true if list is empty and false otherwise 1044 */ 1045 bool wlan_serialization_list_empty(qdf_list_t *queue); 1046 1047 /** 1048 * wlan_serialization_list_size() - Find the size of the provided queue 1049 * @queue: Queue/List for which the size/length is to be returned 1050 * 1051 * Return: size/length of the queue/list 1052 */ 1053 uint32_t wlan_serialization_list_size(qdf_list_t *queue); 1054 1055 /** 1056 * wlan_serialization_match_cmd_type() - Check for a match on given nnode 1057 * @nnode: The node on which the matching has to be done 1058 * @cmd_type: Command type that needs to be matched 1059 * @node_type: Pdev node or vdev node 1060 * 1061 * This API will check if the cmd ID and cmd type of the given nnode are 1062 * matching with the one's that are being passed to this function. 1063 * 1064 * Return: True if matched,false otherwise. 1065 */ 1066 bool wlan_serialization_match_cmd_type( 1067 qdf_list_node_t *nnode, 1068 enum wlan_serialization_cmd_type, 1069 enum wlan_serialization_node node_type); 1070 1071 /** 1072 * wlan_serialization_match_cmd_id_type() - Check for a match on given nnode 1073 * @nnode: The node on which the matching has to be done 1074 * @cmd: Command that needs to be matched 1075 * @node_type: Pdev node or vdev node 1076 * 1077 * This API will check if the cmd ID and cmd type of the given nnode are 1078 * matching with the one's that are being passed to this function. 1079 * 1080 * Return: True if matched,false otherwise. 1081 */ 1082 bool wlan_serialization_match_cmd_id_type( 1083 qdf_list_node_t *nnode, 1084 struct wlan_serialization_command *cmd, 1085 enum wlan_serialization_node node_type); 1086 1087 /** 1088 * wlan_serialization_match_cmd_vdev() - Check for a match on given nnode 1089 * @nnode: The node on which the matching has to be done 1090 * @vdev: VDEV object that needs to be matched 1091 * @node_type: Pdev node or vdev node 1092 * 1093 * This API will check if the VDEV object of the given nnode are 1094 * matching with the one's that are being passed to this function. 1095 * 1096 * Return: True if matched,false otherwise. 1097 */ 1098 bool wlan_serialization_match_cmd_vdev(qdf_list_node_t *nnode, 1099 struct wlan_objmgr_vdev *vdev, 1100 enum wlan_serialization_node node_type); 1101 1102 /** 1103 * wlan_serialization_match_cmd_pdev() - Check for a match on given nnode 1104 * @nnode: The node on which the matching has to be done 1105 * @pdev: pdev object that needs to be matched 1106 * @node_type: Node type. Pdev node or vdev node 1107 * 1108 * This API will check if the PDEV object of the given nnode are 1109 * matching with the one's that are being passed to this function. 1110 * 1111 * Return: True if matched,false otherwise. 1112 */ 1113 bool wlan_serialization_match_cmd_pdev(qdf_list_node_t *nnode, 1114 struct wlan_objmgr_pdev *pdev, 1115 enum wlan_serialization_node node_type); 1116 1117 /** 1118 * wlan_serialization_find_cmd() - Find the cmd matching the given criterias 1119 * @cmd: Serialization command information 1120 * @cmd_type: Command type to be matched 1121 * @pdev: pdev object that needs to be matched 1122 * @vdev: vdev object that needs to be matched 1123 * @node_type: Node type. Pdev node or vdev node 1124 * 1125 * Return: Pointer to the node member in the list 1126 */ 1127 qdf_list_node_t * 1128 wlan_serialization_find_cmd(qdf_list_t *queue, uint32_t match_type, 1129 struct wlan_serialization_command *cmd, 1130 enum wlan_serialization_cmd_type cmd_type, 1131 struct wlan_objmgr_pdev *pdev, 1132 struct wlan_objmgr_vdev *vdev, 1133 enum wlan_serialization_node node_type); 1134 1135 /** 1136 * wlan_serialization_remove_front() - Remove the front node of the list 1137 * @list: List from which the node is to be removed 1138 * @node: Pointer to store the node that is removed 1139 * 1140 * Return: QDF_STATUS Success or Failure 1141 */ 1142 QDF_STATUS wlan_serialization_remove_front( 1143 qdf_list_t *list, 1144 qdf_list_node_t **node); 1145 1146 /** 1147 * wlan_serialization_remove_node() - Remove the given node from the list 1148 * @list: List from which the node is to be removed 1149 * @node: Pointer to the node that is to be removed 1150 * 1151 * Return: QDF_STATUS Success or Failure 1152 */ 1153 QDF_STATUS wlan_serialization_remove_node( 1154 qdf_list_t *list, 1155 qdf_list_node_t *node); 1156 1157 /** 1158 * wlan_serialization_insert_front() - Insert a node into the front of the list 1159 * @list: List to which the node is to be inserted 1160 * @node: Pointer to the node that is to be inserted 1161 * 1162 * Return: QDF_STATUS Success or Failure 1163 */ 1164 QDF_STATUS wlan_serialization_insert_front( 1165 qdf_list_t *list, 1166 qdf_list_node_t *node); 1167 1168 /** 1169 * wlan_serialization_insert_back() - Insert a node into the back of the list 1170 * @list: List to which the node is to be inserted 1171 * @node: Pointer to the node that is to be inserted 1172 * 1173 * Return: QDF_STATUS Success or Failure 1174 */ 1175 QDF_STATUS wlan_serialization_insert_back( 1176 qdf_list_t *list, 1177 qdf_list_node_t *node); 1178 1179 /** 1180 * wlan_serialization_peek_front() - Peek the front node of the list 1181 * @list: List on which the node is to be peeked 1182 * @node: Pointer to the store the node that is being peeked 1183 * 1184 * Return: QDF_STATUS Success or Failure 1185 */ 1186 QDF_STATUS wlan_serialization_peek_front( 1187 qdf_list_t *list, 1188 qdf_list_node_t **node); 1189 1190 /** 1191 * wlan_serialization_peek_next() - Peek the next node of the list 1192 * @list: List on which the node is to be peeked 1193 * @node1: Pointer to the node1 from where the next node has to be peeked 1194 * @node2: Pointer to the store the node that is being peeked 1195 * 1196 * Return: QDF_STATUS Success or Failure 1197 */ 1198 QDF_STATUS wlan_serialization_peek_next( 1199 qdf_list_t *list, 1200 qdf_list_node_t *node1, 1201 qdf_list_node_t **node2); 1202 1203 /** 1204 * wlan_serialization_acquire_lock() - Acquire lock to the given queue 1205 * @pdev_queue: Pointer to the pdev queue 1206 * 1207 * Return: QDF_STATUS success or failure 1208 */ 1209 QDF_STATUS 1210 wlan_serialization_acquire_lock( 1211 struct wlan_serialization_pdev_queue *pdev_queue); 1212 1213 /** 1214 * wlan_serialization_release_lock() - Release lock to the given queue 1215 * @pdev_queue: Pointer to the pdev queue 1216 * 1217 * Return: QDF_STATUS success or failure 1218 */ 1219 QDF_STATUS 1220 wlan_serialization_release_lock( 1221 struct wlan_serialization_pdev_queue *pdev_queue); 1222 1223 /** 1224 * wlan_serialization_create_lock() - Init the lock to the given queue 1225 * @pdev_queue: Pointer to the pdev queue 1226 * 1227 * Return: QDF_STATUS success or failure 1228 */ 1229 QDF_STATUS 1230 wlan_serialization_create_lock( 1231 struct wlan_serialization_pdev_queue *pdev_queue); 1232 1233 /** 1234 * wlan_serialization_destroy_lock() - Deinit the lock to the given queue 1235 * @pdev_queue: Pointer to the pdev queue 1236 * 1237 * Return: QDF_STATUS success or failure 1238 */ 1239 QDF_STATUS 1240 wlan_serialization_destroy_lock( 1241 struct wlan_serialization_pdev_queue *pdev_queue); 1242 #endif 1243 #endif 1244