2022-06-08 23:46:35 +00:00
|
|
|
|
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
|
|
|
|
/* Copyright(c) 2007 - 2011 Realtek Corporation. */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
|
|
|
|
#ifndef __HALDMOUTSRC_H__
|
|
|
|
|
#define __HALDMOUTSRC_H__
|
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct rtw_dig {
|
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
|
|
|
|
u8 rx_gain_range_max;
|
|
|
|
|
u8 rx_gain_range_min;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 CurCCK_CCAThres;
|
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;
|
2013-05-19 04:48:10 +00:00
|
|
|
|
bool bMediaConnect_0;
|
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 {
|
2022-06-08 23:46:35 +00:00
|
|
|
|
u8 pre_rf_state;
|
|
|
|
|
u8 cur_rf_state;
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 initialize;
|
2022-06-08 23:46:35 +00:00
|
|
|
|
u32 reg_874;
|
|
|
|
|
u32 reg_c70;
|
|
|
|
|
u32 reg_85c;
|
|
|
|
|
u32 reg_a74;
|
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
|
|
|
|
|
2022-06-08 23:46:35 +00:00
|
|
|
|
#define ODM_ASSOCIATE_ENTRY_NUM 32 /* Max size of AsocEntry[]. */
|
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 CurAntenna;
|
2022-06-08 23:46:35 +00:00
|
|
|
|
u8 SWAS_NoLink_State; /* Before link Antenna Switch check */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
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 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 9
|
|
|
|
|
#define HP_THERMAL_NUM 8
|
|
|
|
|
|
|
|
|
|
#define AVG_THERMAL_NUM 8
|
|
|
|
|
#define IQK_Matrix_REG_NUM 8
|
|
|
|
|
|
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;
|
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
|
|
|
|
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/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_MP_TEST_CHIP,
|
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
|
|
|
|
/* CALL BY VALUE------------- */
|
2013-08-14 17:03:28 +00:00
|
|
|
|
ODM_CMNINFO_RF_ANTENNA_TYPE, /* u8 */
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* CALL BY VALUE-------------*/
|
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_def {
|
2013-08-12 04:36:23 +00:00
|
|
|
|
/* BB ODM section BIT 0-15 */
|
2022-06-08 23:46:35 +00:00
|
|
|
|
ODM_BB_RSSI_MONITOR = BIT(4),
|
|
|
|
|
ODM_BB_ANT_DIV = BIT(6),
|
|
|
|
|
ODM_BB_PWR_TRA = BIT(8),
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2022-06-08 23:46:35 +00:00
|
|
|
|
# define ODM_ITRF_USB 0x2
|
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 {
|
2022-06-08 23:46:35 +00:00
|
|
|
|
ODM_NO_LINK = BIT(0),
|
|
|
|
|
ODM_LINK = BIT(1),
|
|
|
|
|
ODM_SCAN = BIT(2),
|
|
|
|
|
ODM_POWERSAVE = BIT(3),
|
|
|
|
|
ODM_AP_MODE = BIT(4),
|
|
|
|
|
ODM_CLIENT_MODE = BIT(5),
|
|
|
|
|
ODM_AD_HOC = BIT(6),
|
|
|
|
|
ODM_WIFI_DIRECT = BIT(7),
|
|
|
|
|
ODM_WIFI_DISPLAY = BIT(8),
|
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,
|
2022-06-08 23:46:35 +00:00
|
|
|
|
ODM_WM_B = BIT(0),
|
|
|
|
|
ODM_WM_G = BIT(1),
|
|
|
|
|
ODM_WM_N24G = BIT(3),
|
|
|
|
|
ODM_WM_AUTO = BIT(5),
|
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 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;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
u8 CCK_index;
|
2022-06-08 23:46:35 +00:00
|
|
|
|
u8 OFDM_index;
|
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;
|
2022-06-08 23:46:35 +00:00
|
|
|
|
struct ijk_matrix_regs_set IQKMatrixRegSetting;
|
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;
|
|
|
|
|
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 antsel_rx_keep_0;
|
|
|
|
|
u8 antsel_rx_keep_1;
|
|
|
|
|
u8 antsel_rx_keep_2;
|
|
|
|
|
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 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,
|
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-15 03:03:17 +00:00
|
|
|
|
struct adapter *Adapter; /* For CE/NIC team */
|
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----------- */
|
2022-06-08 23:46:35 +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;
|
2022-06-08 23:46:35 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
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----------- */
|
2022-06-08 23:46:35 +00:00
|
|
|
|
/* Wireless mode B/G/A/N = BIT(0)/BIT(1)/BIT(2)/BIT(3) */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
u8 *pWirelessMode; /* ODM_WIRELESS_MODE_E */
|
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
|
|
|
|
/* BW info 20M/40M/80M = 0/1/2 */
|
2022-06-08 23:46:35 +00:00
|
|
|
|
enum ht_channel_width *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-05-19 04:28:07 +00:00
|
|
|
|
|
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
|
|
|
|
/* POINTER REFERENCE----------- */
|
|
|
|
|
/* */
|
|
|
|
|
/* CALL BY VALUE------------- */
|
2013-08-15 03:03:17 +00:00
|
|
|
|
bool bLinked;
|
|
|
|
|
u8 RSSI_Min;
|
|
|
|
|
bool bIsMPChip;
|
|
|
|
|
bool bOneEntryOnly;
|
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-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
|
|
|
|
/* 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 false_alarm_stats FalseAlmCnt;
|
|
|
|
|
struct sw_ant_switch DM_SWAT_Table;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-07-26 16:20:42 +00:00
|
|
|
|
struct edca_turbo DM_EDCA_Table;
|
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 bDMInitialGainEnable;
|
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;
|
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_PHY_REG_PG,
|
2013-07-26 16:20:42 +00:00
|
|
|
|
};
|
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
|
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-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_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-12 04:36:23 +00:00
|
|
|
|
/* Extern Global Variables. */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#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];
|
2022-06-08 23:46:35 +00:00
|
|
|
|
extern u8 cck_swing_table[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-15 03:03:17 +00:00
|
|
|
|
void ODM_Write_DIG(struct odm_dm_struct *pDM_Odm, u8 CurrentIGI);
|
|
|
|
|
void ODM_Write_CCK_CCA_Thres(struct odm_dm_struct *pDM_Odm, u8 CurCCK_CCAThres);
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
void ODM_RF_Saving(struct odm_dm_struct *pDM_Odm, u8 bForceInNormal);
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
|
void ODM_TXPowerTrackingCheck(struct odm_dm_struct *pDM_Odm);
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
2013-08-14 17:03:28 +00:00
|
|
|
|
bool ODM_RAStateCheck(struct odm_dm_struct *pDM_Odm, s32 RSSI,
|
|
|
|
|
bool bForceUpdate, u8 *pRATRState);
|
2013-05-19 04:28:07 +00:00
|
|
|
|
|
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_DMInit(struct odm_dm_struct *pDM_Odm);
|
|
|
|
|
|
|
|
|
|
void ODM_DMWatchdog(struct odm_dm_struct *pDM_Odm);
|
|
|
|
|
|
|
|
|
|
void ODM_CmnInfoInit(struct odm_dm_struct *pDM_Odm,
|
|
|
|
|
enum odm_common_info_def CmnInfo, u32 Value);
|
|
|
|
|
|
2013-05-19 04:28:07 +00:00
|
|
|
|
#endif
|