Commit 7399c2c3 authored by Ivan Safonov's avatar Ivan Safonov Committed by Greg Kroah-Hartman

staging: r8188eu: remove ODM_CmnInfoUpdate function

This function does not improve code readability.
Signed-off-by: default avatarIvan Safonov <insafonov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e81f6f1
...@@ -385,46 +385,6 @@ void ODM_CmnInfoPtrArrayHook(struct odm_dm_struct *pDM_Odm, enum odm_common_info ...@@ -385,46 +385,6 @@ void ODM_CmnInfoPtrArrayHook(struct odm_dm_struct *pDM_Odm, enum odm_common_info
} }
} }
/* Update Band/CHannel/.. The values are dynamic but non-per-packet. */
void ODM_CmnInfoUpdate(struct odm_dm_struct *pDM_Odm, u32 CmnInfo, u64 Value)
{
/* */
/* This init variable may be changed in run time. */
/* */
switch (CmnInfo) {
case ODM_CMNINFO_ABILITY:
pDM_Odm->SupportAbility = (u32)Value;
break;
case ODM_CMNINFO_RF_TYPE:
pDM_Odm->RFType = (u8)Value;
break;
case ODM_CMNINFO_WIFI_DIRECT:
pDM_Odm->bWIFI_Direct = (bool)Value;
break;
case ODM_CMNINFO_WIFI_DISPLAY:
pDM_Odm->bWIFI_Display = (bool)Value;
break;
case ODM_CMNINFO_LINK:
pDM_Odm->bLinked = (bool)Value;
break;
case ODM_CMNINFO_RSSI_MIN:
pDM_Odm->RSSI_Min = (u8)Value;
break;
case ODM_CMNINFO_DBG_COMP:
pDM_Odm->DebugComponents = Value;
break;
case ODM_CMNINFO_DBG_LEVEL:
pDM_Odm->DebugLevel = (u32)Value;
break;
case ODM_CMNINFO_RA_THRESHOLD_HIGH:
pDM_Odm->RateAdaptive.HighRSSIThresh = (u8)Value;
break;
case ODM_CMNINFO_RA_THRESHOLD_LOW:
pDM_Odm->RateAdaptive.LowRSSIThresh = (u8)Value;
break;
}
}
void odm_CommonInfoSelfInit(struct odm_dm_struct *pDM_Odm) void odm_CommonInfoSelfInit(struct odm_dm_struct *pDM_Odm)
{ {
struct adapter *adapter = pDM_Odm->Adapter; struct adapter *adapter = pDM_Odm->Adapter;
...@@ -1179,8 +1139,7 @@ void odm_RSSIMonitorCheckCE(struct odm_dm_struct *pDM_Odm) ...@@ -1179,8 +1139,7 @@ void odm_RSSIMonitorCheckCE(struct odm_dm_struct *pDM_Odm)
pdmpriv->EntryMinUndecoratedSmoothedPWDB = 0; pdmpriv->EntryMinUndecoratedSmoothedPWDB = 0;
FindMinimumRSSI(Adapter); FindMinimumRSSI(Adapter);
ODM_CmnInfoUpdate(&pHalData->odmpriv, ODM_CMNINFO_RSSI_MIN, pHalData->odmpriv.RSSI_Min = pdmpriv->MinUndecoratedPWDBForDM;
pdmpriv->MinUndecoratedPWDBForDM);
} }
/* 3============================================================ */ /* 3============================================================ */
......
...@@ -67,18 +67,18 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter) ...@@ -67,18 +67,18 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter)
if (hal_data->rf_type == RF_1T1R) if (hal_data->rf_type == RF_1T1R)
ODM_CmnInfoUpdate(dm_odm, ODM_CMNINFO_RF_TYPE, ODM_1T1R); dm_odm->RFType = ODM_1T1R;
else if (hal_data->rf_type == RF_2T2R) else if (hal_data->rf_type == RF_2T2R)
ODM_CmnInfoUpdate(dm_odm, ODM_CMNINFO_RF_TYPE, ODM_2T2R); dm_odm->RFType = ODM_2T2R;
else if (hal_data->rf_type == RF_1T2R) else if (hal_data->rf_type == RF_1T2R)
ODM_CmnInfoUpdate(dm_odm, ODM_CMNINFO_RF_TYPE, ODM_1T2R); dm_odm->RFType = ODM_1T2R;
ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_RF_ANTENNA_TYPE, hal_data->TRxAntDivType); ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_RF_ANTENNA_TYPE, hal_data->TRxAntDivType);
pdmpriv->InitODMFlag = ODM_RF_CALIBRATION | pdmpriv->InitODMFlag = ODM_RF_CALIBRATION |
ODM_RF_TX_PWR_TRACK; ODM_RF_TX_PWR_TRACK;
ODM_CmnInfoUpdate(dm_odm, ODM_CMNINFO_ABILITY, pdmpriv->InitODMFlag); dm_odm->SupportAbility = pdmpriv->InitODMFlag;
} }
static void Update_ODM_ComInfo_88E(struct adapter *Adapter) static void Update_ODM_ComInfo_88E(struct adapter *Adapter)
...@@ -109,7 +109,7 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter) ...@@ -109,7 +109,7 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter)
ODM_RF_TX_PWR_TRACK; ODM_RF_TX_PWR_TRACK;
} }
ODM_CmnInfoUpdate(dm_odm, ODM_CMNINFO_ABILITY, pdmpriv->InitODMFlag); dm_odm->SupportAbility = pdmpriv->InitODMFlag;
ODM_CmnInfoHook(dm_odm, ODM_CMNINFO_TX_UNI, &(Adapter->xmitpriv.tx_bytes)); ODM_CmnInfoHook(dm_odm, ODM_CMNINFO_TX_UNI, &(Adapter->xmitpriv.tx_bytes));
ODM_CmnInfoHook(dm_odm, ODM_CMNINFO_RX_UNI, &(Adapter->recvpriv.rx_bytes)); ODM_CmnInfoHook(dm_odm, ODM_CMNINFO_RX_UNI, &(Adapter->recvpriv.rx_bytes));
...@@ -166,7 +166,7 @@ void rtw_hal_dm_watchdog(struct adapter *Adapter) ...@@ -166,7 +166,7 @@ void rtw_hal_dm_watchdog(struct adapter *Adapter)
bLinked = true; bLinked = true;
} }
ODM_CmnInfoUpdate(&hal_data->odmpriv, ODM_CMNINFO_LINK, bLinked); hal_data->odmpriv.bLinked = bLinked;
ODM_DMWatchdog(&hal_data->odmpriv); ODM_DMWatchdog(&hal_data->odmpriv);
skip_dm: skip_dm:
/* Check GPIO to determine current RF on/off and Pbc status. */ /* Check GPIO to determine current RF on/off and Pbc status. */
......
...@@ -165,10 +165,10 @@ void rtw_hal_set_odm_var(struct adapter *Adapter, enum hal_odm_variable eVariabl ...@@ -165,10 +165,10 @@ void rtw_hal_set_odm_var(struct adapter *Adapter, enum hal_odm_variable eVariabl
} }
break; break;
case HAL_ODM_P2P_STATE: case HAL_ODM_P2P_STATE:
ODM_CmnInfoUpdate(podmpriv, ODM_CMNINFO_WIFI_DIRECT, bSet); podmpriv->bWIFI_Direct = bSet;
break; break;
case HAL_ODM_WIFI_DISPLAY_STATE: case HAL_ODM_WIFI_DISPLAY_STATE:
ODM_CmnInfoUpdate(podmpriv, ODM_CMNINFO_WIFI_DISPLAY, bSet); podmpriv->bWIFI_Display = bSet;
break; break;
default: default:
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment