1*5113495bSYour Name /*
2*5113495bSYour Name * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
3*5113495bSYour Name *
4*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for any
5*5113495bSYour Name * purpose with or without fee is hereby granted, provided that the above
6*5113495bSYour Name * copyright notice and this permission notice appear in all copies.
7*5113495bSYour Name *
8*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9*5113495bSYour Name * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10*5113495bSYour Name * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11*5113495bSYour Name * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12*5113495bSYour Name * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13*5113495bSYour Name * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14*5113495bSYour Name * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*5113495bSYour Name */
16*5113495bSYour Name
17*5113495bSYour Name #ifndef _QDF_SSR_DRIVER_DUMP_H_
18*5113495bSYour Name #define _QDF_SSR_DRIVER_DUMP_H_
19*5113495bSYour Name
20*5113495bSYour Name #include <qdf_types.h>
21*5113495bSYour Name
22*5113495bSYour Name #ifdef WLAN_FEATURE_SSR_DRIVER_DUMP
23*5113495bSYour Name #include "i_qdf_ssr_driver_dump.h"
24*5113495bSYour Name
25*5113495bSYour Name typedef __qdf_ssr_driver_dump_entry qdf_ssr_driver_dump_entry;
26*5113495bSYour Name
27*5113495bSYour Name /**
28*5113495bSYour Name * qdf_ssr_driver_dump_init() - Initialize the dump collection API.
29*5113495bSYour Name *
30*5113495bSYour Name * Return:
31*5113495bSYour Name * QDF_STATUS_SUCCESS - Initialization was successful
32*5113495bSYour Name * else - Error initializing mutex
33*5113495bSYour Name */
34*5113495bSYour Name QDF_STATUS qdf_ssr_driver_dump_init(void);
35*5113495bSYour Name
36*5113495bSYour Name /*
37*5113495bSYour Name * qdf_ssr_driver_dump_deinit() - Deinitialize the dump collection API.
38*5113495bSYour Name *
39*5113495bSYour Name * Return:
40*5113495bSYour Name * QDF_STATUS_SUCCESS - Deinitialization was successful
41*5113495bSYour Name * else - Error destroying mutex
42*5113495bSYour Name */
43*5113495bSYour Name QDF_STATUS qdf_ssr_driver_dump_deinit(void);
44*5113495bSYour Name
45*5113495bSYour Name /*
46*5113495bSYour Name * qdf_ssr_driver_dump_register_region() - Add a region to the entry list
47*5113495bSYour Name * @region_name: name of region to be registered
48*5113495bSYour Name * @region_buffer: pointer to region
49*5113495bSYour Name * @region_size: size of region in bytes
50*5113495bSYour Name *
51*5113495bSYour Name * Return:
52*5113495bSYour Name * QDF_STATUS_SUCCESS - Region registration successful
53*5113495bSYour Name * QDF_STATUS_E_NULL_VALUE - Null pointers provided.
54*5113495bSYour Name * QDF_STATUS_E_RESOURCES - Error acquiring/releasing mutex
55*5113495bSYour Name * QDF_STATUS_E_INVAL - Duplicate region registration
56*5113495bSYour Name * QDF_STATUS_E_NOMEM - Not enough space for another region
57*5113495bSYour Name */
58*5113495bSYour Name QDF_STATUS
59*5113495bSYour Name qdf_ssr_driver_dump_register_region(char *region_name, void *region_buffer,
60*5113495bSYour Name size_t region_size);
61*5113495bSYour Name
62*5113495bSYour Name /*
63*5113495bSYour Name * qdf_ssr_driver_dump_unregister_region() - Add a client to the entry list
64*5113495bSYour Name * @region_name: name of region to be unregistered
65*5113495bSYour Name *
66*5113495bSYour Name * Return:
67*5113495bSYour Name * QDF_STATUS_SUCCESS - Region unregistration successful
68*5113495bSYour Name * QDF_STATUS_E_NULL_VALUE - Null pointer provided.
69*5113495bSYour Name * QDF_STATUS_E_RESOURCES - Error acquiring/releasing mutex
70*5113495bSYour Name * QDF_STATUS_E_INVAL - Region not found
71*5113495bSYour Name */
72*5113495bSYour Name QDF_STATUS qdf_ssr_driver_dump_unregister_region(char *region_name);
73*5113495bSYour Name
74*5113495bSYour Name /*
75*5113495bSYour Name * qdf_ssr_driver_dump_retrieve_regions() - Retrieve list of clients
76*5113495bSYour Name * @input_array: pointer to an array of cnss_ssr_driver_dump_entry, which
77*5113495bSYour Name * will be filled with registered clients by this function.
78*5113495bSYour Name * @num_entries_retrieved: pointer to a variable which will be filled with
79*5113495bSYour Name * number of regions added.
80*5113495bSYour Name *
81*5113495bSYour Name * Return:
82*5113495bSYour Name * QDF_STATUS_SUCCESS - Region retrieval successful
83*5113495bSYour Name * QDF_STATUS_E_NULL_VALUE - Null pointers provided
84*5113495bSYour Name * QDF_STATUS_E_INVAL - Error retrieving regions
85*5113495bSYour Name * QDF_STATUS_E_RESOURCES - Error acquiring/releasing mutex
86*5113495bSYour Name */
87*5113495bSYour Name QDF_STATUS
88*5113495bSYour Name qdf_ssr_driver_dump_retrieve_regions(qdf_ssr_driver_dump_entry *input_array,
89*5113495bSYour Name size_t *num_entries_retrieved);
90*5113495bSYour Name #else
91*5113495bSYour Name
92*5113495bSYour Name static inline QDF_STATUS
qdf_ssr_driver_dump_init(void)93*5113495bSYour Name qdf_ssr_driver_dump_init(void)
94*5113495bSYour Name {
95*5113495bSYour Name return QDF_STATUS_SUCCESS;
96*5113495bSYour Name }
97*5113495bSYour Name
98*5113495bSYour Name static inline QDF_STATUS
qdf_ssr_driver_dump_deinit(void)99*5113495bSYour Name qdf_ssr_driver_dump_deinit(void)
100*5113495bSYour Name {
101*5113495bSYour Name return QDF_STATUS_SUCCESS;
102*5113495bSYour Name }
103*5113495bSYour Name
104*5113495bSYour Name static inline QDF_STATUS
qdf_ssr_driver_dump_register_region(char * region_name,void * region_buffer,size_t region_size)105*5113495bSYour Name qdf_ssr_driver_dump_register_region(char *region_name, void *region_buffer,
106*5113495bSYour Name size_t region_size)
107*5113495bSYour Name {
108*5113495bSYour Name return QDF_STATUS_SUCCESS;
109*5113495bSYour Name }
110*5113495bSYour Name
111*5113495bSYour Name static inline QDF_STATUS
qdf_ssr_driver_dump_unregister_region(char * region_name)112*5113495bSYour Name qdf_ssr_driver_dump_unregister_region(char *region_name)
113*5113495bSYour Name {
114*5113495bSYour Name return QDF_STATUS_SUCCESS;
115*5113495bSYour Name }
116*5113495bSYour Name
117*5113495bSYour Name #endif /* #ifdef WLAN_FEATURE_SSR_DRIVER_DUMP */
118*5113495bSYour Name #endif
119