2013-05-19 04:28:07 +00:00
|
|
|
|
/******************************************************************************
|
|
|
|
|
*
|
|
|
|
|
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
|
* under the terms of version 2 of the GNU General Public License as
|
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
|
* more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along with
|
|
|
|
|
* this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __HALDMOUTSRC_H__
|
|
|
|
|
#define __HALDMOUTSRC_H__
|
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Definition */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
/* Define all team support ability. */
|
|
|
|
|
|
|
|
|
|
/* Define for all teams. Please Define the constant in your precomp header. */
|
2013-08-12 04:36:23 +00:00
|
|
|
|
|
|
|
|
|
/* define DM_ODM_SUPPORT_AP 0 */
|
|
|
|
|
/* define DM_ODM_SUPPORT_ADSL 0 */
|
|
|
|
|
/* define DM_ODM_SUPPORT_CE 0 */
|
|
|
|
|
/* define DM_ODM_SUPPORT_MP 1 */
|
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
/* Define ODM SW team support flag. */
|
2013-08-12 04:36:23 +00:00
|
|
|
|
|
|
|
|
|
/* Antenna Switch Relative Definition. */
|
|
|
|
|
|
|
|
|
|
/* Add new function SwAntDivCheck8192C(). */
|
|
|
|
|
/* This is the main function of Antenna diversity function before link. */
|
|
|
|
|
/* Mainly, it just retains last scan result and scan again. */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
/* After that, it compares the scan result to see which one gets better
|
|
|
|
|
* RSSI. It selects antenna with better receiving power and returns better
|
|
|
|
|
* scan result. */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define TP_MODE 0
|
|
|
|
|
#define RSSI_MODE 1
|
|
|
|
|
#define TRAFFIC_LOW 0
|
|
|
|
|
#define TRAFFIC_HIGH 1
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* 3 Tx Power Tracking */
|
|
|
|
|
/* 3============================================================ */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define DPK_DELTA_MAPPING_NUM 13
|
|
|
|
|
#define index_mapping_HP_NUM 15
|
|
|
|
|
|
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* */
|
|
|
|
|
/* 3 PSD Handler */
|
|
|
|
|
/* 3============================================================ */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
#define AFH_PSD 1 /* 0:normal PSD scan, 1: only do 20 pts PSD */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define MODE_40M 0 /* 0:20M, 1:40M */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define PSD_TH2 3
|
2013-08-12 04:36:23 +00:00
|
|
|
|
#define PSD_CHM 20 /* Minimum channel number for BT AFH */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define SIR_STEP_SIZE 3
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define Smooth_Size_1 5
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define Smooth_TH_1 3
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define Smooth_Size_2 10
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define Smooth_TH_2 4
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define Smooth_Size_3 20
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define Smooth_TH_3 4
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define Smooth_Step_Size 5
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define Adaptive_SIR 1
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define PSD_RESCAN 4
|
2013-08-12 04:36:23 +00:00
|
|
|
|
#define PSD_SCAN_INTERVAL 700 /* ms */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* 8723A High Power IGI Setting */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define DM_DIG_HIGH_PWR_IGI_LOWER_BOUND 0x22
|
|
|
|
|
#define DM_DIG_Gmode_HIGH_PWR_IGI_LOWER_BOUND 0x28
|
|
|
|
|
#define DM_DIG_HIGH_PWR_THRESHOLD 0x3a
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* LPS define */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define DM_DIG_FA_TH0_LPS 4 /* 4 in lps */
|
|
|
|
|
#define DM_DIG_FA_TH1_LPS 15 /* 15 lps */
|
|
|
|
|
#define DM_DIG_FA_TH2_LPS 30 /* 30 lps */
|
|
|
|
|
#define RSSI_OFFSET_DIG 0x05;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ANT Test */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define ANTTESTALL 0x00 /* Ant A or B will be Testing */
|
|
|
|
|
#define ANTTESTA 0x01 /* Ant A will be Testing */
|
|
|
|
|
#define ANTTESTB 0x02 /* Ant B will be testing */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct rtw_dig {
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 Dig_Enable_Flag;
|
|
|
|
|
u8 Dig_Ext_Port_Stage;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
int RssiLowThresh;
|
|
|
|
|
int RssiHighThresh;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u32 FALowThresh;
|
|
|
|
|
u32 FAHighThresh;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 CurSTAConnectState;
|
|
|
|
|
u8 PreSTAConnectState;
|
|
|
|
|
u8 CurMultiSTAConnectState;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 PreIGValue;
|
|
|
|
|
u8 CurIGValue;
|
|
|
|
|
u8 BackupIGValue;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
s8 BackoffVal;
|
|
|
|
|
s8 BackoffVal_range_max;
|
|
|
|
|
s8 BackoffVal_range_min;
|
|
|
|
|
u8 rx_gain_range_max;
|
|
|
|
|
u8 rx_gain_range_min;
|
|
|
|
|
u8 Rssi_val_min;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 PreCCK_CCAThres;
|
|
|
|
|
u8 CurCCK_CCAThres;
|
|
|
|
|
u8 PreCCKPDState;
|
|
|
|
|
u8 CurCCKPDState;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 LargeFAHit;
|
|
|
|
|
u8 ForbiddenIGI;
|
|
|
|
|
u32 Recover_cnt;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 DIG_Dynamic_MIN_0;
|
|
|
|
|
u8 DIG_Dynamic_MIN_1;
|
2013-05-19 04:48:10 +00:00
|
|
|
|
bool bMediaConnect_0;
|
|
|
|
|
bool bMediaConnect_1;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u32 AntDiv_RSSI_max;
|
|
|
|
|
u32 RSSI_max;
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct rtl_ps {
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 PreCCAState;
|
|
|
|
|
u8 CurCCAState;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 PreRFState;
|
|
|
|
|
u8 CurRFState;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
|
|
|
|
int Rssi_val_min;
|
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 initialize;
|
2014-11-16 00:18:30 +00:00
|
|
|
|
u32 Reg874, RegC70, Reg85C, RegA74;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct false_alarm_stats {
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u32 Cnt_Parity_Fail;
|
|
|
|
|
u32 Cnt_Rate_Illegal;
|
|
|
|
|
u32 Cnt_Crc8_fail;
|
|
|
|
|
u32 Cnt_Mcs_fail;
|
|
|
|
|
u32 Cnt_Ofdm_fail;
|
|
|
|
|
u32 Cnt_Cck_fail;
|
|
|
|
|
u32 Cnt_all;
|
|
|
|
|
u32 Cnt_Fast_Fsync;
|
|
|
|
|
u32 Cnt_SB_Search_fail;
|
|
|
|
|
u32 Cnt_OFDM_CCA;
|
|
|
|
|
u32 Cnt_CCK_CCA;
|
|
|
|
|
u32 Cnt_CCA_all;
|
|
|
|
|
u32 Cnt_BW_USC; /* Gary */
|
|
|
|
|
u32 Cnt_BW_LSC; /* Gary */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct rx_hpc {
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 RXHP_flag;
|
|
|
|
|
u8 PSD_func_trigger;
|
|
|
|
|
u8 PSD_bitmap_RXHP[80];
|
|
|
|
|
u8 Pre_IGI;
|
|
|
|
|
u8 Cur_IGI;
|
|
|
|
|
u8 Pre_pw_th;
|
|
|
|
|
u8 Cur_pw_th;
|
2013-05-19 04:48:10 +00:00
|
|
|
|
bool First_time_enter;
|
|
|
|
|
bool RXHP_enable;
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 TP_Mode;
|
2013-07-26 20:25:06 +00:00
|
|
|
|
struct timer_list PSDTimer;
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define ASSOCIATE_ENTRY_NUM 32 /* Max size of AsocEntry[]. */
|
|
|
|
|
#define ODM_ASSOCIATE_ENTRY_NUM ASSOCIATE_ENTRY_NUM
|
|
|
|
|
|
|
|
|
|
/* This indicates two different steps. */
|
|
|
|
|
/* In SWAW_STEP_PEAK, driver needs to switch antenna and listen to
|
|
|
|
|
* the signal on the air. */
|
|
|
|
|
/* In SWAW_STEP_DETERMINE, driver just compares the signal captured in
|
|
|
|
|
* SWAW_STEP_PEAK with original RSSI to determine if it is necessary to
|
|
|
|
|
* switch antenna. */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
|
|
|
|
#define SWAW_STEP_PEAK 0
|
|
|
|
|
#define SWAW_STEP_DETERMINE 1
|
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define TP_MODE 0
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define RSSI_MODE 1
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define TRAFFIC_LOW 0
|
|
|
|
|
#define TRAFFIC_HIGH 1
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct sw_ant_switch {
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 try_flag;
|
|
|
|
|
s32 PreRSSI;
|
|
|
|
|
u8 CurAntenna;
|
|
|
|
|
u8 PreAntenna;
|
|
|
|
|
u8 RSSI_Trying;
|
|
|
|
|
u8 TestMode;
|
|
|
|
|
u8 bTriggerAntennaSwitch;
|
|
|
|
|
u8 SelectAntennaMap;
|
|
|
|
|
u8 RSSI_target;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Before link Antenna Switch check */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 SWAS_NoLink_State;
|
|
|
|
|
u32 SWAS_NoLink_BK_Reg860;
|
|
|
|
|
bool ANTA_ON; /* To indicate Ant A is or not */
|
|
|
|
|
bool ANTB_ON; /* To indicate Ant B is on or not */
|
|
|
|
|
|
|
|
|
|
s32 RSSI_sum_A;
|
|
|
|
|
s32 RSSI_sum_B;
|
|
|
|
|
s32 RSSI_cnt_A;
|
|
|
|
|
s32 RSSI_cnt_B;
|
|
|
|
|
u64 lastTxOkCnt;
|
|
|
|
|
u64 lastRxOkCnt;
|
|
|
|
|
u64 TXByteCnt_A;
|
|
|
|
|
u64 TXByteCnt_B;
|
|
|
|
|
u64 RXByteCnt_A;
|
|
|
|
|
u64 RXByteCnt_B;
|
|
|
|
|
u8 TrafficLoad;
|
2013-07-26 20:25:06 +00:00
|
|
|
|
struct timer_list SwAntennaSwitchTimer;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Hybrid Antenna Diversity */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u32 CCK_Ant1_Cnt[ASSOCIATE_ENTRY_NUM];
|
|
|
|
|
u32 CCK_Ant2_Cnt[ASSOCIATE_ENTRY_NUM];
|
|
|
|
|
u32 OFDM_Ant1_Cnt[ASSOCIATE_ENTRY_NUM];
|
|
|
|
|
u32 OFDM_Ant2_Cnt[ASSOCIATE_ENTRY_NUM];
|
|
|
|
|
u32 RSSI_Ant1_Sum[ASSOCIATE_ENTRY_NUM];
|
|
|
|
|
u32 RSSI_Ant2_Sum[ASSOCIATE_ENTRY_NUM];
|
|
|
|
|
u8 TxAnt[ASSOCIATE_ENTRY_NUM];
|
|
|
|
|
u8 TargetSTA;
|
|
|
|
|
u8 antsel;
|
|
|
|
|
u8 RxIdleAnt;
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct edca_turbo {
|
2013-05-19 04:48:10 +00:00
|
|
|
|
bool bCurrentTurboEDCA;
|
|
|
|
|
bool bIsCurRDLState;
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u32 prv_traffic_idx; /* edca turbo */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct odm_rate_adapt {
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 Type; /* DM_Type_ByFW/DM_Type_ByDriver */
|
|
|
|
|
u8 HighRSSIThresh; /* if RSSI > HighRSSIThresh => RATRState is DM_RATR_STA_HIGH */
|
|
|
|
|
u8 LowRSSIThresh; /* if RSSI <= LowRSSIThresh => RATRState is DM_RATR_STA_LOW */
|
|
|
|
|
u8 RATRState; /* Current RSSI level, DM_RATR_STA_HIGH/DM_RATR_STA_MIDDLE/DM_RATR_STA_LOW */
|
|
|
|
|
u32 LastRATR; /* RATR Register Content */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
|
|
|
|
#define IQK_MAC_REG_NUM 4
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define IQK_ADDA_REG_NUM 16
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define IQK_BB_REG_NUM_MAX 10
|
|
|
|
|
#define IQK_BB_REG_NUM 9
|
|
|
|
|
#define HP_THERMAL_NUM 8
|
|
|
|
|
|
|
|
|
|
#define AVG_THERMAL_NUM 8
|
|
|
|
|
#define IQK_Matrix_REG_NUM 8
|
|
|
|
|
#define IQK_Matrix_Settings_NUM 1+24+21
|
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define DM_Type_ByFWi 0
|
|
|
|
|
#define DM_Type_ByDriver 1
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Declare for common info */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct odm_phy_status_info {
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 RxPWDBAll;
|
|
|
|
|
u8 SignalQuality; /* in 0-100 index. */
|
|
|
|
|
u8 RxMIMOSignalQuality[MAX_PATH_NUM_92CS]; /* EVM */
|
|
|
|
|
u8 RxMIMOSignalStrength[MAX_PATH_NUM_92CS];/* in 0~100 index */
|
|
|
|
|
s8 RxPower; /* in dBm Translate from PWdB */
|
|
|
|
|
s8 RecvSignalPower;/* Real power in dBm for this packet, no
|
|
|
|
|
* beautification and aggregation. Keep this raw
|
|
|
|
|
* info to be used for the other procedures. */
|
|
|
|
|
u8 BTRxRSSIPercentage;
|
|
|
|
|
u8 SignalStrength; /* in 0-100 index. */
|
|
|
|
|
u8 RxPwr[MAX_PATH_NUM_92CS];/* per-path's pwdb */
|
|
|
|
|
u8 RxSNR[MAX_PATH_NUM_92CS];/* per-path's SNR */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct odm_phy_dbg_info {
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM Write,debug info */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
s8 RxSNRdB[MAX_PATH_NUM_92CS];
|
|
|
|
|
u64 NumQryPhyStatus;
|
|
|
|
|
u64 NumQryPhyStatusCCK;
|
|
|
|
|
u64 NumQryPhyStatusOFDM;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Others */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
s32 RxEVM[MAX_PATH_NUM_92CS];
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct odm_per_pkt_info {
|
2013-08-15 03:03:17 +00:00
|
|
|
|
s8 Rate;
|
|
|
|
|
u8 StationID;
|
|
|
|
|
bool bPacketMatchBSSID;
|
|
|
|
|
bool bPacketToSelf;
|
|
|
|
|
bool bPacketBeacon;
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct odm_mac_status_info {
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 test;
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_ability {
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* BB Team */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_DIG = 0x00000001,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_HIGH_POWER = 0x00000002,
|
|
|
|
|
ODM_CCK_CCA_TH = 0x00000004,
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_FA_STATISTICS = 0x00000008,
|
|
|
|
|
ODM_RAMASK = 0x00000010,
|
|
|
|
|
ODM_RSSI_MONITOR = 0x00000020,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_SW_ANTDIV = 0x00000040,
|
|
|
|
|
ODM_HW_ANTDIV = 0x00000080,
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_BB_PWRSV = 0x00000100,
|
|
|
|
|
ODM_2TPATHDIV = 0x00000200,
|
|
|
|
|
ODM_1TPATHDIV = 0x00000400,
|
|
|
|
|
ODM_PSD2AFH = 0x00000800
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* 2011/20/20 MH For MP driver RT_WLAN_STA = struct sta_info */
|
|
|
|
|
/* Please declare below ODM relative info in your STA info structure. */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct odm_sta_info {
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Driver Write */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
bool bUsed; /* record the sta status link or not? */
|
|
|
|
|
u8 IOTPeer; /* Enum value. HT_IOT_PEER_E */
|
2013-08-12 04:36:23 +00:00
|
|
|
|
|
|
|
|
|
/* ODM Write */
|
|
|
|
|
/* 1 PHY_STATUS_INFO */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 RSSI_Path[4]; /* */
|
|
|
|
|
u8 RSSI_Ave;
|
|
|
|
|
u8 RXEVM[4];
|
|
|
|
|
u8 RXSNR[4];
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* 2011/10/20 MH Define Common info enum for all team. */
|
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
enum odm_common_info_def {
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Fixed value: */
|
|
|
|
|
|
|
|
|
|
/* HOOK BEFORE REG INIT----------- */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_CMNINFO_PLATFORM = 0,
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_CMNINFO_ABILITY, /* ODM_ABILITY_E */
|
|
|
|
|
ODM_CMNINFO_INTERFACE, /* ODM_INTERFACE_E */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_CMNINFO_MP_TEST_CHIP,
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_CMNINFO_IC_TYPE, /* ODM_IC_TYPE_E */
|
|
|
|
|
ODM_CMNINFO_CUT_VER, /* ODM_CUT_VERSION_E */
|
|
|
|
|
ODM_CMNINFO_FAB_VER, /* ODM_FAB_E */
|
|
|
|
|
ODM_CMNINFO_RF_TYPE, /* ODM_RF_PATH_E or ODM_RF_TYPE_E? */
|
|
|
|
|
ODM_CMNINFO_BOARD_TYPE, /* ODM_BOARD_TYPE_E */
|
|
|
|
|
ODM_CMNINFO_EXT_LNA, /* true */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_CMNINFO_EXT_PA,
|
|
|
|
|
ODM_CMNINFO_EXT_TRSW,
|
2013-08-12 04:36:23 +00:00
|
|
|
|
ODM_CMNINFO_PATCH_ID, /* CUSTOMER ID */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_CMNINFO_BINHCT_TEST,
|
|
|
|
|
ODM_CMNINFO_BWIFI_TEST,
|
|
|
|
|
ODM_CMNINFO_SMART_CONCURRENT,
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* HOOK BEFORE REG INIT----------- */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Dynamic value: */
|
|
|
|
|
/* POINTER REFERENCE----------- */
|
|
|
|
|
ODM_CMNINFO_MAC_PHY_MODE, /* ODM_MAC_PHY_MODE_E */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_CMNINFO_TX_UNI,
|
|
|
|
|
ODM_CMNINFO_RX_UNI,
|
2013-08-12 04:36:23 +00:00
|
|
|
|
ODM_CMNINFO_WM_MODE, /* ODM_WIRELESS_MODE_E */
|
|
|
|
|
ODM_CMNINFO_BAND, /* ODM_BAND_TYPE_E */
|
|
|
|
|
ODM_CMNINFO_SEC_CHNL_OFFSET, /* ODM_SEC_CHNL_OFFSET_E */
|
|
|
|
|
ODM_CMNINFO_SEC_MODE, /* ODM_SECURITY_E */
|
|
|
|
|
ODM_CMNINFO_BW, /* ODM_BW_E */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_CMNINFO_CHNL,
|
|
|
|
|
|
|
|
|
|
ODM_CMNINFO_DMSP_GET_VALUE,
|
|
|
|
|
ODM_CMNINFO_BUDDY_ADAPTOR,
|
|
|
|
|
ODM_CMNINFO_DMSP_IS_MASTER,
|
|
|
|
|
ODM_CMNINFO_SCAN,
|
|
|
|
|
ODM_CMNINFO_POWER_SAVING,
|
2013-08-12 04:36:23 +00:00
|
|
|
|
ODM_CMNINFO_ONE_PATH_CCA, /* ODM_CCA_PATH_E */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_CMNINFO_DRV_STOP,
|
|
|
|
|
ODM_CMNINFO_PNP_IN,
|
|
|
|
|
ODM_CMNINFO_INIT_ON,
|
|
|
|
|
ODM_CMNINFO_ANT_TEST,
|
|
|
|
|
ODM_CMNINFO_NET_CLOSED,
|
|
|
|
|
ODM_CMNINFO_MP_MODE,
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* POINTER REFERENCE----------- */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* CALL BY VALUE------------- */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_CMNINFO_WIFI_DIRECT,
|
|
|
|
|
ODM_CMNINFO_WIFI_DISPLAY,
|
|
|
|
|
ODM_CMNINFO_LINK,
|
|
|
|
|
ODM_CMNINFO_RSSI_MIN,
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_CMNINFO_DBG_COMP, /* u64 */
|
|
|
|
|
ODM_CMNINFO_DBG_LEVEL, /* u32 */
|
2013-08-14 17:03:28 +00:00
|
|
|
|
ODM_CMNINFO_RA_THRESHOLD_HIGH, /* u8 */
|
|
|
|
|
ODM_CMNINFO_RA_THRESHOLD_LOW, /* u8 */
|
|
|
|
|
ODM_CMNINFO_RF_ANTENNA_TYPE, /* u8 */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_CMNINFO_BT_DISABLED,
|
|
|
|
|
ODM_CMNINFO_BT_OPERATION,
|
|
|
|
|
ODM_CMNINFO_BT_DIG,
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_CMNINFO_BT_BUSY, /* Check Bt is using or not */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_CMNINFO_BT_DISABLE_EDCA,
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* CALL BY VALUE-------------*/
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Dynamic ptr array hook itms. */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_CMNINFO_STA_STATUS,
|
|
|
|
|
ODM_CMNINFO_PHY_STATUS,
|
|
|
|
|
ODM_CMNINFO_MAC_STATUS,
|
|
|
|
|
ODM_CMNINFO_MAX,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* 2011/10/20 MH Define ODM support ability. ODM_CMNINFO_ABILITY */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_ability_def {
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* BB ODM section BIT 0-15 */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_BB_DIG = BIT0,
|
|
|
|
|
ODM_BB_RA_MASK = BIT1,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_BB_DYNAMIC_TXPWR = BIT2,
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_BB_FA_CNT = BIT3,
|
|
|
|
|
ODM_BB_RSSI_MONITOR = BIT4,
|
|
|
|
|
ODM_BB_CCK_PD = BIT5,
|
|
|
|
|
ODM_BB_ANT_DIV = BIT6,
|
|
|
|
|
ODM_BB_PWR_SAVE = BIT7,
|
|
|
|
|
ODM_BB_PWR_TRA = BIT8,
|
|
|
|
|
ODM_BB_RATE_ADAPTIVE = BIT9,
|
|
|
|
|
ODM_BB_PATH_DIV = BIT10,
|
|
|
|
|
ODM_BB_PSD = BIT11,
|
|
|
|
|
ODM_BB_RXHP = BIT12,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* MAC DM section BIT 16-23 */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_MAC_EDCA_TURBO = BIT16,
|
|
|
|
|
ODM_MAC_EARLY_MODE = BIT17,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* RF ODM section BIT 24-31 */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_RF_TX_PWR_TRACK = BIT24,
|
|
|
|
|
ODM_RF_RX_GAIN_TRACK = BIT25,
|
|
|
|
|
ODM_RF_CALIBRATION = BIT26,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2014-11-16 00:18:30 +00:00
|
|
|
|
#define ODM_RTL8188E BIT4
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM_CMNINFO_CUT_VER */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_cut_version {
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_CUT_A = 1,
|
|
|
|
|
ODM_CUT_B = 2,
|
|
|
|
|
ODM_CUT_C = 3,
|
|
|
|
|
ODM_CUT_D = 4,
|
|
|
|
|
ODM_CUT_E = 5,
|
|
|
|
|
ODM_CUT_F = 6,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_CUT_TEST = 7,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM_CMNINFO_FAB_VER */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_fab_Version {
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_TSMC = 0,
|
|
|
|
|
ODM_UMC = 1,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM_CMNINFO_RF_TYPE */
|
|
|
|
|
/* For example 1T2R (A+AB = BIT0|BIT4|BIT5) */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_rf_path {
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_RF_TX_A = BIT0,
|
|
|
|
|
ODM_RF_TX_B = BIT1,
|
|
|
|
|
ODM_RF_TX_C = BIT2,
|
|
|
|
|
ODM_RF_TX_D = BIT3,
|
|
|
|
|
ODM_RF_RX_A = BIT4,
|
|
|
|
|
ODM_RF_RX_B = BIT5,
|
|
|
|
|
ODM_RF_RX_C = BIT6,
|
|
|
|
|
ODM_RF_RX_D = BIT7,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_rf_type {
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_1T1R = 0,
|
|
|
|
|
ODM_1T2R = 1,
|
|
|
|
|
ODM_2T2R = 2,
|
|
|
|
|
ODM_2T3R = 3,
|
|
|
|
|
ODM_2T4R = 4,
|
|
|
|
|
ODM_3T3R = 5,
|
|
|
|
|
ODM_3T4R = 6,
|
|
|
|
|
ODM_4T4R = 7,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM Dynamic common info value definition */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_mac_phy_mode {
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_SMSP = 0,
|
|
|
|
|
ODM_DMSP = 1,
|
|
|
|
|
ODM_DMDP = 2,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_bt_coexist {
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_BT_BUSY = 1,
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_BT_ON = 2,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_BT_OFF = 3,
|
|
|
|
|
ODM_BT_NONE = 4,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM_CMNINFO_OP_MODE */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_operation_mode {
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_NO_LINK = BIT0,
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_LINK = BIT1,
|
|
|
|
|
ODM_SCAN = BIT2,
|
|
|
|
|
ODM_POWERSAVE = BIT3,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_AP_MODE = BIT4,
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_CLIENT_MODE = BIT5,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_AD_HOC = BIT6,
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_WIFI_DIRECT = BIT7,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_WIFI_DISPLAY = BIT8,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM_CMNINFO_WM_MODE */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_wireless_mode {
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_WM_UNKNOW = 0x0,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
ODM_WM_B = BIT0,
|
|
|
|
|
ODM_WM_G = BIT1,
|
|
|
|
|
ODM_WM_A = BIT2,
|
|
|
|
|
ODM_WM_N24G = BIT3,
|
|
|
|
|
ODM_WM_N5G = BIT4,
|
|
|
|
|
ODM_WM_AUTO = BIT5,
|
|
|
|
|
ODM_WM_AC = BIT6,
|
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM_CMNINFO_BAND */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_band_type {
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_BAND_2_4G = BIT0,
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_BAND_5G = BIT1,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM_CMNINFO_SEC_CHNL_OFFSET */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_sec_chnl_offset {
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_DONT_CARE = 0,
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_BELOW = 1,
|
|
|
|
|
ODM_ABOVE = 2
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM_CMNINFO_SEC_MODE */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_security {
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_SEC_OPEN = 0,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_SEC_WEP40 = 1,
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_SEC_TKIP = 2,
|
|
|
|
|
ODM_SEC_RESERVE = 3,
|
|
|
|
|
ODM_SEC_AESCCMP = 4,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_SEC_WEP104 = 5,
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_WEP_WPA_MIXED = 6, /* WEP + WPA */
|
|
|
|
|
ODM_SEC_SMS4 = 7,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM_CMNINFO_BW */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_bw {
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_BW20M = 0,
|
|
|
|
|
ODM_BW40M = 1,
|
|
|
|
|
ODM_BW80M = 2,
|
|
|
|
|
ODM_BW160M = 3,
|
|
|
|
|
ODM_BW10M = 4,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM_CMNINFO_BOARD_TYPE */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_board_type {
|
2013-05-19 04:28:07 +00:00
|
|
|
|
ODM_BOARD_NORMAL = 0,
|
|
|
|
|
ODM_BOARD_HIGHPWR = 1,
|
|
|
|
|
ODM_BOARD_MINICARD = 2,
|
|
|
|
|
ODM_BOARD_SLIM = 3,
|
|
|
|
|
ODM_BOARD_COMBO = 4,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM_CMNINFO_ONE_PATH_CCA */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_cca_path {
|
2013-08-15 03:03:17 +00:00
|
|
|
|
ODM_CCA_2R = 0,
|
|
|
|
|
ODM_CCA_1R_A = 1,
|
|
|
|
|
ODM_CCA_1R_B = 2,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct odm_ra_info {
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 RateID;
|
|
|
|
|
u32 RateMask;
|
|
|
|
|
u32 RAUseRate;
|
|
|
|
|
u8 RateSGI;
|
|
|
|
|
u8 RssiStaRA;
|
|
|
|
|
u8 PreRssiStaRA;
|
|
|
|
|
u8 SGIEnable;
|
|
|
|
|
u8 DecisionRate;
|
|
|
|
|
u8 PreRate;
|
|
|
|
|
u8 HighestRate;
|
|
|
|
|
u8 LowestRate;
|
|
|
|
|
u32 NscUp;
|
|
|
|
|
u32 NscDown;
|
|
|
|
|
u16 RTY[5];
|
|
|
|
|
u32 TOTAL;
|
|
|
|
|
u16 DROP;
|
|
|
|
|
u8 Active;
|
|
|
|
|
u16 RptTime;
|
|
|
|
|
u8 RAWaitingCounter;
|
|
|
|
|
u8 RAPendingCounter;
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 PTActive; /* on or off */
|
|
|
|
|
u8 PTTryState; /* 0 trying state, 1 for decision state */
|
|
|
|
|
u8 PTStage; /* 0~6 */
|
|
|
|
|
u8 PTStopCount; /* Stop PT counter */
|
|
|
|
|
u8 PTPreRate; /* if rate change do PT */
|
|
|
|
|
u8 PTPreRssi; /* if RSSI change 5% do PT */
|
|
|
|
|
u8 PTModeSS; /* decide whitch rate should do PT */
|
|
|
|
|
u8 RAstage; /* StageRA, decide how many times RA will be done
|
|
|
|
|
* between PT */
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 PTSmoothFactor;
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct ijk_matrix_regs_set {
|
2013-08-15 03:03:17 +00:00
|
|
|
|
bool bIQKDone;
|
|
|
|
|
s32 Value[1][IQK_Matrix_REG_NUM];
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct odm_rf_cal {
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* for tx power tracking */
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u32 RegA24; /* for TempCCK */
|
|
|
|
|
s32 RegE94;
|
|
|
|
|
s32 RegE9C;
|
|
|
|
|
s32 RegEB4;
|
|
|
|
|
s32 RegEBC;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 TXPowercount;
|
|
|
|
|
bool bTXPowerTrackingInit;
|
|
|
|
|
bool bTXPowerTracking;
|
|
|
|
|
u8 TxPowerTrackControl; /* for mp mode, turn off txpwrtracking
|
|
|
|
|
* as default */
|
|
|
|
|
u8 TM_Trigger;
|
|
|
|
|
u8 InternalPA5G[2]; /* pathA / pathB */
|
|
|
|
|
|
|
|
|
|
u8 ThermalMeter[2]; /* ThermalMeter, index 0 for RFIC0,
|
|
|
|
|
* and 1 for RFIC1 */
|
|
|
|
|
u8 ThermalValue;
|
|
|
|
|
u8 ThermalValue_LCK;
|
|
|
|
|
u8 ThermalValue_IQK;
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 ThermalValue_DPK;
|
|
|
|
|
u8 ThermalValue_AVG[AVG_THERMAL_NUM];
|
|
|
|
|
u8 ThermalValue_AVG_index;
|
|
|
|
|
u8 ThermalValue_RxGain;
|
|
|
|
|
u8 ThermalValue_Crystal;
|
|
|
|
|
u8 ThermalValue_DPKstore;
|
|
|
|
|
u8 ThermalValue_DPKtrack;
|
2013-05-19 04:48:10 +00:00
|
|
|
|
bool TxPowerTrackingInProgress;
|
|
|
|
|
bool bDPKenable;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-05-19 04:48:10 +00:00
|
|
|
|
bool bReloadtxpowerindex;
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 bRfPiEnable;
|
|
|
|
|
u32 TXPowerTrackingCallbackCnt; /* cosa add for debug */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 bCCKinCH14;
|
|
|
|
|
u8 CCK_index;
|
|
|
|
|
u8 OFDM_index[2];
|
2013-05-19 04:48:10 +00:00
|
|
|
|
bool bDoneTxpower;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 ThermalValue_HP[HP_THERMAL_NUM];
|
|
|
|
|
u8 ThermalValue_HP_index;
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct ijk_matrix_regs_set IQKMatrixRegSetting[IQK_Matrix_Settings_NUM];
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 Delta_IQK;
|
|
|
|
|
u8 Delta_LCK;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* for IQK */
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u32 RegC04;
|
|
|
|
|
u32 Reg874;
|
|
|
|
|
u32 RegC08;
|
|
|
|
|
u32 RegB68;
|
|
|
|
|
u32 RegB6C;
|
|
|
|
|
u32 Reg870;
|
|
|
|
|
u32 Reg860;
|
|
|
|
|
u32 Reg864;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-05-19 04:48:10 +00:00
|
|
|
|
bool bIQKInitialized;
|
2013-08-15 03:03:17 +00:00
|
|
|
|
bool bLCKInProgress;
|
2013-05-19 04:48:10 +00:00
|
|
|
|
bool bAntennaDetected;
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u32 ADDA_backup[IQK_ADDA_REG_NUM];
|
|
|
|
|
u32 IQK_MAC_backup[IQK_MAC_REG_NUM];
|
|
|
|
|
u32 IQK_BB_backup_recover[9];
|
|
|
|
|
u32 IQK_BB_backup[IQK_BB_REG_NUM];
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* for APK */
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u32 APKoutput[2][2]; /* path A/B; output1_1a/output1_2a */
|
|
|
|
|
u8 bAPKdone;
|
|
|
|
|
u8 bAPKThermalMeterIgnore;
|
|
|
|
|
u8 bDPdone;
|
|
|
|
|
u8 bDPPathAOK;
|
|
|
|
|
u8 bDPPathBOK;
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM Dynamic common info value definition */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct fast_ant_train {
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 Bssid[6];
|
|
|
|
|
u8 antsel_rx_keep_0;
|
|
|
|
|
u8 antsel_rx_keep_1;
|
|
|
|
|
u8 antsel_rx_keep_2;
|
|
|
|
|
u32 antSumRSSI[7];
|
|
|
|
|
u32 antRSSIcnt[7];
|
|
|
|
|
u32 antAveRSSI[7];
|
|
|
|
|
u8 FAT_State;
|
|
|
|
|
u32 TrainIdx;
|
|
|
|
|
u8 antsel_a[ODM_ASSOCIATE_ENTRY_NUM];
|
|
|
|
|
u8 antsel_b[ODM_ASSOCIATE_ENTRY_NUM];
|
|
|
|
|
u8 antsel_c[ODM_ASSOCIATE_ENTRY_NUM];
|
|
|
|
|
u32 MainAnt_Sum[ODM_ASSOCIATE_ENTRY_NUM];
|
|
|
|
|
u32 AuxAnt_Sum[ODM_ASSOCIATE_ENTRY_NUM];
|
|
|
|
|
u32 MainAnt_Cnt[ODM_ASSOCIATE_ENTRY_NUM];
|
|
|
|
|
u32 AuxAnt_Cnt[ODM_ASSOCIATE_ENTRY_NUM];
|
|
|
|
|
u8 RxIdleAnt;
|
2013-08-15 03:03:17 +00:00
|
|
|
|
bool bBecomeLinked;
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum fat_state {
|
|
|
|
|
FAT_NORMAL_STATE = 0,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
FAT_TRAINING_STATE = 1,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum ant_div_type {
|
|
|
|
|
NO_ANTDIV = 0xFF,
|
|
|
|
|
CG_TRX_HW_ANTDIV = 0x01,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
CGCS_RX_HW_ANTDIV = 0x02,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
FIXED_HW_ANTDIV = 0x03,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
CG_TRX_SMART_ANTDIV = 0x04,
|
|
|
|
|
CGCS_RX_SW_ANTDIV = 0x05,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
/* Copy from SD4 defined structure. We use to support PHY DM integration. */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct odm_dm_struct {
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Add for different team use temporarily */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
struct adapter *Adapter; /* For CE/NIC team */
|
|
|
|
|
struct rtl8192cd_priv *priv; /* For AP/ADSL team */
|
|
|
|
|
/* WHen you use above pointers, they must be initialized. */
|
|
|
|
|
bool odm_ready;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct rtl8192cd_priv *fake_priv;
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u64 DebugComponents;
|
|
|
|
|
u32 DebugLevel;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM HANDLE, DRIVER NEEDS NOT TO HOOK------ */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
bool bCckHighPower;
|
|
|
|
|
u8 RFPathRxEnable; /* ODM_CMNINFO_RFPATH_ENABLE */
|
|
|
|
|
u8 ControlChannel;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM HANDLE, DRIVER NEEDS NOT TO HOOK------ */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* 1 COMMON INFORMATION */
|
|
|
|
|
/* Init Value */
|
|
|
|
|
/* HOOK BEFORE REG INIT----------- */
|
|
|
|
|
/* ODM Platform info AP/ADSL/CE/MP = 1/2/3/4 */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 SupportPlatform;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM Support Ability DIG/RATR/TX_PWR_TRACK/ <20>K<EFBFBD>K = 1/2/3/<2F>K */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u32 SupportAbility;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM PCIE/USB/SDIO/GSPI = 0/1/2/3 */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 SupportInterface;
|
|
|
|
|
/* ODM composite or independent. Bit oriented/ 92C+92D+ .... or any
|
|
|
|
|
* other type = 1/2/3/... */
|
|
|
|
|
u32 SupportICType;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Cut Version TestChip/A-cut/B-cut... = 0/1/2/3/... */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 CutVersion;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Fab Version TSMC/UMC = 0/1 */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 FabVersion;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* RF Type 4T4R/3T3R/2T2R/1T2R/1T1R/... */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 RFType;
|
|
|
|
|
/* Board Type Normal/HighPower/MiniCard/SLIM/Combo/. = 0/1/2/3/4/. */
|
|
|
|
|
u8 BoardType;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* with external LNA NO/Yes = 0/1 */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 ExtLNA;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* with external PA NO/Yes = 0/1 */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 ExtPA;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* with external TRSW NO/Yes = 0/1 */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 ExtTRSW;
|
|
|
|
|
u8 PatchID; /* Customer ID */
|
|
|
|
|
bool bInHctTest;
|
|
|
|
|
bool bWIFITest;
|
|
|
|
|
|
|
|
|
|
bool bDualMacSmartConcurrent;
|
|
|
|
|
u32 BK_SupportAbility;
|
|
|
|
|
u8 AntDivType;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* HOOK BEFORE REG INIT----------- */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Dynamic Value */
|
|
|
|
|
/* POINTER REFERENCE----------- */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 u8_temp;
|
|
|
|
|
bool bool_temp;
|
2013-07-27 01:08:39 +00:00
|
|
|
|
struct adapter *adapter_temp;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* MAC PHY Mode SMSP/DMSP/DMDP = 0/1/2 */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 *pMacPhyMode;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* TX Unicast byte count */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u64 *pNumTxBytesUnicast;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* RX Unicast byte count */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u64 *pNumRxBytesUnicast;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Wireless mode B/G/A/N = BIT0/BIT1/BIT2/BIT3 */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 *pWirelessMode; /* ODM_WIRELESS_MODE_E */
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Frequence band 2.4G/5G = 0/1 */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 *pBandType;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Secondary channel offset don't_care/below/above = 0/1/2 */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 *pSecChOffset;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Security mode Open/WEP/AES/TKIP = 0/1/2/3 */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 *pSecurity;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* BW info 20M/40M/80M = 0/1/2 */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 *pBandWidth;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Central channel location Ch1/Ch2/.... */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 *pChannel; /* central channel number */
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Common info for 92D DMSP */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
bool *pbGetValueFromOtherMac;
|
2013-07-27 01:08:39 +00:00
|
|
|
|
struct adapter **pBuddyAdapter;
|
2013-08-15 03:03:17 +00:00
|
|
|
|
bool *pbMasterOfDMSP; /* MAC0: master, MAC1: slave */
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Common info for Status */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
bool *pbScanInProcess;
|
|
|
|
|
bool *pbPowerSaving;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* CCA Path 2-path/path-A/path-B = 0/1/2; using ODM_CCA_PATH_E. */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 *pOnePathCCA;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* pMgntInfo->AntennaTest */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 *pAntennaTest;
|
|
|
|
|
bool *pbNet_closed;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* POINTER REFERENCE----------- */
|
|
|
|
|
/* */
|
|
|
|
|
/* CALL BY VALUE------------- */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
bool bWIFI_Direct;
|
|
|
|
|
bool bWIFI_Display;
|
|
|
|
|
bool bLinked;
|
|
|
|
|
u8 RSSI_Min;
|
|
|
|
|
u8 InterfaceIndex; /* Add for 92D dual MAC: 0--Mac0 1--Mac1 */
|
|
|
|
|
bool bIsMPChip;
|
|
|
|
|
bool bOneEntryOnly;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Common info for BTDM */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
bool bBtDisabled; /* BT is disabled */
|
|
|
|
|
bool bBtHsOperation; /* BT HS mode is under progress */
|
|
|
|
|
u8 btHsDigVal; /* use BT rssi to decide the DIG value */
|
|
|
|
|
bool bBtDisableEdcaTurbo;/* Under some condition, don't enable the
|
|
|
|
|
* EDCA Turbo */
|
|
|
|
|
bool bBtBusy; /* BT is busy. */
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* CALL BY VALUE------------- */
|
|
|
|
|
|
|
|
|
|
/* 2 Define STA info. */
|
|
|
|
|
/* _ODM_STA_INFO */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
/* For MP, we need to reduce one array pointer for default port.?? */
|
2013-07-26 20:25:06 +00:00
|
|
|
|
struct sta_info *pODM_StaInfo[ODM_ASSOCIATE_ENTRY_NUM];
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u16 CurrminRptTime;
|
|
|
|
|
struct odm_ra_info RAInfo[ODM_ASSOCIATE_ENTRY_NUM]; /* Use MacID as
|
|
|
|
|
* array index. STA MacID=0,
|
|
|
|
|
* VWiFi Client MacID={1, ODM_ASSOCIATE_ENTRY_NUM-1} */
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* */
|
|
|
|
|
/* 2012/02/14 MH Add to share 88E ra with other SW team. */
|
|
|
|
|
/* We need to colelct all support abilit to a proper area. */
|
|
|
|
|
/* */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
bool RaSupport88E;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Define ........... */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Latest packet phy info (ODM write) */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct odm_phy_dbg_info PhyDbgInfo;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Latest packet phy info (ODM write) */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct odm_mac_status_info *pMacInfo;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Different Team independt structure?? */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM Structure */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct fast_ant_train DM_FatTable;
|
|
|
|
|
struct rtw_dig DM_DigTable;
|
|
|
|
|
struct rtl_ps DM_PSTable;
|
|
|
|
|
struct rx_hpc DM_RXHP_Table;
|
|
|
|
|
struct false_alarm_stats FalseAlmCnt;
|
|
|
|
|
struct false_alarm_stats FlaseAlmCntBuddyAdapter;
|
|
|
|
|
struct sw_ant_switch DM_SWAT_Table;
|
2013-05-19 04:48:10 +00:00
|
|
|
|
bool RSSI_test;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct edca_turbo DM_EDCA_Table;
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u32 WMMEDCA_BE;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Copy from SD4 structure */
|
|
|
|
|
/* */
|
|
|
|
|
/* ================================================== */
|
|
|
|
|
/* */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
bool *pbDriverStopped;
|
|
|
|
|
bool *pbDriverIsGoingToPnpSetPowerSleep;
|
|
|
|
|
bool *pinit_adpt_in_progress;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* PSD */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
bool bUserAssignLevel;
|
2013-07-26 20:25:06 +00:00
|
|
|
|
struct timer_list PSDTimer;
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 RSSI_BT; /* come from BT */
|
|
|
|
|
bool bPSDinProcess;
|
|
|
|
|
bool bDMInitialGainEnable;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* for rate adaptive, in fact, 88c/92c fw will handle this */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 bUseRAMask;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct odm_rate_adapt RateAdaptive;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct odm_rf_cal RFCalibrateInfo;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* TX power tracking */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 BbSwingIdxOfdm;
|
|
|
|
|
u8 BbSwingIdxOfdmCurrent;
|
|
|
|
|
u8 BbSwingIdxOfdmBase;
|
|
|
|
|
bool BbSwingFlagOfdm;
|
|
|
|
|
u8 BbSwingIdxCck;
|
|
|
|
|
u8 BbSwingIdxCckCurrent;
|
|
|
|
|
u8 BbSwingIdxCckBase;
|
|
|
|
|
bool BbSwingFlagCck;
|
|
|
|
|
u8 *mp_mode;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM system resource. */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* ODM relative time. */
|
2013-07-26 20:25:06 +00:00
|
|
|
|
struct timer_list PathDivSwitchTimer;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* 2011.09.27 add for Path Diversity */
|
2013-07-26 20:25:06 +00:00
|
|
|
|
struct timer_list CCKPathDiversityTimer;
|
|
|
|
|
struct timer_list FastAntTrainingTimer;
|
2013-08-12 04:36:23 +00:00
|
|
|
|
}; /* DM_Dynamic_Mechanism_Structure */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-11-29 22:10:20 +00:00
|
|
|
|
#define ODM_RF_PATH_MAX 3
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum ODM_RF_CONTENT {
|
2013-05-19 04:28:07 +00:00
|
|
|
|
odm_radioa_txt = 0x1000,
|
|
|
|
|
odm_radiob_txt = 0x1001,
|
|
|
|
|
odm_radioc_txt = 0x1002,
|
|
|
|
|
odm_radiod_txt = 0x1003
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum odm_bb_config_type {
|
2013-05-19 04:28:07 +00:00
|
|
|
|
CONFIG_BB_PHY_REG,
|
|
|
|
|
CONFIG_BB_AGC_TAB,
|
|
|
|
|
CONFIG_BB_AGC_TAB_2G,
|
|
|
|
|
CONFIG_BB_AGC_TAB_5G,
|
|
|
|
|
CONFIG_BB_PHY_REG_PG,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Status code */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum rt_status {
|
2013-05-19 04:28:07 +00:00
|
|
|
|
RT_STATUS_SUCCESS,
|
|
|
|
|
RT_STATUS_FAILURE,
|
|
|
|
|
RT_STATUS_PENDING,
|
|
|
|
|
RT_STATUS_RESOURCE,
|
|
|
|
|
RT_STATUS_INVALID_CONTEXT,
|
|
|
|
|
RT_STATUS_INVALID_PARAMETER,
|
|
|
|
|
RT_STATUS_NOT_SUPPORT,
|
|
|
|
|
RT_STATUS_OS_API_FAILED,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* 3=========================================================== */
|
|
|
|
|
/* 3 DIG */
|
|
|
|
|
/* 3=========================================================== */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum dm_dig_op {
|
|
|
|
|
RT_TYPE_THRESH_HIGH = 0,
|
|
|
|
|
RT_TYPE_THRESH_LOW = 1,
|
|
|
|
|
RT_TYPE_BACKOFF = 2,
|
|
|
|
|
RT_TYPE_RX_GAIN_MIN = 3,
|
|
|
|
|
RT_TYPE_RX_GAIN_MAX = 4,
|
|
|
|
|
RT_TYPE_ENABLE = 5,
|
|
|
|
|
RT_TYPE_DISABLE = 6,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
DIG_OP_TYPE_MAX
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define DM_DIG_THRESH_HIGH 40
|
|
|
|
|
#define DM_DIG_THRESH_LOW 35
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define DM_SCAN_RSSI_TH 0x14 /* scan return issue for LC */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
|
|
|
|
|
2013-05-27 22:32:24 +00:00
|
|
|
|
#define DM_false_ALARM_THRESH_LOW 400
|
|
|
|
|
#define DM_false_ALARM_THRESH_HIGH 1000
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-09-01 01:02:19 +00:00
|
|
|
|
#define DM_DIG_MAX_NIC 0x4e
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define DM_DIG_MIN_NIC 0x1e /* 0x22/0x1c */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define DM_DIG_MAX_AP 0x32
|
|
|
|
|
#define DM_DIG_MIN_AP 0x20
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define DM_DIG_MAX_NIC_HP 0x46
|
|
|
|
|
#define DM_DIG_MIN_NIC_HP 0x2e
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define DM_DIG_MAX_AP_HP 0x42
|
|
|
|
|
#define DM_DIG_MIN_AP_HP 0x30
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* vivi 92c&92d has different definition, 20110504 */
|
|
|
|
|
/* this is for 92c */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define DM_DIG_FA_TH0 0x200/* 0x20 */
|
|
|
|
|
#define DM_DIG_FA_TH1 0x300/* 0x100 */
|
|
|
|
|
#define DM_DIG_FA_TH2 0x400/* 0x200 */
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* this is for 92d */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define DM_DIG_FA_TH0_92D 0x100
|
|
|
|
|
#define DM_DIG_FA_TH1_92D 0x400
|
|
|
|
|
#define DM_DIG_FA_TH2_92D 0x600
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define DM_DIG_BACKOFF_MAX 12
|
|
|
|
|
#define DM_DIG_BACKOFF_MIN -4
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define DM_DIG_BACKOFF_DEFAULT 10
|
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* 3=========================================================== */
|
|
|
|
|
/* 3 AGC RX High Power Mode */
|
|
|
|
|
/* 3=========================================================== */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define LNA_Low_Gain_1 0x64
|
|
|
|
|
#define LNA_Low_Gain_2 0x5A
|
|
|
|
|
#define LNA_Low_Gain_3 0x58
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define FA_RXHP_TH1 5000
|
|
|
|
|
#define FA_RXHP_TH2 1500
|
|
|
|
|
#define FA_RXHP_TH3 800
|
|
|
|
|
#define FA_RXHP_TH4 600
|
|
|
|
|
#define FA_RXHP_TH5 500
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* 3=========================================================== */
|
|
|
|
|
/* 3 EDCA */
|
|
|
|
|
/* 3=========================================================== */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* 3=========================================================== */
|
|
|
|
|
/* 3 Dynamic Tx Power */
|
|
|
|
|
/* 3=========================================================== */
|
|
|
|
|
/* Dynamic Tx Power Control Threshold */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define TX_POWER_NEAR_FIELD_THRESH_LVL2 74
|
|
|
|
|
#define TX_POWER_NEAR_FIELD_THRESH_LVL1 67
|
|
|
|
|
#define TX_POWER_NEAR_FIELD_THRESH_AP 0x3F
|
|
|
|
|
|
|
|
|
|
#define TxHighPwrLevel_Normal 0
|
|
|
|
|
#define TxHighPwrLevel_Level1 1
|
|
|
|
|
#define TxHighPwrLevel_Level2 2
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define TxHighPwrLevel_BT1 3
|
|
|
|
|
#define TxHighPwrLevel_BT2 4
|
|
|
|
|
#define TxHighPwrLevel_15 5
|
|
|
|
|
#define TxHighPwrLevel_35 6
|
|
|
|
|
#define TxHighPwrLevel_50 7
|
|
|
|
|
#define TxHighPwrLevel_70 8
|
|
|
|
|
#define TxHighPwrLevel_100 9
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* 3=========================================================== */
|
|
|
|
|
/* 3 Rate Adaptive */
|
|
|
|
|
/* 3=========================================================== */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
#define DM_RATR_STA_INIT 0
|
|
|
|
|
#define DM_RATR_STA_HIGH 1
|
|
|
|
|
#define DM_RATR_STA_MIDDLE 2
|
|
|
|
|
#define DM_RATR_STA_LOW 3
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* 3=========================================================== */
|
|
|
|
|
/* 3 BB Power Save */
|
|
|
|
|
/* 3=========================================================== */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum dm_1r_cca {
|
2013-08-15 03:03:17 +00:00
|
|
|
|
CCA_1R = 0,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
CCA_2R = 1,
|
|
|
|
|
CCA_MAX = 2,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum dm_rf {
|
2013-08-15 03:03:17 +00:00
|
|
|
|
RF_Save = 0,
|
2013-05-19 04:28:07 +00:00
|
|
|
|
RF_Normal = 1,
|
|
|
|
|
RF_MAX = 2,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* 3=========================================================== */
|
|
|
|
|
/* 3 Antenna Diversity */
|
|
|
|
|
/* 3=========================================================== */
|
2013-07-26 16:20:42 +00:00
|
|
|
|
enum dm_swas {
|
2013-05-19 04:28:07 +00:00
|
|
|
|
Antenna_A = 1,
|
|
|
|
|
Antenna_B = 2,
|
|
|
|
|
Antenna_MAX = 3,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
/* Maximal number of antenna detection mechanism needs to perform. */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define MAX_ANTENNA_DETECTION_CNT 10
|
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* Extern Global Variables. */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define OFDM_TABLE_SIZE_92C 37
|
|
|
|
|
#define OFDM_TABLE_SIZE_92D 43
|
|
|
|
|
#define CCK_TABLE_SIZE 33
|
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
extern u32 OFDMSwingTable[OFDM_TABLE_SIZE_92D];
|
|
|
|
|
extern u8 CCKSwingTable_Ch1_Ch13[CCK_TABLE_SIZE][8];
|
|
|
|
|
extern u8 CCKSwingTable_Ch14 [CCK_TABLE_SIZE][8];
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* check Sta pointer valid or not */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define IS_STA_VALID(pSta) (pSta)
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* 20100514 Joseph: Add definition for antenna switching test after link. */
|
|
|
|
|
/* This indicates two different the steps. */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
/* In SWAW_STEP_PEAK, driver needs to switch antenna and listen to the
|
|
|
|
|
* signal on the air. */
|
|
|
|
|
/* In SWAW_STEP_DETERMINE, driver just compares the signal captured in
|
|
|
|
|
* SWAW_STEP_PEAK */
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* with original RSSI to determine if it is necessary to switch antenna. */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define SWAW_STEP_PEAK 0
|
|
|
|
|
#define SWAW_STEP_DETERMINE 1
|
|
|
|
|
|
2014-11-16 00:18:30 +00:00
|
|
|
|
#define dm_CheckTXPowerTracking ODM_TXPowerTrackingCheck
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#define dm_RF_Saving ODM_RF_Saving
|
|
|
|
|
|
2014-11-16 00:18:30 +00:00
|
|
|
|
void ODM_RF_Saving(struct odm_dm_struct *pDM_Odm, u8 bForceInNormal);
|
2013-08-15 03:03:17 +00:00
|
|
|
|
void ODM_TXPowerTrackingCheck(struct odm_dm_struct *pDM_Odm);
|
2014-11-16 00:18:30 +00:00
|
|
|
|
void odm_DIGbyRSSI_LPS(struct odm_dm_struct *pDM_Odm);
|
|
|
|
|
void ODM_Write_CCK_CCA_Thres(struct odm_dm_struct *pDM_Odm, u8 CurCCK_CCAThres);
|
2013-08-14 17:03:28 +00:00
|
|
|
|
bool ODM_RAStateCheck(struct odm_dm_struct *pDM_Odm, s32 RSSI,
|
|
|
|
|
bool bForceUpdate, u8 *pRATRState);
|
|
|
|
|
u32 ConvertTo_dB(u32 Value);
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u32 ODM_Get_Rate_Bitmap(struct odm_dm_struct *pDM_Odm, u32 macid,
|
|
|
|
|
u32 ra_mask, u8 rssi_level);
|
|
|
|
|
void ODM_CmnInfoInit(struct odm_dm_struct *pDM_Odm,
|
|
|
|
|
enum odm_common_info_def CmnInfo, u32 Value);
|
2014-11-16 00:18:30 +00:00
|
|
|
|
void ODM_CmnInfoUpdate(struct odm_dm_struct *pDM_Odm, u32 CmnInfo, u64 Value);
|
2013-08-15 03:03:17 +00:00
|
|
|
|
void ODM_CmnInfoHook(struct odm_dm_struct *pDM_Odm,
|
|
|
|
|
enum odm_common_info_def CmnInfo, void *pValue);
|
|
|
|
|
void ODM_CmnInfoPtrArrayHook(struct odm_dm_struct *pDM_Odm,
|
|
|
|
|
enum odm_common_info_def CmnInfo,
|
|
|
|
|
u16 Index, void *pValue);
|
2014-11-16 00:18:30 +00:00
|
|
|
|
void ODM_DMInit(struct odm_dm_struct *pDM_Odm);
|
|
|
|
|
void ODM_DMWatchdog(struct odm_dm_struct *pDM_Odm);
|
|
|
|
|
void ODM_Write_DIG(struct odm_dm_struct *pDM_Odm, u8 CurrentIGI);
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
|
|
|
|
#endif
|