xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8852bs/phl/hal_g6/mac/mac_ax.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /** @file */
2 /******************************************************************************
3  *
4  * Copyright(c) 2019 Realtek Corporation. All rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of version 2 of the GNU General Public License as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  ******************************************************************************/
16 
17 #ifndef _MAC_AX_H_
18 #define _MAC_AX_H_
19 
20 #include "mac_def.h"
21 #include "mac_ax/fwcmd.h"
22 #include "mac_ax/security_cam.h"
23 #include "mac_ax/efuse.h"
24 #include "mac_ax/p2p.h"
25 #include "mac_ax/dbcc.h"
26 #if MAC_AX_SDIO_SUPPORT
27 #include "mac_ax/_sdio.h"
28 #endif
29 #if MAC_AX_FEATURE_HV
30 #include "hv_ax/init_hv.h"
31 #include "hv_ax/fwcmd_hv.h"
32 #endif
33 
34 #if MAC_AX_FEATURE_HV
35 #include "hv_type.h"
36 #endif
37 
38 #define MAC_AX_MAJOR_VER	0	/*Software Architcture Modify*/
39 #define MAC_AX_PROTOTYPE_VER	25	/*New Feature;Regular Release*/
40 #define MAC_AX_SUB_VER		47	/*for bug fix*/
41 #define MAC_AX_SUB_INDEX	0	/*for special used*/
42 
43 #define MAC_AX_SRC_VER(a, b, c, d)                                             \
44 				(((a) << 24) + ((b) << 16) + ((c) << 8) + (d))
45 
46 #ifdef CONFIG_NEW_HALMAC_INTERFACE
47 
48 /**
49  * @brief mac_ax_ops_init_v1
50  *
51  * @param *phl_adapter
52  * @param *drv_adapter
53  * @param chip_id
54  * @param hci
55  * @param **mac_adapter
56  * @param **mac_ops
57  * @return Please Place Description here.
58  * @retval u32
59  */
60 u32 mac_ax_ops_init_v1(void *phl_adapter, void *drv_adapter,
61 		       enum rtw_chip_id chip_id,
62 		       enum rtw_hci_type hci,
63 		       struct mac_ax_adapter **mac_adapter,
64 		       struct mac_ax_ops **mac_ops);
65 
66 /**
67  * @brief mac_ax_ops_init
68  *
69  * @param *drv_adapter
70  * @param *pltfm_cb
71  * @param intf
72  * @param **mac_adapter
73  * @param **mac_ops
74  * @return Please Place Description here.
75  * @retval u32
76  */
77 #else
78 u32 mac_ax_ops_init(void *drv_adapter, struct mac_ax_pltfm_cb *pltfm_cb,
79 		    enum mac_ax_intf intf,
80 		    struct mac_ax_adapter **mac_adapter,
81 		    struct mac_ax_ops **mac_ops);
82 
83 /**
84  * @brief mac_ax_phl_init
85  *
86  * @param *phl_adapter
87  * @param *mac_adapter
88  * @return Please Place Description here.
89  * @retval u32
90  */
91 
92 #endif
93 #if MAC_AX_PHL_H2C
94 u32 mac_ax_phl_init(void *phl_adapter, struct mac_ax_adapter *mac_adapter);
95 
96 /**
97  * @brief mac_ax_ops_exit
98  *
99  * @param *adapter
100  * @return Please Place Description here.
101  * @retval u32
102  */
103 #endif
104 
105 u32 mac_ax_ops_exit(struct mac_ax_adapter *adapter);
106 
107 /**
108  * @brief is_chip_id
109  *
110  * @param *adapter
111  * @param id
112  * @return Please Place Description here.
113  * @retval u32
114  */
115 
116 u32 is_chip_id(struct mac_ax_adapter *adapter, enum mac_ax_chip_id id);
117 
118 /**
119  * @brief is_cv
120  *
121  * @param *adapter
122  * @param rtw_cv cv
123  * @return Please Place Description here.
124  * @retval u32
125  */
126 
127 u32 is_cv(struct mac_ax_adapter *adapter, enum rtw_cv cv);
128 
129 #endif
130