2 ** $Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/nic/hif_rx.h#1 $
6 \brief Provide HIF RX Header Information between F/W and Driver
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
20 ** 03 12 2013 tsaiyuan.hsu
21 ** [BORA00002222] MT6630 unified MAC RXM
22 ** remove hif_rx_hdr usage.
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)
29 * 09 01 2010 kevin.huang
31 * Use LINK LIST operation to process SCAN result
33 * 07 16 2010 yarco.yang
35 * 1. Support BSS Absence/Presence Event
36 * 2. Support STA change PS mode Event
37 * 3. Support BMC forwarding for AP mode.
41 * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
44 * [WPD00003833][MT6620 and MT5931] Driver migration
45 * follow-ups for HIF_RX_HEADER_T update:
48 * 3) add ChannelNumber
51 * [WPD00003833][MT6620 and MT5931] Driver migration
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
59 * [WPD00003833][MT6620 and MT5931] Driver migration
60 * add necessary changes to driver data paths.
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
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
89 /*******************************************************************************
90 * C O M P I L E R F L A G S
91 ********************************************************************************
94 /*******************************************************************************
95 * E X T E R N A L R E F E R E N C E S
96 ********************************************************************************
99 /*******************************************************************************
101 ********************************************************************************
104 /*! HIF_RX_HEADER_T */
106 #define HIF_RX_HDR_PACKET_TYPE_MASK BITS(0, 1)
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)
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
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)
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)
135 #define HIF_RX_HW_APPENDED_LEN 4
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)
141 /*******************************************************************************
143 ********************************************************************************
146 /*******************************************************************************
147 * P U B L I C D A T A
148 ********************************************************************************
151 /*******************************************************************************
152 * P R I V A T E D A T A
153 ********************************************************************************
156 /*******************************************************************************
158 ********************************************************************************
161 /*******************************************************************************
162 * F U N C T I O N D E C L A R A T I O N S
163 ********************************************************************************
165 static __KAL_INLINE__ VOID
hifDataTypeCheck(VOID
);
167 /*******************************************************************************
169 ********************************************************************************
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.
176 static __KAL_INLINE__ VOID
hifDataTypeCheck(VOID
)