OSDN Git Service

Add rtl8821ce driver version 5.5.2
[android-x86/external-kernel-drivers.git] / rtl8821ce / hal / phydm / txbf / halcomtxbf.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2017  Realtek Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  *
14  * The full GNU General Public License is included in this distribution in the
15  * file called LICENSE.
16  *
17  * Contact Information:
18  * wlanfae <wlanfae@realtek.com>
19  * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20  * Hsinchu 300, Taiwan.
21  *
22  * Larry Finger <Larry.Finger@lwfinger.net>
23  *
24  *****************************************************************************/
25 #ifndef __HAL_COM_TXBF_H__
26 #define __HAL_COM_TXBF_H__
27
28 #if 0
29 typedef bool
30 (*TXBF_GET)(
31         void*                   adapter,
32         u8                      get_type,
33         void*                   p_out_buf
34         );
35
36 typedef bool
37 (*TXBF_SET)(
38         void*                   adapter,
39         u8                      set_type,
40         void*                   p_in_buf
41         );
42 #endif
43
44 enum txbf_set_type {
45         TXBF_SET_SOUNDING_ENTER,
46         TXBF_SET_SOUNDING_LEAVE,
47         TXBF_SET_SOUNDING_RATE,
48         TXBF_SET_SOUNDING_STATUS,
49         TXBF_SET_SOUNDING_FW_NDPA,
50         TXBF_SET_SOUNDING_CLK,
51         TXBF_SET_TX_PATH_RESET,
52         TXBF_SET_GET_TX_RATE
53 };
54
55 enum txbf_get_type {
56         TXBF_GET_EXPLICIT_BEAMFORMEE,
57         TXBF_GET_EXPLICIT_BEAMFORMER,
58         TXBF_GET_MU_MIMO_STA,
59         TXBF_GET_MU_MIMO_AP
60 };
61
62 /* @2 HAL TXBF related */
63 struct _HAL_TXBF_INFO {
64         u8 txbf_idx;
65         u8 ndpa_idx;
66         u8 BW;
67         u8 rate;
68
69         struct phydm_timer_list txbf_fw_ndpa_timer;
70 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
71         RT_WORK_ITEM txbf_enter_work_item;
72         RT_WORK_ITEM txbf_leave_work_item;
73         RT_WORK_ITEM txbf_fw_ndpa_work_item;
74         RT_WORK_ITEM txbf_clk_work_item;
75         RT_WORK_ITEM txbf_status_work_item;
76         RT_WORK_ITEM txbf_rate_work_item;
77         RT_WORK_ITEM txbf_reset_tx_path_work_item;
78         RT_WORK_ITEM txbf_get_tx_rate_work_item;
79 #endif
80 };
81
82 #if (BEAMFORMING_SUPPORT == 1)
83
84 void hal_com_txbf_beamform_init(
85         void *dm_void);
86
87 void hal_com_txbf_config_gtab(
88         void *dm_void);
89
90 void hal_com_txbf_enter_work_item_callback(
91 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
92         void *adapter
93 #else
94         void *dm_void
95 #endif
96         );
97
98 void hal_com_txbf_leave_work_item_callback(
99 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
100         void *adapter
101 #else
102         void *dm_void
103 #endif
104         );
105
106 void hal_com_txbf_fw_ndpa_work_item_callback(
107 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
108         void *adapter
109 #else
110         void *dm_void
111 #endif
112         );
113
114 void hal_com_txbf_clk_work_item_callback(
115 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
116         void *adapter
117 #else
118         void *dm_void
119 #endif
120         );
121
122 void hal_com_txbf_reset_tx_path_work_item_callback(
123 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
124         void *adapter
125 #else
126         void *dm_void
127 #endif
128         );
129
130 void hal_com_txbf_get_tx_rate_work_item_callback(
131 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
132         void *adapter
133 #else
134         void *dm_void
135 #endif
136         );
137
138 void hal_com_txbf_rate_work_item_callback(
139 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
140         void *adapter
141 #else
142         void *dm_void
143 #endif
144         );
145
146 void hal_com_txbf_fw_ndpa_timer_callback(
147         struct phydm_timer_list *timer);
148
149 void hal_com_txbf_status_work_item_callback(
150 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
151         void *adapter
152 #else
153         void *dm_void
154 #endif
155         );
156
157 boolean
158 hal_com_txbf_set(
159         void *dm_void,
160         u8 set_type,
161         void *p_in_buf);
162
163 boolean
164 hal_com_txbf_get(
165         void *adapter,
166         u8 get_type,
167         void *p_out_buf);
168
169 #else
170 #define hal_com_txbf_beamform_init(dm_void) NULL
171 #define hal_com_txbf_config_gtab(dm_void) NULL
172 #define hal_com_txbf_enter_work_item_callback(_adapter) NULL
173 #define hal_com_txbf_leave_work_item_callback(_adapter) NULL
174 #define hal_com_txbf_fw_ndpa_work_item_callback(_adapter) NULL
175 #define hal_com_txbf_clk_work_item_callback(_adapter) NULL
176 #define hal_com_txbf_rate_work_item_callback(_adapter) NULL
177 #define hal_com_txbf_fw_ndpa_timer_callback(_adapter) NULL
178 #define hal_com_txbf_status_work_item_callback(_adapter) NULL
179 #define hal_com_txbf_get(_adapter, _get_type, _pout_buf)
180
181 #endif
182
183 #endif /*  @#ifndef __HAL_COM_TXBF_H__ */