1 /* 2 * Copyright (c) 2017-2019 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_legacy_api.h 20 * This file provides prototypes of the routines needed for the 21 * legacy mcl serialization to utilize the services provided by the 22 * serialization component. 23 */ 24 #ifndef __WLAN_SERIALIZATION_LEGACY_API_H 25 #define __WLAN_SERIALIZATION_LEGACY_API_H 26 27 #include "wlan_serialization_api.h" 28 29 /** 30 * wlan_serialization_peek_head_pending_cmd_using_psoc() - Return command from 31 * scan or non-scan pending queue based on flag 32 * @psoc: pointer to psoc 33 * @is_cmd_from_pending_scan_queue: flag to determine whether command needed 34 * from scan or non-scan pending queue 35 * 36 * This API finds the first active pdev, and loops through scan or non-scan 37 * pending queue (based on is_cmd_from_pending_scan_queue flag) and fetches 38 * first pending command from queue 39 * 40 * Return: pointer to serialization command 41 */ 42 struct wlan_serialization_command* 43 wlan_serialization_peek_head_pending_cmd_using_psoc( 44 struct wlan_objmgr_psoc *psoc, 45 uint8_t is_cmd_from_pending_scan_queue); 46 /** 47 * wlan_serialization_peek_head_active_cmd_using_psoc() - Return command from 48 * scan or non-scan active queue based on flag 49 * @psoc: pointer to psoc 50 * @is_cmd_from_active_scan_queue: flag to determine whether command needed 51 * from scan or non-scan active queue 52 * 53 * This API finds the first active pdev, and loops through scan or non-scan 54 * active queue (based on is_cmd_from_active_scan_queue flag) and fetches 55 * first active command from queue 56 * 57 * Return: pointer to serialization command 58 */ 59 struct wlan_serialization_command* 60 wlan_serialization_peek_head_active_cmd_using_psoc( 61 struct wlan_objmgr_psoc *psoc, 62 uint8_t is_cmd_from_active_scan_queue); 63 64 /** 65 * wlan_serialization_get_pending_list_next_node_using_psoc() - Return next 66 * scan or non-scan pending command from queue 67 * @psoc: pointer to psoc 68 * @prev_cmd: previous command given by caller, find next command after this 69 * @is_cmd_for_pending_scan_queue: to find from scan or non-scan pending queue 70 * 71 * This API finds the first active pdev, and loops through scan or non-scan 72 * pending queue (based on is_cmd_from_pending_scan_queue flag) and fetches 73 * next pending command after prev_cmd 74 * 75 * Return: pointer to serialization command 76 */ 77 struct wlan_serialization_command* 78 wlan_serialization_get_pending_list_next_node_using_psoc( 79 struct wlan_objmgr_psoc *psoc, 80 struct wlan_serialization_command *prev_cmd, 81 uint8_t is_cmd_for_pending_scan_queue); 82 /** 83 * wlan_serialization_get_pending_list_count() - Return pending list count 84 * @psoc: pointer to soc 85 * @is_cmd_from_pending_scan_queue: flag to determine whether command needed 86 * from scan or non-scan pending queue 87 * 88 * Get the number of nodes present in pending list 89 * 90 * Return: count number of pending commands in queue 91 */ 92 uint32_t wlan_serialization_get_pending_list_count( 93 struct wlan_objmgr_psoc *psoc, 94 uint8_t is_cmd_from_pending_scan_queue); 95 #endif 96