OSDN Git Service

staging: rtl8723bs: update to the latest driver
[android-x86/kernel.git] / drivers / staging / rtl8723bs / include / rtl8723b_recv.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
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  ******************************************************************************/
15 #ifndef __RTL8723B_RECV_H__
16 #define __RTL8723B_RECV_H__
17
18 #include <rtl8192c_recv.h>
19
20 typedef struct rxreport_8723b
21 {
22         /* DWORD 0 */
23         u32 pktlen:14;
24         u32 crc32:1;
25         u32 icverr:1;
26         u32 drvinfosize:4;
27         u32 security:3;
28         u32 qos:1;
29         u32 shift:2;
30         u32 physt:1;
31         u32 swdec:1;
32         u32 rsvd0028:2;
33         u32 eor:1;
34         u32 rsvd0031:1;
35
36         /* DWORD 1 */
37         u32 macid:7;
38         u32 rsvd0407:1;
39         u32 tid:4;
40         u32 macid_vld:1;
41         u32 amsdu:1;
42         u32 rxid_match:1;
43         u32 paggr:1;
44         u32 a1fit:4;
45         u32 chkerr:1;  /* 20 */
46         u32 rx_ipv:1;
47         u32 rx_is_tcp_udp:1;
48         u32 chk_vld:1;   /* 23 */
49         u32 pam:1;
50         u32 pwr:1;
51         u32 md:1;
52         u32 mf:1;
53         u32 type:2;
54         u32 mc:1;
55         u32 bc:1;
56
57         /* DWORD 2 */
58         u32 seq:12;
59         u32 frag:4;
60         u32 rx_is_qos:1;
61         u32 rsvd0817:1;
62         u32 wlanhd_iv_len:6;
63         u32 hwrsvd0824:4;
64         u32 c2h_ind:1;
65         u32 rsvd0829:2;
66         u32 fcs_ok:1;
67
68         /* DWORD 3 */
69         u32 rx_rate:7;
70         u32 rsvd1207:3;
71         u32 htc:1;
72         u32 esop:1;
73         u32 bssid_fit:2;
74         u32 rsvd1214:2;
75         u32 dma_agg_num:8;
76         u32 rsvd1224:5;
77         u32 patternmatch:1;
78         u32 unicastwake:1;
79         u32 magicwake:1;
80
81         /* DWORD 4 */
82         u32 splcp:1;    /* Ofdm sgi or cck_splcp */
83         u32 ldpc:1;
84         u32 stbc:1;
85         u32 not_sounding:1;
86         u32 bw:2;
87         u32 rsvd1606:26;
88
89         /* DWORD 5 */
90         u32 tsfl;
91 } RXREPORT, *PRXREPORT;
92
93 typedef struct phystatus_8723b
94 {
95         u32 rxgain_a:7;
96         u32 trsw_a:1;
97         u32 rxgain_b:7;
98         u32 trsw_b:1;
99         u32 chcorr_l:16;
100
101         u32 sigqualcck:8;
102         u32 cfo_a:8;
103         u32 cfo_b:8;
104         u32 chcorr_h:8;
105
106         u32 noisepwrdb_h:8;
107         u32 cfo_tail_a:8;
108         u32 cfo_tail_b:8;
109         u32 rsvd0824:8;
110
111         u32 rsvd1200:8;
112         u32 rxevm_a:8;
113         u32 rxevm_b:8;
114         u32 rxsnr_a:8;
115
116         u32 rxsnr_b:8;
117         u32 noisepwrdb_l:8;
118         u32 rsvd1616:8;
119         u32 postsnr_a:8;
120
121         u32 postsnr_b:8;
122         u32 csi_a:8;
123         u32 csi_b:8;
124         u32 targetcsi_a:8;
125
126         u32 targetcsi_b:8;
127         u32 sigevm:8;
128         u32 maxexpwr:8;
129         u32 exintflag:1;
130         u32 sgien:1;
131         u32 rxsc:2;
132         u32 idlelong:1;
133         u32 anttrainen:1;
134         u32 antselb:1;
135         u32 antsel:1;
136 } PHYSTATUS, *PPHYSTATUS;
137
138 s32 rtl8723bs_init_recv_priv(struct adapter *padapter);
139 void rtl8723bs_free_recv_priv(struct adapter *padapter);
140
141 void rtl8723b_query_rx_phy_status(union recv_frame *prframe, struct phy_stat *pphy_stat);
142 void rtl8723b_process_phy_info(struct adapter *padapter, void *prframe);
143
144 #endif