GNU Linux-libre 4.9.284-gnu1
[releases.git] / drivers / staging / rtl8188eu / include / rtl8188e_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 __RTL8188E_RECV_H__
16 #define __RTL8188E_RECV_H__
17
18 #define TX_RPT1_PKT_LEN 8
19
20 #define RECV_BLK_SZ 512
21 #define RECV_BLK_CNT 16
22 #define RECV_BLK_TH RECV_BLK_CNT
23 #define RECV_BULK_IN_ADDR               0x80
24 #define RECV_INT_IN_ADDR                0x81
25
26 #define NR_PREALLOC_RECV_SKB (8)
27
28 #define NR_RECVBUFF (4)
29
30 #define MAX_RECVBUF_SZ (15360) /*  15k < 16k */
31
32 struct phy_stat {
33         unsigned int phydw0;
34         unsigned int phydw1;
35         unsigned int phydw2;
36         unsigned int phydw3;
37         unsigned int phydw4;
38         unsigned int phydw5;
39         unsigned int phydw6;
40         unsigned int phydw7;
41 };
42
43 /*  Rx smooth factor */
44 #define Rx_Smooth_Factor (20)
45
46 enum rx_packet_type {
47         NORMAL_RX,/* Normal rx packet */
48         TX_REPORT1,/* CCX */
49         TX_REPORT2,/* TX RPT */
50         HIS_REPORT,/*  USB HISR RPT */
51 };
52
53 #define INTERRUPT_MSG_FORMAT_LEN 60
54 void rtl8188eu_recv_hdl(struct adapter *padapter, struct recv_buf *precvbuf);
55 void rtl8188eu_recv_tasklet(void *priv);
56 void rtl8188e_query_rx_phy_status(struct recv_frame *fr, struct phy_stat *phy);
57 void rtl8188e_process_phy_info(struct adapter *padapter,
58                                struct recv_frame *prframe);
59 void update_recvframe_phyinfo_88e(struct recv_frame *fra, struct phy_stat *phy);
60 void update_recvframe_attrib_88e(struct recv_frame *fra,
61                                  struct recv_stat *stat);
62
63 #endif