xref: /wlan-dirver/qca-wifi-host-cmn/os_if/linux/wlan_osif_priv.h (revision 97f44cd39e4ff816eaa1710279d28cf6b9e65ad9)
1 /*
2  * Copyright (c) 2016-2017,2020 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 
20 #ifndef _WLAN_OSIF_PRIV_H_
21 #define _WLAN_OSIF_PRIV_H_
22 
23 #include "qdf_net_if.h"
24 #include "wlan_cm_public_struct.h"
25 #include <qca_vendor.h>
26 
27 struct osif_scan_pdev;
28 struct osif_tdls_vdev;
29 
30 /**
31  * struct pdev_osif_priv - OS private structure
32  * @wiphy:            wiphy handle
33  * @legacy_osif_priv: legacy osif private handle
34  * @scan_priv:        Scan related data used by cfg80211 scan
35  * @nif:              pdev net device
36  */
37 struct pdev_osif_priv {
38 	struct wiphy *wiphy;
39 	void *legacy_osif_priv;
40 	struct osif_scan_pdev *osif_scan;
41 	struct qdf_net_if *nif;
42 };
43 
44 #ifdef FEATURE_CM_ENABLE
45 /**
46  * struct osif_cm_info - osif connection manager info
47  * @last_source: Last command request source
48  * @last_id: Last command from connection manager
49  * @cmd_id_lock: lock to update and read last command source
50  * @ext_priv: legacy data pointer.
51  */
52 struct osif_cm_info {
53 	enum wlan_cm_source last_source;
54 	wlan_cm_id last_id;
55 	struct qdf_spinlock cmd_id_lock;
56 	void *ext_priv;
57 };
58 #endif
59 
60 /**
61  * struct vdev_osif_priv - OS private structure of vdev
62  * @wdev:             wireless device handle
63  * @legacy_osif_priv: legacy osif private handle
64  * @osif_tdls: osif tdls info
65  * @cm_info:  osif connection manager info
66  */
67 struct vdev_osif_priv {
68 	struct wireless_dev *wdev;
69 	void *legacy_osif_priv;
70 	struct osif_tdls_vdev *osif_tdls;
71 #ifdef FEATURE_CM_ENABLE
72 	struct osif_cm_info cm_info;
73 #endif
74 };
75 
76 #endif
77