xref: /wlan-driver/qcacld-3.0/components/disa/core/inc/wlan_disa_priv.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2018 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19  /**
20   * DOC: Declare various struct, macros which are used privately in DISA
21   * component.
22   *
23   * Note: This file shall not contain public API's prototype/declarations.
24   *
25   */
26 
27 #ifndef _WLAN_DISA_PRIV_STRUCT_H_
28 #define _WLAN_DISA_PRIV_STRUCT_H_
29 
30 #include <qdf_lock.h>
31 #include "wlan_disa_public_struct.h"
32 
33 /**
34  * struct disa_psoc_priv_obj -psoc specific user configuration required for disa
35  *
36  * @disa_rx_ops: rx operations for disa
37  * @disa_tx_ops: tx operations for disa
38  * @lock: spin lock for disa psoc priv ctx
39  */
40 struct disa_psoc_priv_obj {
41 	struct wlan_disa_rx_ops disa_rx_ops;
42 	struct wlan_disa_tx_ops disa_tx_ops;
43 	qdf_spinlock_t lock;
44 };
45 
46 /**
47  * struct wlan_disa_ctx - disa context for single command
48  *
49  * @callback: hdd callback for disa encrypt/decrypt resp
50  * @callback_context: context for the callback
51  * @request_active: true if a request is active
52  * @lock: spin lock for disa context
53  */
54 struct wlan_disa_ctx {
55 	encrypt_decrypt_resp_callback callback;
56 	void *callback_context;
57 	bool request_active;
58 	qdf_spinlock_t lock;
59 };
60 
61 #endif /* end  of _WLAN_DISA_PRIV_STRUCT_H_ */
62