- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

# /space/home/slher/rel/Beken/v6_4_5/macsw/ip/lmac/src/rx/rxl/rxl_hwdesc.h

Go to the documentation of this file.

    00001
    00013 #ifndef _RXL_HWDESC_H_
    00014 #define _RXL_HWDESC_H_
    00015
    00025 /*
    00026  * INCLUDE FILES
    00027  ****************************************************************************************
    00028  */
    00029 // for ASSERT
    00030 #include "dbg_assert.h"
    00031 // for __INLINE
    00032 #include "compiler.h"
    00033 // For co_status_t
    00034 #include "co_status.h"
    00035 // For rx_payload_desc
    00036 #include "hal_desc.h"
    00037 // For rx_upload_cntrl_tag
    00038 #include "rxl_cntrl.h"
    00039
    00040 /*
    00041  * FORWARD DECLARATIONS
    00042  ****************************************************************************************
    00043  */
    00044 struct rxu_cntrl_defrag;
    00045 struct rx_dmadesc;
    00046
    00047 /*
    00048  * TYPE DEFINITIONS
    00049  ****************************************************************************************
    00050  */
    00052 struct rxdesc
    00053 {
    00055     struct rx_upload_cntrl_tag upload_cntrl;
    00056     #if NX_RX_RING
    00058     struct rx_dmadesc dma_hdrdesc;
    00061     uint32_t new_read;
    00063     uint8_t buf_id;
    00064     #else
    00066     struct rx_dmadesc *dma_hdrdesc;
    00068     struct rx_pbd *last_pbd;
    00070     struct rx_pbd *spare_pbd;
    00071     #endif
    00072 };
    00073
    00074 /*
    00075  * MACRO DEFINITIONS
    00076  ****************************************************************************************
    00077  */
    00079 #define RXL_LAST_DMA_PATTERN_LEN    4
    00080
    00081 #if NX_UMAC_PRESENT
    00082 #if NX_AMSDU_DEAGG
    00084 #define NX_AMSDU_DEAGG_LEN  ((NX_MAX_MSDU_PER_RX_AMSDU - 1) * 4)
    00085 #else
    00087 #define NX_AMSDU_DEAGG_LEN  0
    00088 #endif /* NX_AMSDU_DEAGG */
    00089
    00090 #if NX_MON_DATA
    00092 #define RXU_MACHDRDESC_LEN  sizeof_b(struct rxu_machdrdesc)
    00093 #else
    00095 #define RXU_MACHDRDESC_LEN  0
    00096 #endif /* NX_MON_DATA */
    00097 #endif /* NX_UMAC_PRESENT */
    00098
    00099 #if NX_UMAC_PRESENT
    00101 #define RXL_ADD_INFO_LEN    (sizeof_b(struct phy_channel_info) + 4 + RXU_MACHDRDESC_LEN + NX_AMSDU_DEAGG_LEN)
    00102 #else
    00104 #define RXL_ADD_INFO_LEN    sizeof_b(struct phy_channel_info)
    00105 #endif /* NX_UMAC_PRESENT */
    00106
    00108 #define RXL_HEADER_INFO_LEN   (RXL_HWDESC_RXV_LEN + RXL_LAST_DMA_PATTERN_LEN +           \
    00109                                RXL_ADD_INFO_LEN)
    00110
    00112 #if NX_FULLY_HOSTED
    00113 #define RXL_PAYLOAD_OFFSET     RXL_HEADER_INFO_LEN
    00114 #else
    00115 #define RXL_PAYLOAD_OFFSET    (RXL_HEADER_INFO_LEN + 2)
    00116 #endif
    00117
    00118 /*
    00119  * FUNCTION PROTOTYPES
    00120  ****************************************************************************************
    00121  */
    00131 __INLINE struct rx_dmadesc *rxl_dmadesc_get(struct rxdesc *rxdesc)
    00132 {
    00133     #if NX_RX_RING
    00134     return &rxdesc->dma_hdrdesc;
    00135     #else
    00136     return rxdesc->dma_hdrdesc;
    00137     #endif
    00138 }
    00139
    00146 void rxl_hwdesc_init(void);
    00147
    00158 void rxl_mpdu_copy(struct rx_pbd *pbd, uint16_t length, uint16_t offset, uint32_t *dst);
    00159
    00177 void rxl_mpdu_partial_transfer(struct rxdesc *rxdesc, uint16_t upload_len, uint32_t hostbuf,
    00178                                uint16_t payl_offset, cb_rx_dma_func_ptr cb, void *env);
    00179
    00189 void rxl_mpdu_transfer(struct rxdesc *rxdesc);
    00190
    00200 void rxl_mpdu_free(struct rxdesc *rxdesc);
    00201
    00209 void rxl_frame_release(struct rxdesc *rxdesc);
    00210
    00222 struct rxdesc *rxl_rxdesc_get(void);
    00223
    00235 void rxl_rxdesc_ready_for_processing(struct rxdesc *rxdesc);
    00236
    00245 void rxl_mpdu_isr(void);
    00246
    00256 void rxl_immediate_frame_get(void);
    00257
    00269 void rxl_current_desc_get(struct rx_hd **rhd, struct rx_pbd **rbd);
    00270
    00283 void rxl_hwdesc_monitor(bool enable);
    00284
    00286
    00287 #endif // _RXL_HWDESC_H_
    00288