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

79 lines
2.6 KiB
C
Executable File

/****************************************************************************
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 MAC_RX_HW_H
#define MAC_RX_HW_H
#include "os_types.h"
#include "mac_msdu.h"
#include "rx_msdu_start.h"
#include "rx_mpdu_start.h"
#include "rx_pb_reorder.h"
#include "plc_utils.h"
#include "os_timer_api.h"
#include "mpdu_header.h"
#ifdef __cplusplus
extern "C" {
#endif
/* use follow macro to express return result
* CON_PKT_FREE :indicate the pkt need free
* CON_PKT_NOT_CARE :indicate the pkt do not care and return
* CON_PKT_NOT_FREE :indicate the pkt do not free
*/
#define CON_PKT_FREE 0
#define CON_PKT_NOT_CARE 1
#define CON_PKT_NOT_FREE 2
/* init rx interface, register the call back */
uint32_t mac_rx_hw_init(uint32_t fw_mode);
uint32_t mac_rx_hw_mpdu(void *pdev, uint32_t ring_id, uint32_t quota_ms);
uint32_t mac_rx_hw_mpdu_internal(void *pdev, uint32_t ring_id, uint32_t quota_ms);
void mac_rx_led_control(rx_mpdu_start *mpdu_st);
uint32_t mac_rx_debug_log_ringid_and_detype(rx_mpdu_start *mpdu_st);
uint32_t mac_rx_debug_log_info(iot_pkt_t *pkt);
uint32_t mac_rx_debug_log_check_phy_err(rx_pb_start *pb_st, \
rx_mpdu_end *mpdu_ed);
uint32_t mac_rx_debug_log_rxabort(iot_pkt_t *pkt);
uint32_t mac_rx_debug_log_fc(rx_mpdu_start *mpdu_st);
uint32_t mac_rx_debug_log_sof_uicast_info(rx_fc_msg_t rx_fc_msg,\
rx_mpdu_start *mpdu_st, rx_mpdu_end *mpdu_end, rx_pb_start *pb_st, int8_t raw_snr);
uint32_t mac_rx_debug_log_sof_bcast_info(rx_fc_msg_t rx_fc_msg,
rx_mpdu_start *mpdu_st, rx_mpdu_end *mpdu_end, rx_pb_start *pb_st,
int8_t raw_snr);
uint32_t mac_rx_debug_log_bcn_info(rx_fc_msg_t *rx_fc_msg,\
rx_mpdu_start *mpdu_st, rx_mpdu_end *mpdu_ed, rx_pb_end *pb_ed,\
int8_t raw_snr);
uint32_t mac_rx_debug_log_for_gp(uint32_t rtsf);
#ifdef __cplusplus
}
#endif
#endif // !MAC_RX_HW_H