wifi: create a new patch 'drivers/net/wireless/rockchip_wlan' for porting drivers.
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8723bs / include / rtl8723b_recv.h
1 /******************************************************************************\r
2  *\r
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.\r
4  *\r
5  * This program is free software; you can redistribute it and/or modify it\r
6  * under the terms of version 2 of the GNU General Public License as\r
7  * published by the Free Software Foundation.\r
8  *\r
9  * This program is distributed in the hope that it will be useful, but WITHOUT\r
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\r
12  * more details.\r
13  *\r
14  * You should have received a copy of the GNU General Public License along with\r
15  * this program; if not, write to the Free Software Foundation, Inc.,\r
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA\r
17  *\r
18  *\r
19  ******************************************************************************/\r
20 #ifndef __RTL8723B_RECV_H__\r
21 #define __RTL8723B_RECV_H__\r
22 \r
23 #include <rtl8192c_recv.h>\r
24 \r
25 #ifdef CONFIG_SDIO_HCI\r
26 #ifndef CONFIG_SDIO_RX_COPY\r
27 #undef MAX_RECVBUF_SZ\r
28 #define MAX_RECVBUF_SZ  (RX_DMA_SIZE_8723B - RX_DMA_RESERVED_SIZE_8723B)\r
29 #endif // !CONFIG_SDIO_RX_COPY\r
30 #endif // CONFIG_SDIO_HCI\r
31 \r
32 typedef struct rxreport_8723b\r
33 {\r
34         //DWORD 0\r
35         u32 pktlen:14;\r
36         u32 crc32:1;\r
37         u32 icverr:1;\r
38         u32 drvinfosize:4;\r
39         u32 security:3;\r
40         u32 qos:1;\r
41         u32 shift:2;\r
42         u32 physt:1;\r
43         u32 swdec:1;\r
44         u32 rsvd0028:2;\r
45         u32 eor:1;\r
46         u32 rsvd0031:1;\r
47 \r
48         //DWORD 1\r
49         u32 macid:7;\r
50         u32 rsvd0407:1;\r
51         u32 tid:4;\r
52         u32 macid_vld:1;\r
53         u32 amsdu:1;\r
54         u32 rxid_match:1;\r
55         u32 paggr:1;\r
56         u32 a1fit:4;\r
57         u32 chkerr:1;  //20\r
58         u32 rx_ipv:1;\r
59         u32 rx_is_tcp_udp:1;\r
60         u32 chk_vld:1;   //23\r
61         u32 pam:1;\r
62         u32 pwr:1;\r
63         u32 md:1;\r
64         u32 mf:1;\r
65         u32 type:2;\r
66         u32 mc:1;\r
67         u32 bc:1;\r
68 \r
69         //DWORD 2\r
70         u32 seq:12;\r
71         u32 frag:4;\r
72         u32 rx_is_qos:1;\r
73         u32 rsvd0817:1;\r
74         u32 wlanhd_iv_len:6;\r
75         u32 hwrsvd0824:4;\r
76         u32 c2h_ind:1;\r
77         u32 rsvd0829:2;\r
78         u32 fcs_ok:1;\r
79 \r
80         //DWORD 3\r
81         u32 rx_rate:7;\r
82         u32 rsvd1207:3;\r
83         u32 htc:1;\r
84         u32 esop:1;\r
85         u32 bssid_fit:2;\r
86         u32 rsvd1214:2;\r
87         u32 dma_agg_num:8;\r
88         u32 rsvd1224:5;\r
89         u32 patternmatch:1;\r
90         u32 unicastwake:1;\r
91         u32 magicwake:1;\r
92         \r
93         //DWORD 4\r
94         u32 splcp:1;    //Ofdm sgi or cck_splcp\r
95         u32 ldpc:1;\r
96         u32 stbc:1;\r
97         u32 not_sounding:1;\r
98         u32 bw:2;\r
99         u32 rsvd1606:26;\r
100 \r
101         //DWORD 5\r
102         u32 tsfl;\r
103 } RXREPORT, *PRXREPORT;\r
104 \r
105 typedef struct phystatus_8723b\r
106 {\r
107         u32 rxgain_a:7;\r
108         u32 trsw_a:1;\r
109         u32 rxgain_b:7;\r
110         u32 trsw_b:1;\r
111         u32 chcorr_l:16;\r
112 \r
113         u32 sigqualcck:8;\r
114         u32 cfo_a:8;\r
115         u32 cfo_b:8;\r
116         u32 chcorr_h:8;\r
117 \r
118         u32 noisepwrdb_h:8;\r
119         u32 cfo_tail_a:8;\r
120         u32 cfo_tail_b:8;\r
121         u32 rsvd0824:8;\r
122 \r
123         u32 rsvd1200:8;\r
124         u32 rxevm_a:8;\r
125         u32 rxevm_b:8;\r
126         u32 rxsnr_a:8;\r
127 \r
128         u32 rxsnr_b:8;\r
129         u32 noisepwrdb_l:8;\r
130         u32 rsvd1616:8;\r
131         u32 postsnr_a:8;\r
132 \r
133         u32 postsnr_b:8;\r
134         u32 csi_a:8;\r
135         u32 csi_b:8;\r
136         u32 targetcsi_a:8;\r
137 \r
138         u32 targetcsi_b:8;\r
139         u32 sigevm:8;\r
140         u32 maxexpwr:8;\r
141         u32 exintflag:1;\r
142         u32 sgien:1;\r
143         u32 rxsc:2;\r
144         u32 idlelong:1;\r
145         u32 anttrainen:1;\r
146         u32 antselb:1;\r
147         u32 antsel:1;\r
148 } PHYSTATUS, *PPHYSTATUS;\r
149 \r
150 #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)\r
151 s32 rtl8723bs_init_recv_priv(PADAPTER padapter);\r
152 void rtl8723bs_free_recv_priv(PADAPTER padapter);\r
153 #endif\r
154 \r
155 void rtl8723b_query_rx_phy_status(union recv_frame *prframe, struct phy_stat *pphy_stat);\r
156 void rtl8723b_process_phy_info(PADAPTER padapter, void *prframe);\r
157 #ifdef CONFIG_USB_HCI\r
158 void update_recvframe_attrib(PADAPTER padapter, union recv_frame *precvframe, struct recv_stat *prxstat);\r
159 void update_recvframe_phyinfo(union recv_frame *precvframe, struct phy_stat *pphy_info);\r
160 int     rtl8723bu_init_recv_priv(_adapter *padapter);\r
161 void rtl8723bu_free_recv_priv (_adapter *padapter);\r
162 void rtl8723bu_init_recvbuf(_adapter *padapter, struct recv_buf *precvbuf);\r
163 #endif\r
164 #endif\r
165 \r