aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723bs/include/rtl8723b_recv.h
blob: 31ae83f2557f9ff1410db4586c05828d325886d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/* SPDX-License-Identifier: GPL-2.0 */
/******************************************************************************
 *
 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
 *
 ******************************************************************************/
#ifndef __RTL8723B_RECV_H__
#define __RTL8723B_RECV_H__

#include <rtl8192c_recv.h>

typedef struct rxreport_8723b
{
	/* DWORD 0 */
	u32 pktlen:14;
	u32 crc32:1;
	u32 icverr:1;
	u32 drvinfosize:4;
	u32 security:3;
	u32 qos:1;
	u32 shift:2;
	u32 physt:1;
	u32 swdec:1;
	u32 rsvd0028:2;
	u32 eor:1;
	u32 rsvd0031:1;

	/* DWORD 1 */
	u32 macid:7;
	u32 rsvd0407:1;
	u32 tid:4;
	u32 macid_vld:1;
	u32 amsdu:1;
	u32 rxid_match:1;
	u32 paggr:1;
	u32 a1fit:4;
	u32 chkerr:1;  /* 20 */
	u32 rx_ipv:1;
	u32 rx_is_tcp_udp:1;
	u32 chk_vld:1;   /* 23 */
	u32 pam:1;
	u32 pwr:1;
	u32 md:1;
	u32 mf:1;
	u32 type:2;
	u32 mc:1;
	u32 bc:1;

	/* DWORD 2 */
	u32 seq:12;
	u32 frag:4;
	u32 rx_is_qos:1;
	u32 rsvd0817:1;
	u32 wlanhd_iv_len:6;
	u32 hwrsvd0824:4;
	u32 c2h_ind:1;
	u32 rsvd0829:2;
	u32 fcs_ok:1;

	/* DWORD 3 */
	u32 rx_rate:7;
	u32 rsvd1207:3;
	u32 htc:1;
	u32 esop:1;
	u32 bssid_fit:2;
	u32 rsvd1214:2;
	u32 dma_agg_num:8;
	u32 rsvd1224:5;
	u32 patternmatch:1;
	u32 unicastwake:1;
	u32 magicwake:1;

	/* DWORD 4 */
	u32 splcp:1;	/* Ofdm sgi or cck_splcp */
	u32 ldpc:1;
	u32 stbc:1;
	u32 not_sounding:1;
	u32 bw:2;
	u32 rsvd1606:26;

	/* DWORD 5 */
	u32 tsfl;
} RXREPORT, *PRXREPORT;

typedef struct phystatus_8723b
{
	u32 rxgain_a:7;
	u32 trsw_a:1;
	u32 rxgain_b:7;
	u32 trsw_b:1;
	u32 chcorr_l:16;

	u32 sigqualcck:8;
	u32 cfo_a:8;
	u32 cfo_b:8;
	u32 chcorr_h:8;

	u32 noisepwrdb_h:8;
	u32 cfo_tail_a:8;
	u32 cfo_tail_b:8;
	u32 rsvd0824:8;

	u32 rsvd1200:8;
	u32 rxevm_a:8;
	u32 rxevm_b:8;
	u32 rxsnr_a:8;

	u32 rxsnr_b:8;
	u32 noisepwrdb_l:8;
	u32 rsvd1616:8;
	u32 postsnr_a:8;

	u32 postsnr_b:8;
	u32 csi_a:8;
	u32 csi_b:8;
	u32 targetcsi_a:8;

	u32 targetcsi_b:8;
	u32 sigevm:8;
	u32 maxexpwr:8;
	u32 exintflag:1;
	u32 sgien:1;
	u32 rxsc:2;
	u32 idlelong:1;
	u32 anttrainen:1;
	u32 antselb:1;
	u32 antsel:1;
} PHYSTATUS, *PPHYSTATUS;

s32 rtl8723bs_init_recv_priv(struct adapter *padapter);
void rtl8723bs_free_recv_priv(struct adapter *padapter);

void rtl8723b_query_rx_phy_status(union recv_frame *prframe, struct phy_stat *pphy_stat);
void rtl8723b_process_phy_info(struct adapter *padapter, void *prframe);

#endif