1 #ifndef _RTL8712_RECV_H_
2 #define _RTL8712_RECV_H_
4 #include "osdep_service.h"
7 #define NR_RECVBUFF (8)
8 #define NR_PREALLOC_RECV_SKB (8)
10 #define RXDESC_OFFSET RXDESC_SIZE
11 #define RECV_BLK_SZ 512
12 #define RECV_BLK_CNT 16
13 #define RECV_BLK_TH RECV_BLK_CNT
14 #define MAX_RECVBUF_SZ (30720) /* 30K */
15 #define RECVBUFF_ALIGN_SZ 512
16 #define RSVD_ROOM_SZ (0)
17 /*These definition is used for Rx packet reordering.*/
18 #define SN_LESS(a, b) (((a-b) & 0x800) != 0)
19 #define SN_EQUAL(a, b) (a == b)
20 #define REORDER_WAIT_TIME 30 /* (ms)*/
31 struct phy_cck_rx_status
{
32 /* For CCK rate descriptor. This is a unsigned 8:1 variable.
33 * LSB bit present 0.5. And MSB 7 bts present a signed value.
34 * Range from -64~+63.5. */
50 #define PHY_STAT_GAIN_TRSW_SHT 0
51 #define PHY_STAT_PWDB_ALL_SHT 4
52 #define PHY_STAT_CFOSHO_SHT 5
53 #define PHY_STAT_CCK_AGC_RPT_SHT 5
54 #define PHY_STAT_CFOTAIL_SHT 9
55 #define PHY_STAT_RXEVM_SHT 13
56 #define PHY_STAT_RXSNR_SHT 15
57 #define PHY_STAT_PDSNR_SHT 19
58 #define PHY_STAT_CSI_CURRENT_SHT 21
59 #define PHY_STAT_CSI_TARGET_SHT 23
60 #define PHY_STAT_SIGEVM_SHT 25
61 #define PHY_STAT_MAX_EX_PWR_SHT 26
64 struct recv_stat recv_stat
;
65 unsigned int value
[RXDESC_SIZE
>>2];
70 struct list_head list
;
71 spinlock_t recvbuf_lock
;
73 struct _adapter
*adapter
;
94 len = (unsigned int )(tail - data);
96 struct recv_frame_hdr
{
97 struct list_head list
;
100 struct _adapter
*adapter
;
102 struct rx_pkt_attrib attrib
;
109 struct sta_info
*psta
;
110 /*for A-MPDU Rx reordering buffer control*/
111 struct recv_reorder_ctrl
*preorder_ctrl
;
116 struct list_head list
;
117 struct recv_frame_hdr hdr
;
118 addr_t mem
[RECVFRAME_HDR_ALIGN
>>2];
122 int r8712_init_recvbuf(struct _adapter
*padapter
, struct recv_buf
*precvbuf
);
123 void r8712_rxcmd_event_hdl(struct _adapter
*padapter
, void *prxcmdbuf
);
124 s32
r8712_signal_scale_mapping(s32 cur_sig
);
125 void r8712_reordering_ctrl_timeout_handler(void *pcontext
);