- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

# /space/home/slher/rel/Beken/v6_4_5/macsw/ip/lmac/src/tx/txl/txl_frame.h

Go to the documentation of this file.

    00001
    00013 #ifndef _TXL_FRAME_H_
    00014 #define _TXL_FRAME_H_
    00015
    00025 /*
    00026  * INCLUDE FILES
    00027  ****************************************************************************************
    00028  */
    00029 #include "co_int.h"
    00030 #include "co_list.h"
    00031 #include "tx_swdesc.h"
    00032 #include "txl_buffer.h"
    00033 #if (NX_P2P_GO)
    00034 #include "p2p.h"
    00035 #endif //(NX_P2P_GO)
    00036 #if (NX_UMAC_PRESENT && RW_MESH_EN)
    00037 #include "mesh.h"
    00038 #endif //(NX_UMAC_PRESENT && RW_MESH_EN)
    00039
    00040 #if NX_TX_FRAME
    00041 /*
    00042  * TYPE and STRUCT DEFINITIONS
    00043  ****************************************************************************************
    00044  */
    00046 enum
    00047 {
    00049     TX_DEFAULT_24G,
    00051     TX_DEFAULT_5G,
    00053     TX_DEFAULT_NDPA_BRP,
    00055     TX_DEFAULT_NDP,
    00057     TX_CUSTOM
    00058 };
    00059
    00061 enum
    00062 {
    00064     TX_INT,
    00066     TX_EXT
    00067 };
    00068
    00070 typedef void (*cfm_func_ptr)(void *, uint32_t);
    00071
    00073 struct txl_frame_cfm_tag
    00074 {
    00076     cfm_func_ptr cfm_func;
    00078     void *env;
    00079 };
    00080
    00082 struct txl_frame_desc_tag
    00083 {
    00085     struct txdesc txdesc;
    00087     struct txl_frame_cfm_tag cfm;
    00089     uint8_t type;
    00091     bool postponed;
    00093     bool keep_desc;
    00094 };
    00095
    00096
    00098 struct txl_frame_env_tag
    00099 {
    00101     struct co_list desc_free;
    00102
    00104     struct co_list desc_done;
    00105 };
    00106
    00107 /*
    00108  * GLOBAL VARIABLE DECLARATION
    00109  ****************************************************************************************
    00110  */
    00112 extern struct txl_frame_env_tag txl_frame_env;
    00113
    00115 extern uint32_t txl_frame_pool[NX_TXFRAME_CNT][(sizeof(struct txl_buffer_tag) + NX_TXFRAME_LEN) / 4];
    00116
    00117 #if (NX_BCN_AUTONOMOUS_TX)
    00119 extern uint32_t txl_tim_ie_pool[NX_VIRT_DEV_MAX][CO_ALIGN4_HI(MAC_TIM_BMP_OFT + 1)/4];
    00121 extern uint32_t txl_tim_bitmap_pool[NX_VIRT_DEV_MAX][CO_ALIGN4_HI(MAC_TIM_SIZE)/4];
    00123 extern struct tx_pbd txl_tim_desc[NX_VIRT_DEV_MAX][2];
    00125 extern uint32_t txl_bcn_pool[NX_VIRT_DEV_MAX][(sizeof(struct txl_buffer_tag) + NX_BCNFRAME_LEN) / 4];
    00127 extern struct tx_hw_desc txl_bcn_hwdesc_pool[NX_VIRT_DEV_MAX];
    00129 extern struct tx_pbd txl_bcn_end_desc[NX_VIRT_DEV_MAX];
    00130 #if NX_UMAC_PRESENT
    00132 extern struct txl_buffer_control txl_bcn_buf_ctrl[NX_VIRT_DEV_MAX];
    00133 #endif
    00134
    00135 #if (NX_P2P_GO)
    00137 extern struct tx_pbd txl_p2p_noa_desc[NX_VIRT_DEV_MAX];
    00139 extern uint16_t txl_p2p_noa_ie_pool[NX_VIRT_DEV_MAX][P2P_NOA_IE_BUFFER_LEN];
    00140 #endif //(NX_P2P_GO)
    00141
    00142 #if (NX_UMAC_PRESENT && RW_MESH_EN)
    00144 extern struct tx_pbd txl_mesh_add_ies_desc[RW_MESH_VIF_NB];
    00146 extern struct mesh_add_ies_tag txl_mesh_add_ies[RW_MESH_VIF_NB];
    00147 #endif //(NX_UMAC_PRESENT && RW_MESH_EN)
    00148 #endif //(NX_BCN_AUTONOMOUS_TX)
    00149
    00151 extern struct tx_hw_desc txl_frame_hwdesc_pool[NX_TXFRAME_CNT];
    00152
    00153 #if (NX_UMAC_PRESENT)
    00155 extern struct txl_buffer_control txl_buffer_control_24G;
    00157 extern struct txl_buffer_control txl_buffer_control_5G;
    00158 #if (RW_BFMER_EN)
    00160 extern struct txl_buffer_control txl_buffer_control_ndpa_brp;
    00162 extern struct txl_buffer_control txl_buffer_control_ndp;
    00163 #endif //(RW_BFMER_EN)
    00164 #else
    00166 extern struct tx_policy_tbl txl_frame_pol_24G;
    00168 extern struct tx_policy_tbl txl_frame_pol_5G;
    00169 #if (RW_BFMER_EN)
    00171 extern struct tx_policy_tbl txl_frame_pol_ndpa_brp;
    00173 extern struct tx_policy_tbl txl_frame_pol_ndp;
    00174 #endif //(RW_BFMER_EN)
    00175 #endif //(NX_UMAC_PRESENT)
    00176
    00177 #if NX_UMAC_PRESENT
    00179 extern struct txl_buffer_control txl_frame_buf_ctrl[NX_TXFRAME_CNT];
    00180
    00181 #endif
    00182
    00183 /*
    00184  * FUNCTION DECLARATIONS
    00185  ****************************************************************************************
    00186  */
    00187
    00194 void txl_frame_init(bool reset);
    00195
    00210 void txl_frame_init_desc(struct txl_frame_desc_tag *frame,
    00211                          struct txl_buffer_tag *buffer,
    00212                          struct tx_hw_desc *hwdesc,
    00213                          struct txl_buffer_control *bufctrl);
    00214
    00238 struct txl_frame_desc_tag *txl_frame_get(int type, int len);
    00239
    00261 void txl_frame_prepare(struct txl_frame_desc_tag *frame, int type, int len);
    00262
    00277 bool txl_frame_push(struct txl_frame_desc_tag *desc, uint8_t ac);
    00278
    00289 void txl_frame_cfm(struct txdesc *txdesc);
    00290
    00300 void txl_frame_release(struct txdesc *txdesc, bool postponed);
    00301
    00312 void txl_frame_evt(int dummy);
    00313
    00314
    00330 uint8_t txl_frame_send_null_frame(uint8_t sta_idx, cfm_func_ptr cfm, void *env);
    00331
    00347 uint8_t txl_frame_send_qosnull_frame(uint8_t sta_idx, uint16_t qos, cfm_func_ptr cfm, void *env);
    00348
    00349 #if NX_TDLS && NX_UMAC_PRESENT
    00350
    00364 uint8_t txl_frame_send_tdls_channel_switch_req_frame(struct tdls_chan_switch_req const *param,
    00365                                                      cfm_func_ptr cfm);
    00366
    00382 uint8_t txl_frame_send_tdls_channel_switch_rsp_frame(struct vif_info_tag *vif,
    00383                                                      uint16_t status, cfm_func_ptr cfm);
    00384
    00399 uint8_t txl_frame_send_tdls_peer_traffic_ind_frame(struct tdls_peer_traffic_ind_req const *param,
    00400                                                    cfm_func_ptr cfm);
    00401 #endif  // NX_TDLS && NX_UMAC_PRESENT
    00402
    00403 #if NX_MAC_HE && NX_UMAC_PRESENT && NX_BEACONING
    00404
    00422 uint8_t txl_frame_send_he_trigger(uint8_t sta_idx, uint8_t type, uint16_t ul_length,
    00423                                   uint8_t ru_alloc, uint8_t mcs, uint8_t pref_ac,
    00424                                   cfm_func_ptr cfm, void *env);
    00425
    00426 #endif // NX_MAC_HE && NX_UMAC_PRESENT && NX_BEACONING
    00427
    00428 #endif
    00429
    00431
    00432 #endif // _TXL_FRAME_H_