hif_rx.h 6.2 KB

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