Path: blob/master/ALFA-W1F1/RTL8814AU/hal/phydm/phydm_auto_dbg.h
1307 views
/******************************************************************************1*2* Copyright(c) 2007 - 2017 Realtek Corporation.3*4* This program is free software; you can redistribute it and/or modify it5* under the terms of version 2 of the GNU General Public License as6* published by the Free Software Foundation.7*8* This program is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for11* more details.12*13* The full GNU General Public License is included in this distribution in the14* file called LICENSE.15*16* Contact Information:17* wlanfae <[email protected]>18* Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,19* Hsinchu 300, Taiwan.20*21* Larry Finger <[email protected]>22*23*****************************************************************************/2425#ifndef __PHYDM_AUTO_DBG_H__26#define __PHYDM_AUTO_DBG_H__2728#define AUTO_DBG_VERSION "1.0" /* @2017.05.015 Dino, Add phydm_auto_dbg.h*/2930/* @1 ============================================================31* 1 Definition32* 1 ============================================================33*/3435#define AUTO_CHK_HANG_STEP_MAX 336#define DBGPORT_CHK_NUM 63738#ifdef PHYDM_AUTO_DEGBUG3940/* @1 ============================================================41* 1 enumeration42* 1 ============================================================43*/4445enum auto_dbg_type_e {46AUTO_DBG_STOP = 0,47AUTO_DBG_CHECK_HANG = 1,48AUTO_DBG_CHECK_RA = 2,49AUTO_DBG_CHECK_DIG = 350};5152/* @1 ============================================================53* 1 structure54* 1 ============================================================55*/5657struct n_dbgport_803 {58/*@BYTE 3*/59u8 bb_rst_b : 1;60u8 glb_rst_b : 1;61u8 zero_1bit_1 : 1;62u8 ofdm_rst_b : 1;63u8 cck_txpe : 1;64u8 ofdm_txpe : 1;65u8 phy_tx_on : 1;66u8 tdrdy : 1;67/*@BYTE 2*/68u8 txd : 8;69/*@BYTE 1*/70u8 cck_cca_pp : 1;71u8 ofdm_cca_pp : 1;72u8 rx_rst : 1;73u8 rdrdy : 1;74u8 rxd_7_4 : 4;75/*@BYTE 0*/76u8 rxd_3_0 : 4;77u8 ofdm_tx_en : 1;78u8 cck_tx_en : 1;79u8 zero_1bit_2 : 1;80u8 clk_80m : 1;81};8283struct phydm_auto_dbg_struct {84enum auto_dbg_type_e auto_dbg_type;85u8 dbg_step;86u16 dbg_port_table[DBGPORT_CHK_NUM];87u32 dbg_port_val[DBGPORT_CHK_NUM];88u16 ofdm_t_cnt;89u16 ofdm_r_cnt;90u16 cck_t_cnt;91u16 cck_r_cnt;92u16 ofdm_crc_error_cnt;93u16 cck_crc_error_cnt;94};9596/* @1 ============================================================97* 1 function prototype98* 1 ============================================================99*/100101void phydm_dbg_port_dump(void *dm_void, u32 *used, char *output, u32 *out_len);102103void phydm_auto_dbg_console(104void *dm_void,105char input[][16],106u32 *_used,107char *output,108u32 *_out_len);109110void phydm_auto_dbg_engine(void *dm_void);111112void phydm_auto_dbg_engine_init(void *dm_void);113#endif114#endif115116117