import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / misc / mediatek / connectivity / combo / drv_wlan / mt6630 / wlan / include / nic / hif_rx.h
1 /*
2 ** $Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/nic/hif_rx.h#1 $
3 */
4
5 /*! \file "hif_rx.h"
6 \brief Provide HIF RX Header Information between F/W and Driver
7
8 N/A
9 */
10
11
12 /*
13 ** $Log: hif_rx.h $
14 **
15 ** 03 29 2013 cp.wu
16 ** [BORA00002227] [MT6630 Wi-Fi][Driver] Update for Makefile and HIFSYS modifications
17 ** 1. remove unused HIF definitions
18 ** 2. enable NDIS 5.1 build success
19 **
20 ** 03 12 2013 tsaiyuan.hsu
21 ** [BORA00002222] MT6630 unified MAC RXM
22 ** remove hif_rx_hdr usage.
23 **
24 ** 09 17 2012 cm.chang
25 ** [BORA00002149] [MT6630 Wi-Fi] Initial software development
26 ** Duplicate source from MT6620 v2.3 driver branch
27 ** (Davinci label: MT6620_WIFI_Driver_V2_3_120913_1942_As_MT6630_Base)
28 *
29 * 09 01 2010 kevin.huang
30 * NULL
31 * Use LINK LIST operation to process SCAN result
32 *
33 * 07 16 2010 yarco.yang
34 *
35 * 1. Support BSS Absence/Presence Event
36 * 2. Support STA change PS mode Event
37 * 3. Support BMC forwarding for AP mode.
38 *
39 * 07 08 2010 cp.wu
40 *
41 * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
42 *
43 * 06 14 2010 cp.wu
44 * [WPD00003833][MT6620 and MT5931] Driver migration
45 * follow-ups for HIF_RX_HEADER_T update:
46 * 1) add TCL
47 * 2) add RCPI
48 * 3) add ChannelNumber
49 *
50 * 06 11 2010 cp.wu
51 * [WPD00003833][MT6620 and MT5931] Driver migration
52 * 1) migrate assoc.c.
53 * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness
54 * 3) add configuration options for CNM_MEM and RSN modules
55 * 4) add data path for management frames
56 * 5) eliminate rPacketInfo of MSDU_INFO_T
57 *
58 * 06 09 2010 cp.wu
59 * [WPD00003833][MT6620 and MT5931] Driver migration
60 * add necessary changes to driver data paths.
61 *
62 * 06 06 2010 kevin.huang
63 * [WPD00003832][MT6620 5931] Create driver base
64 * [MT6620 5931] Create driver base
65 ** \main\maintrunk.MT6620WiFiDriver_Prj\10 2009-12-10 16:44:00 GMT mtk02752
66 ** code clean
67 ** \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-12-09 13:59:20 GMT MTK02468
68 ** Added HIF_RX_HDR parsing macros
69 ** \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-11-24 19:54:54 GMT mtk02752
70 ** adopt HIF_RX_HEADER_T in new data path
71 ** \main\maintrunk.MT6620WiFiDriver_Prj\7 2009-10-29 19:51:19 GMT mtk01084
72 ** modify FW/ driver interface
73 ** \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-04-28 10:33:58 GMT mtk01461
74 ** Add define of HW_APPENED_LEN
75 ** \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-04-01 10:51:02 GMT mtk01461
76 ** Rename ENUM_HIF_RX_PKT_TYPE_T
77 ** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-03-19 12:05:03 GMT mtk01426
78 ** Remove __KAL_ATTRIB_PACKED__ and add hifDataTypeCheck()
79 ** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-03-17 20:18:52 GMT mtk01426
80 ** Add comment to HIF_RX_HEADER_T
81 ** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:16:23 GMT mtk01426
82 ** Init for develop
83 **
84 */
85
86 #ifndef _HIF_RX_H
87 #define _HIF_RX_H
88
89 /*******************************************************************************
90 * C O M P I L E R F L A G S
91 ********************************************************************************
92 */
93
94 /*******************************************************************************
95 * E X T E R N A L R E F E R E N C E S
96 ********************************************************************************
97 */
98
99 /*******************************************************************************
100 * C O N S T A N T S
101 ********************************************************************************
102 */
103
104 /*! HIF_RX_HEADER_T */
105 /* DW 0, Byte 1 */
106 #define HIF_RX_HDR_PACKET_TYPE_MASK BITS(0, 1)
107
108 /* DW 1, Byte 0 */
109 #define HIF_RX_HDR_HEADER_LEN BITS(2, 7)
110 #define HIF_RX_HDR_HEADER_LEN_OFFSET 2
111 #define HIF_RX_HDR_HEADER_OFFSET_MASK BITS(0, 1)
112
113 /* DW 1, Byte 1 */
114 #define HIF_RX_HDR_80211_HEADER_FORMAT BIT(0)
115 #define HIF_RX_HDR_DO_REORDER BIT(1)
116 #define HIF_RX_HDR_PAL BIT(2)
117 #define HIF_RX_HDR_TCL BIT(3)
118 #define HIF_RX_HDR_NETWORK_IDX_MASK BITS(4, 7)
119 #define HIF_RX_HDR_NETWORK_IDX_OFFSET 4
120
121 /* DW 1, Byte 2, 3 */
122 #define HIF_RX_HDR_SEQ_NO_MASK BITS(0, 11)
123 #define HIF_RX_HDR_TID_MASK BITS(12, 14)
124 #define HIF_RX_HDR_TID_OFFSET 12
125 #define HIF_RX_HDR_BAR_FRAME BIT(15)
126
127
128
129 #define HIF_RX_HDR_FLAG_AMP_WDS BIT(0)
130 #define HIF_RX_HDR_FLAG_802_11_FORMAT BIT(1)
131 #define HIF_RX_HDR_FLAG_BAR_FRAME BIT(2)
132 #define HIF_RX_HDR_FLAG_DO_REORDERING BIT(3)
133 #define HIF_RX_HDR_FLAG_CTRL_WARPPER_FRAME BIT(4)
134
135 #define HIF_RX_HW_APPENDED_LEN 4
136
137 /* For DW 2, Byte 3 - ucHwChannelNum */
138 #define HW_CHNL_NUM_MAX_2G4 14
139 #define HW_CHNL_NUM_MAX_4G_5G (255 - HW_CHNL_NUM_MAX_2G4)
140
141 /*******************************************************************************
142 * D A T A T Y P E S
143 ********************************************************************************
144 */
145
146 /*******************************************************************************
147 * P U B L I C D A T A
148 ********************************************************************************
149 */
150
151 /*******************************************************************************
152 * P R I V A T E D A T A
153 ********************************************************************************
154 */
155
156 /*******************************************************************************
157 * M A C R O S
158 ********************************************************************************
159 */
160
161 /*******************************************************************************
162 * F U N C T I O N D E C L A R A T I O N S
163 ********************************************************************************
164 */
165 static __KAL_INLINE__ VOID hifDataTypeCheck(VOID);
166
167 /*******************************************************************************
168 * F U N C T I O N S
169 ********************************************************************************
170 */
171
172 /* Kevin: we don't have to call following function to inspect the data structure.
173 * It will check automatically while at compile time.
174 * We'll need this for porting driver to different RTOS.
175 */
176 static __KAL_INLINE__ VOID hifDataTypeCheck(VOID)
177 {
178
179 return;
180 }
181
182 #endif