Files
kunlun/plc/halmac/inc/tx_test_lib.h
2024-09-28 14:24:04 +08:00

83 lines
2.8 KiB
C

/****************************************************************************
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
be copied by any method or incorporated into another program without
the express written consent of Aerospace C.Power. This Information or any portion
thereof remains the property of Aerospace C.Power. The Information contained herein
is believed to be accurate and Aerospace C.Power assumes no responsibility or
liability for its use in any way and conveys no license or title under
any patent or copyright and makes no representation or warranty that this
Information is free from patent or copyright infringement.
****************************************************************************/
#ifndef _TX_TEST_LIB_H_
#define _TX_TEST_LIB_H_
#include "iot_config.h"
#include "mac_sched_hw.h"
#ifdef __cplusplus
extern "C" {
#endif
#if HW_PLATFORM >= HW_PLATFORM_FPGA
#if (IOT_FTM_SUPPORT || CPLC_IOT_CERT_SUPPORT)
#include "mac_hwq_mgr.h"
#define HEAD_SIEZ_64 64
#define DATA_SIZE_100 (100)
#define DATA_SIZE_1024 (1024)
#define DATA_SIZE_2064 (2064) //516*4
#define MIN_DATA_SIZE (DATA_SIZE_100 + HEAD_SIEZ_64)
#define MID_DATA_SIZE (DATA_SIZE_1024 + HEAD_SIEZ_64)
#define MAX_DATA_SIZE (DATA_SIZE_2064 + HEAD_SIEZ_64)
extern uint32_t enq_time;
extern uint8_t close_tx_print;
extern uint8_t mac_ping_enable;
/*
* mpdu_send_test() - ftm tx pkt.
*/
void mpdu_send_test(mac_queue_ctxt_t *tx_ctxt, uint8_t qid,\
uint8_t bcast, uint8_t delimiter_type,uint32_t nid,\
uint32_t dtei, uint32_t stei,uint8_t tmi, uint8_t ext_tmi,\
uint8_t lid, uint8_t pb_num, uint8_t need_ack,\
uint8_t need_encry, uint8_t need_decrypt,\
uint32_t avln_idx_in_desc, uint32_t key_table_idx_in_desc,\
uint32_t key_idx_in_desc,\
uint8_t hw_retry_cnt, uint16_t pkt_len, uint8_t *pkt, uint8_t phase,\
uint32_t band_sel, uint8_t rawdata_mode, uint8_t *fc_rawdata);
/*
* test_send_sof() - ftm special for tput and ping tx pkt.
*/
uint32_t test_send_sof(mac_queue_ctxt_t *tx_ctxt,
uint32_t stei, uint32_t dtei, uint32_t nid,\
uint8_t tmi, uint8_t ext_tmi,\
uint8_t pb_num, uint8_t *pkt,uint8_t need_ack);
/*
* mac_sche_set_cfg() - mac set hw sche cfg.
*/
uint32_t mac_sche_set_cfg(void *vdev, hw_sched_cmd_t *cmdlist,
uint16_t cmd_num, uint32_t bcn_pd, uint32_t start_ntb);
/*
* ftm_fill_mac_data() - fill mac data.
*/
iot_pkt_t *ftm_fill_mac_data(uint8_t delimier_type,
uint16_t buf_len, uint8_t *pkt, uint16_t pkt_len);
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif