From: Jes Sorensen Date: Fri, 16 May 2014 08:05:13 +0000 (+0200) Subject: staging: rtl8723au: Remove some unused ODM dynamic TX power functionality X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=13b2beb3420af1d6ca60cb018e36793a03fe6d4e;p=openwrt%2Fstaging%2Fblogic.git staging: rtl8723au: Remove some unused ODM dynamic TX power functionality Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/hal/odm.c b/drivers/staging/rtl8723au/hal/odm.c index b709f7bf3a9f..05ddd724e1be 100644 --- a/drivers/staging/rtl8723au/hal/odm.c +++ b/drivers/staging/rtl8723au/hal/odm.c @@ -200,17 +200,6 @@ void odm_RefreshRateAdaptiveMask23aAPADSL23a(struct dm_odm_t *pDM_Odm); void odm_DynamicTxPower23aInit(struct dm_odm_t *pDM_Odm); -void odm_DynamicTxPower23aRestorePowerIndex(struct dm_odm_t *pDM_Odm); - -void odm_DynamicTxPower23aSavePowerIndex(struct dm_odm_t *pDM_Odm); - -void odm_DynamicTxPower23aWritePowerIndex(struct dm_odm_t *pDM_Odm, - u8 Value); - -void odm_DynamicTxPower23a_92C(struct dm_odm_t *pDM_Odm); - -void odm_DynamicTxPower23a_92D(struct dm_odm_t *pDM_Odm); - void odm_RSSIMonitorInit(struct dm_odm_t *pDM_Odm); void odm_RSSIMonitorCheck23aMP(struct dm_odm_t *pDM_Odm); @@ -233,8 +222,6 @@ void odm_SwAntDivChkAntSwitchNIC(struct dm_odm_t *pDM_Odm, void odm_SwAntDivChkAntSwitchCallback23a(unsigned long data); -void odm_GlobalAdapterCheck(void); - void odm_RefreshRateAdaptiveMask23a(struct dm_odm_t *pDM_Odm); void ODM_TXPowerTrackingCheck23a(struct dm_odm_t *pDM_Odm); @@ -307,7 +294,6 @@ void ODM23a_DMInit(struct dm_odm_t *pDM_Odm) void ODM_DMWatchdog23a(struct dm_odm_t *pDM_Odm) { /* 2012.05.03 Luke: For all IC series */ - odm_GlobalAdapterCheck(); odm_CmnInfoHook_Debug23a(pDM_Odm); odm_CmnInfoUpdate_Debug23a(pDM_Odm); odm_CommonInfoSelfUpdate23a(pDM_Odm); @@ -344,7 +330,6 @@ void ODM_DMWatchdog23a(struct dm_odm_t *pDM_Odm) if (pDM_Odm->SupportICType & ODM_IC_11N_SERIES) { ODM_TXPowerTrackingCheck23a(pDM_Odm); odm_EdcaTurboCheck23a(pDM_Odm); - odm_DynamicTxPower23a(pDM_Odm); } odm_dtc(pDM_Odm); @@ -1430,62 +1415,13 @@ void odm_DynamicTxPower23aInit(struct dm_odm_t *pDM_Odm) struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter); struct dm_priv *pdmpriv = &pHalData->dmpriv; - pdmpriv->bDynamicTxPowerEnable = false; - - pdmpriv->LastDTPLvl = TxHighPwrLevel_Normal; + /* + * This is never changed, so we should be able to clean up the + * code checking for different values in rtl8723a_rf6052.c + */ pdmpriv->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal; } -void odm_DynamicTxPower23aSavePowerIndex(struct dm_odm_t *pDM_Odm) -{ - u8 index; - u32 Power_Index_REG[6] = {0xc90, 0xc91, 0xc92, 0xc98, 0xc99, 0xc9a}; - - struct rtw_adapter *Adapter = pDM_Odm->Adapter; - struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter); - struct dm_priv *pdmpriv = &pHalData->dmpriv; - for (index = 0; index < 6; index++) - pdmpriv->PowerIndex_backup[index] = - rtl8723au_read8(Adapter, Power_Index_REG[index]); -} - -void odm_DynamicTxPower23aRestorePowerIndex(struct dm_odm_t *pDM_Odm) -{ - u8 index; - struct rtw_adapter *Adapter = pDM_Odm->Adapter; - - struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter); - u32 Power_Index_REG[6] = {0xc90, 0xc91, 0xc92, 0xc98, 0xc99, 0xc9a}; - struct dm_priv *pdmpriv = &pHalData->dmpriv; - for (index = 0; index < 6; index++) - rtl8723au_write8(Adapter, Power_Index_REG[index], - pdmpriv->PowerIndex_backup[index]); -} - -void odm_DynamicTxPower23aWritePowerIndex(struct dm_odm_t *pDM_Odm, - u8 Value) -{ - - u8 index; - u32 Power_Index_REG[6] = {0xc90, 0xc91, 0xc92, 0xc98, 0xc99, 0xc9a}; - - for (index = 0; index < 6; index++) - ODM_Write1Byte(pDM_Odm, Power_Index_REG[index], Value); - -} - -void odm_DynamicTxPower23a(struct dm_odm_t *pDM_Odm) -{ -} - -void odm_DynamicTxPower23a_92C(struct dm_odm_t *pDM_Odm) -{ -} - -void odm_DynamicTxPower23a_92D(struct dm_odm_t *pDM_Odm) -{ -} - /* 3 ============================================================ */ /* 3 RSSI Monitor */ /* 3 ============================================================ */ @@ -1839,16 +1775,6 @@ ConvertTo_dB23a( return dB; } -/* */ -/* 2011/09/22 MH Add for 92D global spin lock utilization. */ -/* */ -void -odm_GlobalAdapterCheck( - void - ) -{ -} /* odm_GlobalAdapterCheck */ - /* */ /* Description: */ /*Set Single/Dual Antenna default setting for products that do not do detection in advance. */ diff --git a/drivers/staging/rtl8723au/include/rtl8723a_dm.h b/drivers/staging/rtl8723au/include/rtl8723a_dm.h index 47e887f5bb26..ccac672c9c04 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_dm.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_dm.h @@ -59,8 +59,6 @@ struct dm_priv #endif /* for High Power */ - u8 bDynamicTxPowerEnable; - u8 LastDTPLvl; u8 DynamicTxHighPowerLvl;/* Add by Jacken Tx Power Control for Near/Far Range 2008/03/06 */ /* for tx power tracking */