1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * 4*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for 5*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the 6*5113495bSYour Name * above copyright notice and this permission notice appear in all 7*5113495bSYour Name * copies. 8*5113495bSYour Name * 9*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE. 17*5113495bSYour Name */ 18*5113495bSYour Name /** 19*5113495bSYour Name * DOC: wlan_serialization_legacy_api.h 20*5113495bSYour Name * This file provides prototypes of the routines needed for the 21*5113495bSYour Name * legacy mcl serialization to utilize the services provided by the 22*5113495bSYour Name * serialization component. 23*5113495bSYour Name */ 24*5113495bSYour Name #ifndef __WLAN_SERIALIZATION_LEGACY_API_H 25*5113495bSYour Name #define __WLAN_SERIALIZATION_LEGACY_API_H 26*5113495bSYour Name 27*5113495bSYour Name #include "wlan_serialization_api.h" 28*5113495bSYour Name 29*5113495bSYour Name /** 30*5113495bSYour Name * wlan_serialization_peek_head_pending_cmd_using_psoc() - Return command from 31*5113495bSYour Name * scan or non-scan pending queue based on flag 32*5113495bSYour Name * @psoc: pointer to psoc 33*5113495bSYour Name * @is_cmd_from_pending_scan_queue: flag to determine whether command needed 34*5113495bSYour Name * from scan or non-scan pending queue 35*5113495bSYour Name * 36*5113495bSYour Name * This API finds the first active pdev, and loops through scan or non-scan 37*5113495bSYour Name * pending queue (based on is_cmd_from_pending_scan_queue flag) and fetches 38*5113495bSYour Name * first pending command from queue 39*5113495bSYour Name * 40*5113495bSYour Name * Return: pointer to serialization command 41*5113495bSYour Name */ 42*5113495bSYour Name struct wlan_serialization_command* 43*5113495bSYour Name wlan_serialization_peek_head_pending_cmd_using_psoc( 44*5113495bSYour Name struct wlan_objmgr_psoc *psoc, 45*5113495bSYour Name uint8_t is_cmd_from_pending_scan_queue); 46*5113495bSYour Name /** 47*5113495bSYour Name * wlan_serialization_peek_head_active_cmd_using_psoc() - Return command from 48*5113495bSYour Name * scan or non-scan active queue based on flag 49*5113495bSYour Name * @psoc: pointer to psoc 50*5113495bSYour Name * @is_cmd_from_active_scan_queue: flag to determine whether command needed 51*5113495bSYour Name * from scan or non-scan active queue 52*5113495bSYour Name * 53*5113495bSYour Name * This API finds the first active pdev, and loops through scan or non-scan 54*5113495bSYour Name * active queue (based on is_cmd_from_active_scan_queue flag) and fetches 55*5113495bSYour Name * first active command from queue 56*5113495bSYour Name * 57*5113495bSYour Name * Return: pointer to serialization command 58*5113495bSYour Name */ 59*5113495bSYour Name struct wlan_serialization_command* 60*5113495bSYour Name wlan_serialization_peek_head_active_cmd_using_psoc( 61*5113495bSYour Name struct wlan_objmgr_psoc *psoc, 62*5113495bSYour Name uint8_t is_cmd_from_active_scan_queue); 63*5113495bSYour Name 64*5113495bSYour Name /** 65*5113495bSYour Name * wlan_serialization_get_pending_list_next_node_using_psoc() - Return next 66*5113495bSYour Name * scan or non-scan pending command from queue 67*5113495bSYour Name * @psoc: pointer to psoc 68*5113495bSYour Name * @prev_cmd: previous command given by caller, find next command after this 69*5113495bSYour Name * @is_cmd_for_pending_scan_queue: to find from scan or non-scan pending queue 70*5113495bSYour Name * 71*5113495bSYour Name * This API finds the first active pdev, and loops through scan or non-scan 72*5113495bSYour Name * pending queue (based on is_cmd_from_pending_scan_queue flag) and fetches 73*5113495bSYour Name * next pending command after prev_cmd 74*5113495bSYour Name * 75*5113495bSYour Name * Return: pointer to serialization command 76*5113495bSYour Name */ 77*5113495bSYour Name struct wlan_serialization_command* 78*5113495bSYour Name wlan_serialization_get_pending_list_next_node_using_psoc( 79*5113495bSYour Name struct wlan_objmgr_psoc *psoc, 80*5113495bSYour Name struct wlan_serialization_command *prev_cmd, 81*5113495bSYour Name uint8_t is_cmd_for_pending_scan_queue); 82*5113495bSYour Name /** 83*5113495bSYour Name * wlan_serialization_get_pending_list_count() - Return pending list count 84*5113495bSYour Name * @psoc: pointer to soc 85*5113495bSYour Name * @is_cmd_from_pending_scan_queue: flag to determine whether command needed 86*5113495bSYour Name * from scan or non-scan pending queue 87*5113495bSYour Name * 88*5113495bSYour Name * Get the number of nodes present in pending list 89*5113495bSYour Name * 90*5113495bSYour Name * Return: count number of pending commands in queue 91*5113495bSYour Name */ 92*5113495bSYour Name uint32_t wlan_serialization_get_pending_list_count( 93*5113495bSYour Name struct wlan_objmgr_psoc *psoc, 94*5113495bSYour Name uint8_t is_cmd_from_pending_scan_queue); 95*5113495bSYour Name #endif 96