906 lines
		
	
	
		
			27 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
		
		
			
		
	
	
			906 lines
		
	
	
		
			27 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 MAC_STATUS_H
							 | 
						||
| 
								 | 
							
								#define MAC_STATUS_H
							 | 
						||
| 
								 | 
							
								#include "os_types.h"
							 | 
						||
| 
								 | 
							
								#include "hw_tonemap.h"
							 | 
						||
| 
								 | 
							
								#include "os_timer_api.h"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#ifdef __cplusplus
							 | 
						||
| 
								 | 
							
								extern "C" {
							 | 
						||
| 
								 | 
							
								#endif
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								typedef enum {
							 | 
						||
| 
								 | 
							
								    MAC_DUMP_TYPE_1 = 1,
							 | 
						||
| 
								 | 
							
								    MAC_DUMP_TYPE_2,
							 | 
						||
| 
								 | 
							
								    MAC_DUMP_TYPE_3,
							 | 
						||
| 
								 | 
							
								    MAC_DUMP_TYPE_4,
							 | 
						||
| 
								 | 
							
								    MAC_DUMP_TYPE_5,
							 | 
						||
| 
								 | 
							
								    MAC_DUMP_TYPE_6,
							 | 
						||
| 
								 | 
							
								    MAC_DUMP_TYPE_7,
							 | 
						||
| 
								 | 
							
								    MAC_DUMP_TYPE_8,
							 | 
						||
| 
								 | 
							
								    MAC_DUMP_TYPE_9,
							 | 
						||
| 
								 | 
							
								    MAC_DUMP_TYPE_10,
							 | 
						||
| 
								 | 
							
								} MAC_DUMP_TYPE;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								typedef struct _mac_rx_status{
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_msdu_cnt;  //msdu
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_mpdu_cnt;  //mpdu
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_bcn_ok_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_bcn_upload_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_pb_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_fc_err_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_fc_err_no_match_cnt; //hw/sw check fc crc no match
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_bcn_pb_err_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_sof_pb_err_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_pld_err_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_abort_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_overflow_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_unicast_cnt;    //unicast
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_broadcast_cnt;  //broadcast
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_mpdu_tpye_err_cnt;  //broadcast
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_msdu_crc_err_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_msdu_null_first_pb_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_half_pkt_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_att_not_done_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_msdu_len_is_0_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_proto_nomatch_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_bcn_err_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_rx_fc_invalid_cnt;
							 | 
						||
| 
								 | 
							
								}mac_rx_status_t;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								typedef struct _mac_tx_status{
							 | 
						||
| 
								 | 
							
								    uint32_t mac_mpdu_tx_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_tx_no_ack_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_mpdu_tx_unicast_cnt;     //unicast
							 | 
						||
| 
								 | 
							
								    uint32_t mac_mpdu_tx_broadcast_cnt;  //broadcast
							 | 
						||
| 
								 | 
							
								    uint32_t mac_tx_no_msdu_cnt;    //no msdu to send
							 | 
						||
| 
								 | 
							
								    uint32_t mac_tx_underflow_cnt; //force phy underflow cnt
							 | 
						||
| 
								 | 
							
								    uint32_t mac_tx_no_ack_cnt_pco;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_mpdu_tx_unicast_cnt_pco;     //unicast
							 | 
						||
| 
								 | 
							
								    uint32_t mac_tx_unicast_pb_all_err_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_tx_unicast_pb_all_err_cnt_pco;
							 | 
						||
| 
								 | 
							
								    uint32_t mac_tx_bcsma_flush_q_cnt;
							 | 
						||
| 
								 | 
							
								    /* just calc sof tx completed by phy count and exclude retry count */
							 | 
						||
| 
								 | 
							
								    uint32_t mac_msdu_tx_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t tx_msdu_comp_trigger_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t send_msdu_trigger_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t swq_to_hwq_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t csma_ignore_cca_cnt;
							 | 
						||
| 
								 | 
							
								}mac_tx_status_t;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								enum TMI_ID_TYPE {
							 | 
						||
| 
								 | 
							
								    P_TMI_0 ,       // 0
							 | 
						||
| 
								 | 
							
								    P_TMI_1 ,       // 1
							 | 
						||
| 
								 | 
							
								    P_TMI_2 ,       // 2
							 | 
						||
| 
								 | 
							
								    P_TMI_3 ,       // 3
							 | 
						||
| 
								 | 
							
								    P_TMI_4 ,       // 4
							 | 
						||
| 
								 | 
							
								    P_TMI_6 ,       // 5
							 | 
						||
| 
								 | 
							
								    P_TMI_7 ,       // 6
							 | 
						||
| 
								 | 
							
								    P_TMI_9 ,       // 7
							 | 
						||
| 
								 | 
							
								    P_TMI_11 ,      // 8
							 | 
						||
| 
								 | 
							
								    P_TMI_12 ,      // 9
							 | 
						||
| 
								 | 
							
								    P_TMI_13 ,      // 10
							 | 
						||
| 
								 | 
							
								    P_TMI_14 ,      // 11
							 | 
						||
| 
								 | 
							
								    P_EXTMI_6 ,     // 12
							 | 
						||
| 
								 | 
							
								    P_EXTMI_11 ,    // 13
							 | 
						||
| 
								 | 
							
								    P_EXTMI_12 ,    // 14
							 | 
						||
| 
								 | 
							
								    P_EXTMI_13 ,    // 15
							 | 
						||
| 
								 | 
							
								    P_TMI_MAX       // 16
							 | 
						||
| 
								 | 
							
								};
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#define MAX_SOF_ERR_CNT_DEPTH   3
							 | 
						||
| 
								 | 
							
								typedef struct _mac_sof_err_status{
							 | 
						||
| 
								 | 
							
								    /*rid pbnum*/
							 | 
						||
| 
								 | 
							
								    uint32_t sof_err_cnt[P_TMI_MAX][MAX_PB_NUM_4];
							 | 
						||
| 
								 | 
							
								    uint32_t record_depth;
							 | 
						||
| 
								 | 
							
								    uint32_t illega_pkt_cnt;
							 | 
						||
| 
								 | 
							
								}mac_sof_err_status;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								typedef struct _mac_status_zc_cnt {
							 | 
						||
| 
								 | 
							
								    /* phase event counter */
							 | 
						||
| 
								 | 
							
								    uint32_t phase_a_change_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t phase_b_change_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t phase_c_change_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t event_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t reset_hw_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t zc_req_cnt;
							 | 
						||
| 
								 | 
							
								} mac_status_zc_cnt_t;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/* save mac zc core parameter */
							 | 
						||
| 
								 | 
							
								typedef union _mac_status_zc_para {
							 | 
						||
| 
								 | 
							
								    struct {
							 | 
						||
| 
								 | 
							
								        /* phase A status */
							 | 
						||
| 
								 | 
							
								        uint32_t    phase_a_status      : 1,
							 | 
						||
| 
								 | 
							
								        /* phase B status */
							 | 
						||
| 
								 | 
							
								                    phase_b_status      : 1,
							 | 
						||
| 
								 | 
							
								        /* phase C status */
							 | 
						||
| 
								 | 
							
								                    phase_c_status      : 1,
							 | 
						||
| 
								 | 
							
								        /* zc hw is half collect */
							 | 
						||
| 
								 | 
							
								                    hw_is_half_clct     : 1,
							 | 
						||
| 
								 | 
							
								        /* zc hw cap edge */
							 | 
						||
| 
								 | 
							
								                    hw_cap_edge         : 1,
							 | 
						||
| 
								 | 
							
								        /* for kl1/2: is switch gpio collect
							 | 
						||
| 
								 | 
							
								         * for kl3: is double edge collect
							 | 
						||
| 
								 | 
							
								         */
							 | 
						||
| 
								 | 
							
								                    is_switch_gpio_clct : 1,
							 | 
						||
| 
								 | 
							
								        /* reserved for future */
							 | 
						||
| 
								 | 
							
								                    rsvd0               : 10,
							 | 
						||
| 
								 | 
							
								        /* support phase/collect bitmap */
							 | 
						||
| 
								 | 
							
								                    support_btm         : 6,
							 | 
						||
| 
								 | 
							
								        /* reserved for future */
							 | 
						||
| 
								 | 
							
								                    rsvd1               : 10;
							 | 
						||
| 
								 | 
							
								    };
							 | 
						||
| 
								 | 
							
								    uint32_t data;
							 | 
						||
| 
								 | 
							
								} mac_status_zc_para_t;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								typedef struct _mac_isr_status {
							 | 
						||
| 
								 | 
							
								    uint32_t  isr_cnt;
							 | 
						||
| 
								 | 
							
								    uint32_t  dsr_isr_sync_cnt;
							 | 
						||
| 
								 | 
							
								} mac_isr_status_t;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								typedef struct _mac_status_zc_record {
							 | 
						||
| 
								 | 
							
								    mac_status_zc_cnt_t cnt;
							 | 
						||
| 
								 | 
							
								    mac_status_zc_para_t para;
							 | 
						||
| 
								 | 
							
								} mac_status_zc_record_t;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								typedef struct _mac_stream_status {
							 | 
						||
| 
								 | 
							
								    /* timeout stream delete counter */
							 | 
						||
| 
								 | 
							
								    uint32_t timeout_cnt;
							 | 
						||
| 
								 | 
							
								} mac_stream_status_t;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								typedef enum _mac_peer_type {
							 | 
						||
| 
								 | 
							
								    PEER_SELF = 0,      /* peer type of self */
							 | 
						||
| 
								 | 
							
								    PEER_BCAST,         /* peer type of broadcast */
							 | 
						||
| 
								 | 
							
								    PEER_PROXY,         /* peer type of proxy */
							 | 
						||
| 
								 | 
							
								    PEER_SUB,           /* peer type of sub node */
							 | 
						||
| 
								 | 
							
								    PEER_TMP,           /* peer type of temporary */
							 | 
						||
| 
								 | 
							
								    PEER_FAIL           /* peer type of fail delete */
							 | 
						||
| 
								 | 
							
								} mac_peer_type_t;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								typedef struct _mac_peer_del_cnt {
							 | 
						||
| 
								 | 
							
								    /* overflow sub peer delete counter */
							 | 
						||
| 
								 | 
							
								    uint32_t sub_peer_del_cnt       : 12,
							 | 
						||
| 
								 | 
							
								    /* overflow temporary peer delete counter */
							 | 
						||
| 
								 | 
							
								             temp_peer_del_cnt      : 12,
							 | 
						||
| 
								 | 
							
								    /* overflow peer delete fail counter */
							 | 
						||
| 
								 | 
							
								             peer_del_fail_cnt      : 8;
							 | 
						||
| 
								 | 
							
								} mac_peer_del_cnt_t;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								typedef union _mac_peer_status {
							 | 
						||
| 
								 | 
							
								    /* count of all type peer */
							 | 
						||
| 
								 | 
							
								    uint32_t cnt;
							 | 
						||
| 
								 | 
							
								    /* detailed peer delete count */
							 | 
						||
| 
								 | 
							
								    mac_peer_del_cnt_t del_cnt;
							 | 
						||
| 
								 | 
							
								} mac_peer_status_t;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								typedef struct _mac_sync_ntb_record {
							 | 
						||
| 
								 | 
							
								    /* sync ntb overflow war1 */
							 | 
						||
| 
								 | 
							
								    uint32_t sync_ntb_ovf_way1_cnt  : 16,
							 | 
						||
| 
								 | 
							
								    /* sync ntb overflow war1 success */
							 | 
						||
| 
								 | 
							
								             way1_success_cnt       : 16;
							 | 
						||
| 
								 | 
							
								    /* sync ntb overflow war2 */
							 | 
						||
| 
								 | 
							
								    uint32_t sync_ntb_ovf_way2_cnt  : 16,
							 | 
						||
| 
								 | 
							
								    /* sync ntb overflow war2 success */
							 | 
						||
| 
								 | 
							
								             way2_success_cnt       : 16;
							 | 
						||
| 
								 | 
							
								    /* sync ntb overflow war3 */
							 | 
						||
| 
								 | 
							
								    uint32_t sync_ntb_ovf_way3_cnt  : 16,
							 | 
						||
| 
								 | 
							
								    /* sync ntb overflow war3 success */
							 | 
						||
| 
								 | 
							
								             way3_success_cnt       : 16;
							 | 
						||
| 
								 | 
							
								    /* sync ntb overflow war4 */
							 | 
						||
| 
								 | 
							
								    uint32_t sync_ntb_ovf_way4_cnt  : 16,
							 | 
						||
| 
								 | 
							
								    /* sync ntb overflow war4 success */
							 | 
						||
| 
								 | 
							
								             way4_success_cnt       : 16;
							 | 
						||
| 
								 | 
							
								    /* sync ntb overflow war5 */
							 | 
						||
| 
								 | 
							
								    uint32_t sync_ntb_ovf_way5_cnt;
							 | 
						||
| 
								 | 
							
								    /* sync ntb overflow war6 */
							 | 
						||
| 
								 | 
							
								    uint32_t sync_ntb_ovf_way6_cnt;
							 | 
						||
| 
								 | 
							
								} mac_sync_ntb_record_t;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/* 32 BYTE */
							 | 
						||
| 
								 | 
							
								typedef struct _mac_status {
							 | 
						||
| 
								 | 
							
								    mac_rx_status_t rx_status;
							 | 
						||
| 
								 | 
							
								    mac_tx_status_t tx_status;
							 | 
						||
| 
								 | 
							
								    mac_sof_err_status sof_err_st;
							 | 
						||
| 
								 | 
							
								    mac_status_zc_record_t zc_record;
							 | 
						||
| 
								 | 
							
								    mac_isr_status_t isr_status;
							 | 
						||
| 
								 | 
							
								    mac_stream_status_t stream_status;
							 | 
						||
| 
								 | 
							
								    mac_peer_status_t peer_status;
							 | 
						||
| 
								 | 
							
								    mac_sync_ntb_record_t sync_ntb_record;
							 | 
						||
| 
								 | 
							
								} mac_status_t;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#define MAX_WAIT_DUMP_CNT 10000000
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_msdu_cnt               mac rx msdu operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_msdu_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_msdu_cnt               mac rx msdu operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  rx msdu count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_msdu_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_msdu_cnt               mac rx mpdu operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_mpdu_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_mpdu_cnt               mac rx mpdu operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  rx mpdu count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_mpdu_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_bcn_ok_cnt             mac rx beacon ok operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  rx mpdu count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_bcn_ok_cnt(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_bcn_ok_cnt             mac rx beacon ok operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  rx mpdu count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_bcn_ok_cnt(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_bcn_upload_cnt         mac rx beacon upload operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  rx mpdu count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_bcn_upload_cnt(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_bcn_upload_cnt         mac rx beacon upload operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  rx mpdu count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_bcn_upload_cnt(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_pb_cnt                 mac rx pb operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_pb_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								 /**
							 | 
						||
| 
								 | 
							
								  *@brief mac_get_rx_pb_cnt                mac rx pb operation.
							 | 
						||
| 
								 | 
							
								  *@return                                 rx pkt count
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_pb_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_fc_err_cnt             mac rx fc err operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_fc_err_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_fc_err_cnt             mac rx fc err operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  rx fc err count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_fc_err_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_fc_err_no_match_cnt    mac rx fc err no match operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_fc_err_no_match_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_fc_err_no_match_cnt    mac rx fc err no match operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  rx fc err count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_fc_err_no_match_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_bcn_pb_err_cnt         mac rx pb err operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_bcn_pb_err_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_bcn_pb_err_cnt         mac rx bcn pb err operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  rx bcn pb err count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_bcn_pb_err_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_sof_pb_err_cnt         mac rx sof pb err operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_sof_pb_err_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_sof_pb_err_cnt         mac rx sof bcn pb err operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  rx sof pb err count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_sof_pb_err_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_pld_err_cnt            mac rx pld err operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_pld_err_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_pld_err_cnt            mac rx pkt operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  rx pld err count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_pld_err_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_abort_cnt              mac rx abort operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_abort_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_abort_cnt              mac rx abort operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  rx abort count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_abort_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_overflow_cnt           mac rx overflow operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_overflow_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_overflow_cnt           mac rx overflow operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  rx overflow count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_overflow_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_unicast_cnt            mac rx unicast operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_unicast_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_unicast_cnt            mac rx unicast operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  rx unicast count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_unicast_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_broadcast_cnt          mac rx broadcast operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_broadcast_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_broadcast_cnt          mac rx broadcast operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  rx broadcast count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_broadcast_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_mpdu_type_err_cnt      mac rx mpdu type operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0:ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_mpdu_type_err_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_mpdu_type_err_cnt      mac rx mpdu type operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  mac_rx_mpdu_tpye_err_cnt
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_mpdu_type_err_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_msdu_crc_err_cnt       mac rx msdu type operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0:ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_msdu_crc_err_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_msdu_crc_err_cnt       mac rx msdu type operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  mac_rx_msdu_crc_err_cnt
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_msdu_crc_err_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_msdu_null_first_pb_cnt mac rx msdu type operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0:ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_msdu_null_first_pb_cnt(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_msdu_null_first_pb_cnt mac rx msdu type operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  mac_rx_msdu_flush_err_cnt
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_msdu_null_first_pb_cnt(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_half_pkt_cnt           mac rx half pkt operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0:ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_half_pkt_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_half_pkt_cnt           mac rx half pkt operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  mac_rx_half_pkt_cnt
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_half_pkt_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_att_not_done_cnt       mac rx mpdu not done operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0:ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_att_not_done_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_att_not_done_cnt       mac rx mpdu not done operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  mac_rx_att_not_done_cnt
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_att_not_done_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_msdu_len_is_0_cnt      mac rx mpdu len is 0 operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0:ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_msdu_len_is_0_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_msdu_len_is_0_cnt      mac rx mpdu len is 0 operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  mac_rx_msdu_len_is_0_cnt
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_msdu_len_is_0_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_proto_nomatch_cnt      add mac rx proto nomatch cnt.
							 | 
						||
| 
								 | 
							
								 *@return                                  mac_rx_msdu_len_is_0_cnt
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_proto_nomatch_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_proto_nomatch_cnt      get mac rx proto nomatch cnt.
							 | 
						||
| 
								 | 
							
								 *@return                                  mac rx proto nomatch cnt
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_proto_nomatch_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_bcn_err_cnt            add mac rx error beacon cnt.
							 | 
						||
| 
								 | 
							
								 *@return                                  0
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_bcn_err_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_proto_nomatch_cnt      get mac rx error beacon cnt.
							 | 
						||
| 
								 | 
							
								 *@return                                  mac rx error beacon cnt
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_bcn_err_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_rx_fc_invalid_cnt         add mac rx fc invalid cnt.
							 | 
						||
| 
								 | 
							
								 *@return                                  0
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_rx_fc_invalid_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_rx_fc_invalid_cnt         get mac rx fc invalid cnt.
							 | 
						||
| 
								 | 
							
								 *@return                                  mac rx fc invalid cnt
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_rx_fc_invalid_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_mpdu_tx_cnt               mac tx mpdu pkt operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_mpdu_tx_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_mpdu_tx_cnt               mac tx pkt operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  tx pkt count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_mpdu_tx_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_tx_no_ack_cnt             mac tx not receive ack .
							 | 
						||
| 
								 | 
							
								 *@param is_pco                            1: for pco's statistic;
							 | 
						||
| 
								 | 
							
								 *@param                                   0: for total's statistic
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_tx_no_ack_cnt(uint32_t is_pco);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_tx_no_ack_cnt             mac tx not receive ack.
							 | 
						||
| 
								 | 
							
								 *@param is_pco                            1: for pco's statistic;
							 | 
						||
| 
								 | 
							
								 *@param                                   0: for total's statistic
							 | 
						||
| 
								 | 
							
								 *@return                                  tx ok count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_tx_no_ack_cnt(uint32_t is_pco);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_tx_unicast_all_pb_err_cnt
							 | 
						||
| 
								 | 
							
								 *                                         mac tx receive ack, but result = 1 .
							 | 
						||
| 
								 | 
							
								 *@param is_pco                            1: for pco's statistic;
							 | 
						||
| 
								 | 
							
								 *@param                                   0: for total's statistic
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_tx_unicast_all_pb_err_cnt(uint32_t is_pco);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_tx_unicast_all_pb_err_cnt mac tx receive ack, but result = 1.
							 | 
						||
| 
								 | 
							
								 *@param is_pco                            1: for pco's statistic;
							 | 
						||
| 
								 | 
							
								 *@param                                   0: for total's statistic
							 | 
						||
| 
								 | 
							
								 *@return                                  tx ok count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_tx_unicast_all_pb_err_cnt(uint32_t is_pco);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_mpdu_tx_unicast_cnt       mac tx unicast operation.
							 | 
						||
| 
								 | 
							
								 *@param is_pco                            1: for pco's statistic;
							 | 
						||
| 
								 | 
							
								 *@param                                   0: for total's statistic
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_mpdu_tx_unicast_cnt(uint32_t is_pco);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_mpdu_tx_unicast_cnt       mac tx unicast operation.
							 | 
						||
| 
								 | 
							
								 *@param is_pco                            1: for pco's statistic;
							 | 
						||
| 
								 | 
							
								 *@param                                   0: for total's statistic
							 | 
						||
| 
								 | 
							
								 *@return                                  tx unicast count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_mpdu_tx_unicast_cnt(uint32_t is_pco);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_mpdu_tx_broadcast_cnt     mac tx broadcast operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_mpdu_tx_broadcast_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_mpdu_tx_broadcast_cnt     mac tx broadcast operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  tx broadcast count
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_mpdu_tx_broadcast_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_no_msdu_to_send_cnt       mac no msdu to send operation.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_no_msdu_to_send_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_no_msdu_to_send_cnt       get no msdu to send cnt.
							 | 
						||
| 
								 | 
							
								 *@return                                  no msdu to send cnt
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_no_msdu_to_send_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_set_tx_underflow_cnt          set tx underflow cnt.
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_set_tx_underflow_cnt(uint32_t cnt);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_tx_underflow_cnt          get tx underflow cnt.
							 | 
						||
| 
								 | 
							
								 *@return                                  tx underflow force cnt
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_tx_underflow_cnt(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_sof_err_cnt               mac add sof err cnt.
							 | 
						||
| 
								 | 
							
								 *@param uint32_t proto                    [p_tmi]
							 | 
						||
| 
								 | 
							
								 *@param uint32_t rid                      [rid id]
							 | 
						||
| 
								 | 
							
								 *@param uint8_t pb_num                    [pb num 1 - 4]
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_sof_err_cnt(uint32_t proto, uint32_t rid, uint8_t pb_num);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_sof_err_cnt               mac add sof err cnt.
							 | 
						||
| 
								 | 
							
								 *@param uint32_t proto                    [p_tmi]
							 | 
						||
| 
								 | 
							
								 *@param uint32_t rid                      [rid id]
							 | 
						||
| 
								 | 
							
								 *@param uint8_t pb_num                    [pb num 1 - 4]
							 | 
						||
| 
								 | 
							
								 *@return                                  0: ok
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_sof_err_cnt(uint32_t proto, uint32_t rid, uint8_t pb_num);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_status_add_zc_reset_cnt       add zc reset hw counter.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@return                                  none
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								void mac_status_add_zc_reset_hw_cnt(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_status_add_zc_reset_cnt       get zc reset hw counter.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@return                                  counter value.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_status_get_zc_reset_hw_cnt(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_status_add_zc_event_cnt       add zc event count
							 | 
						||
| 
								 | 
							
								 *@return                                  none
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								void mac_status_add_zc_event_cnt(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_status_get_zc_event_cnt       get zc event counter.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@return                                  counter value.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_status_get_zc_event_cnt(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_status_add_zc_req_cnt       get zc request counter.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@return                                  counter value.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								void mac_status_add_zc_req_cnt(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_status_get_zc_req_cnt       get zc request counter.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@return                                  counter value.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_status_get_zc_req_cnt(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_status_add_zc_phase_chg_cnt    updata phase change count
							 | 
						||
| 
								 | 
							
								 *@param phase_id                           changed phase id
							 | 
						||
| 
								 | 
							
								 *@return                                   none
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								void mac_status_add_zc_phase_chg_cnt(uint8_t phase_id);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_status_get_zc_phase_chg_cnt    get phase change count
							 | 
						||
| 
								 | 
							
								 *@param phase_id                           which phase to get
							 | 
						||
| 
								 | 
							
								 *@return                                   phase change count
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_status_get_zc_phase_chg_cnt(uint8_t phase_id);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_status_zc_status_para_update  updata zc phase status to flash
							 | 
						||
| 
								 | 
							
								 *@param phase_status                      phase status.
							 | 
						||
| 
								 | 
							
								 *@param phase_id                          which phase status to be update
							 | 
						||
| 
								 | 
							
								 *@return                                  none
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								void mac_status_zc_status_para_update(uint8_t phase_status,
							 | 
						||
| 
								 | 
							
								    uint8_t phase_id);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * @brief mac_status_zc_nv_para_update     update nv info to flash
							 | 
						||
| 
								 | 
							
								 * @param is_half_clct                     zc hw is half collect
							 | 
						||
| 
								 | 
							
								 * @param cap_edge                         zc hw cap edge
							 | 
						||
| 
								 | 
							
								 * @param support_btm                      support phase bitmap
							 | 
						||
| 
								 | 
							
								 * @param is_switch_gpio_clct              is switch gpio collect
							 | 
						||
| 
								 | 
							
								 * @return                                 none
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								void mac_status_zc_nv_para_update(uint8_t is_half_clct,
							 | 
						||
| 
								 | 
							
								    uint8_t cap_edge, uint8_t support_btm, uint8_t is_switch_gpio_clct);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_status_get_zc_phase_para      get zc parameter (include phase
							 | 
						||
| 
								 | 
							
								 *                                         status and nv info)
							 | 
						||
| 
								 | 
							
								 *@return                                  none
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_status_get_zc_phase_para(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_status_get_zc_phase_valid     get mac zc phase valid bitmap
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@return                                  0: phase invalid, 1: phase valid
							 | 
						||
| 
								 | 
							
								 *                                         bit0 = phase a,
							 | 
						||
| 
								 | 
							
								 *                                         bit1 = phase b,
							 | 
						||
| 
								 | 
							
								 *                                         bit2 = phase c.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_status_get_zc_phase_valid(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_status_printf             mac status write to flash.
							 | 
						||
| 
								 | 
							
								 *@return                                  null
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								void mac_get_status_printf();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_dump_buf                      mac dump data.
							 | 
						||
| 
								 | 
							
								 *@param   MAC_DUMP_TYPE type:             dump type.
							 | 
						||
| 
								 | 
							
								 *@param   uint32_t *desc:                 mpdu descriptione.
							 | 
						||
| 
								 | 
							
								 *@param   uint32_t desc_len               desc len.
							 | 
						||
| 
								 | 
							
								 *@param   uint32_t *buf_addr0             dump data addr0.
							 | 
						||
| 
								 | 
							
								 *@param   uint32_t value_len0             buf len0
							 | 
						||
| 
								 | 
							
								 *@param   uint32_t *buf_addr1             dump data addr1.
							 | 
						||
| 
								 | 
							
								 *@param   uint32_t value_len1             buf len1
							 | 
						||
| 
								 | 
							
								 *@param   uint8_t is_assert               1: assert   0: non assert
							 | 
						||
| 
								 | 
							
								 *@return                                  null
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								void mac_dump_buf(MAC_DUMP_TYPE type, uint32_t *desc, uint32_t desc_len,
							 | 
						||
| 
								 | 
							
								                  uint32_t *buf_addr0, uint32_t value_len0, uint32_t *buf_addr1,
							 | 
						||
| 
								 | 
							
								                  uint32_t value_len1, uint8_t is_assert);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_phy_print_debug_info          print mac and phy register.
							 | 
						||
| 
								 | 
							
								 *@return                                  null
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								void mac_phy_print_debug_info();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_rid_get_p_tmi                 mac rid get p_tmi.
							 | 
						||
| 
								 | 
							
								 *@param   uint32_t proto                  proto.
							 | 
						||
| 
								 | 
							
								 *@param   uint32_t rid                    rid index.
							 | 
						||
| 
								 | 
							
								 *@param   uint32_t *p_tmi                 p_tmi.
							 | 
						||
| 
								 | 
							
								 *@return                                  0
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_rid_get_p_tmi(uint32_t proto, uint32_t rid, uint32_t *p_tmi);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_sof_err_cnt_clr               clear mac status cnt.
							 | 
						||
| 
								 | 
							
								 *@return                                  0
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								uint32_t mac_status_cnt_clr();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_isr_cnt                   add isr cnt
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@return                                  none
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_isr_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_status_get_zc_req_cnt       get isr counter.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@return                                counter value.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_isr_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_dsr_isr_sync_cnt        add counter of mac dsr isr calls.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@return                                counter value.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_dsr_isr_sync_cnt(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_dsr_isr_sync_cnt        get counter of mac dsr isr calls.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@return                                counter value.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_dsr_isr_sync_cnt(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_flush_tx_bcsma_cnt      get counter of flush tx bcsma cnt.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@return                                counter value.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_flush_tx_bcsma_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_timeout_stream_del_cnt  add counter of timeout stream delete
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@return                                none.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_timeout_stream_del_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_timeout_stream_del_cnt  get counter of timeout stream delete
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@return                                counter value.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_timeout_stream_del_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_overflow_peer_del_cnt     add count of peer delete
							 | 
						||
| 
								 | 
							
								 *@biref peer_type                         which type of peer to add count
							 | 
						||
| 
								 | 
							
								 *@return                                  none.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_add_overflow_peer_del_cnt(mac_peer_type_t peer_type);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_overflow_peer_del_cnt     get count of peer overflow delete
							 | 
						||
| 
								 | 
							
								 *@
							 | 
						||
| 
								 | 
							
								 *@return                                  counter value.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_overflow_peer_del_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_peer_stream_overflow_cnt_dbglog  print debug log of stream overflow
							 | 
						||
| 
								 | 
							
								 *       times and peer delete count to flash
							 | 
						||
| 
								 | 
							
								 *@param                                      none
							 | 
						||
| 
								 | 
							
								 *@return                                     none
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								void mac_peer_stream_overflow_cnt_dbglog();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_msdu_tx_cnt        add packets of msdu tx count
							 | 
						||
| 
								 | 
							
								 *@param                                   none
							 | 
						||
| 
								 | 
							
								 *@return                                  none
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								void mac_add_msdu_tx_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_msdu_tx_cnt     get packets of msdu tx count
							 | 
						||
| 
								 | 
							
								 *@param                                   none
							 | 
						||
| 
								 | 
							
								 *@return                                  msdu tx count
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_msdu_tx_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_send_msdu_cnt          add send msdu count
							 | 
						||
| 
								 | 
							
								 *@param                                none
							 | 
						||
| 
								 | 
							
								 *@return                               none
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								void mac_add_send_msdu_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_send_msdu_cnt          get send msdu count
							 | 
						||
| 
								 | 
							
								 *@param                                none
							 | 
						||
| 
								 | 
							
								 *@return                               send msdu count
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_send_msdu_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_swq_to_hwq_cnt         add swq to hwq msdu count
							 | 
						||
| 
								 | 
							
								 *@param                                none
							 | 
						||
| 
								 | 
							
								 *@return                               none
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								void mac_add_swq_to_hwq_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_swq_to_hwq_cnt         get swq to hwq msdu count
							 | 
						||
| 
								 | 
							
								 *@param                                none
							 | 
						||
| 
								 | 
							
								 *@return                               swq to hwq msdu count
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_swq_to_hwq_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_tx_msdu_comp_trigger_cnt   add tx msdu complete trigger swq
							 | 
						||
| 
								 | 
							
								 *                                      count
							 | 
						||
| 
								 | 
							
								 *@param                                none
							 | 
						||
| 
								 | 
							
								 *@return                               none
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								void mac_add_tx_msdu_comp_trigger_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_tx_msdu_comp_trigger_cnt   get tx msdu complete trigger swq
							 | 
						||
| 
								 | 
							
								 *                                      count
							 | 
						||
| 
								 | 
							
								 *@param                                none
							 | 
						||
| 
								 | 
							
								 *@return                               tx msdu complete trigger count
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_tx_msdu_comp_trigger_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_add_csma_ignore_cca_cnt    add tx csma ignore cca count
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@param                                none
							 | 
						||
| 
								 | 
							
								 *@return                               none
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								void mac_add_csma_ignore_cca_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief mac_get_csma_ignore_cca_cnt    get tx csma ignore cca count
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@param                                none
							 | 
						||
| 
								 | 
							
								 *@return                               tx csma ignore cca count
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_get_csma_ignore_cca_cnt();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#ifdef __cplusplus
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								#endif
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#endif
							 |