From: Jes Sorensen Date: Mon, 21 Jul 2014 09:24:59 +0000 (+0200) Subject: staging: rtl8723au: Eliminate ODM_CMNINFO_SCAN related code X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1a573d2bbeb379aa1fb3cd20be839a23a43d8a3e;p=linux-beck.git staging: rtl8723au: Eliminate ODM_CMNINFO_SCAN related code 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 ac9be2190bb2..eadf2ed8023c 100644 --- a/drivers/staging/rtl8723au/hal/odm.c +++ b/drivers/staging/rtl8723au/hal/odm.c @@ -179,7 +179,7 @@ void odm_FalseAlarmCounterStatistics23a(struct dm_odm_t *pDM_Odm); void odm_DIG23aInit(struct dm_odm_t *pDM_Odm); -void odm_DIG23a(struct dm_odm_t *pDM_Odm); +void odm_DIG23a(struct rtw_adapter *adapter); void odm_CCKPacketDetectionThresh23a(struct dm_odm_t *pDM_Odm); /* END---------------DIG--------------------------- */ @@ -287,8 +287,9 @@ void ODM23a_DMInit(struct dm_odm_t *pDM_Odm) /* 2011/09/20 MH This is the entry pointer for all team to execute HW out source DM. */ /* You can not add any dummy function here, be care, you can only use DM structure */ /* to perform any new ODM_DM. */ -void ODM_DMWatchdog23a(struct hal_data_8723a *pHalData) +void ODM_DMWatchdog23a(struct rtw_adapter *adapter) { + struct hal_data_8723a *pHalData = GET_HAL_DATA(adapter); struct dm_odm_t *pDM_Odm = &pHalData->odmpriv; /* 2012.05.03 Luke: For all IC series */ @@ -307,7 +308,7 @@ void ODM_DMWatchdog23a(struct hal_data_8723a *pHalData) ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("---Step2: 8723AS is in LPS mode\n")); odm_DIG23abyRSSI_LPS(pDM_Odm); } else { - odm_DIG23a(pDM_Odm); + odm_DIG23a(adapter); } odm_CCKPacketDetectionThresh23a(pDM_Odm); @@ -417,9 +418,6 @@ void ODM23a_CmnInfoHook(struct dm_odm_t *pDM_Odm, /* Hook call by reference pointer. */ switch (CmnInfo) { /* Dynamic call by reference pointer. */ - case ODM_CMNINFO_SCAN: - pDM_Odm->pbScanInProcess = (bool *)pValue; - break; case ODM_CMNINFO_POWER_SAVING: pDM_Odm->pbPowerSaving = (bool *)pValue; break; @@ -544,7 +542,6 @@ void odm_CmnInfoHook_Debug23a(struct dm_odm_t *pDM_Odm) { ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("odm_CmnInfoHook_Debug23a ==>\n")); - ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pbScanInProcess =%d\n", *(pDM_Odm->pbScanInProcess))); ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pbPowerSaving =%d\n", *(pDM_Odm->pbPowerSaving))); } @@ -655,9 +652,10 @@ void odm_DIG23aInit(struct dm_odm_t *pDM_Odm) pDM_DigTable->bMediaConnect_1 = false; } -void odm_DIG23a(struct dm_odm_t *pDM_Odm) +void odm_DIG23a(struct rtw_adapter *adapter) { - + struct hal_data_8723a *pHalData = GET_HAL_DATA(adapter); + struct dm_odm_t *pDM_Odm = &pHalData->odmpriv; struct dig_t *pDM_DigTable = &pDM_Odm->DM_DigTable; struct false_alarm_stats *pFalseAlmCnt = &pDM_Odm->FalseAlmCnt; u8 DIG_Dynamic_MIN; @@ -674,7 +672,7 @@ void odm_DIG23a(struct dm_odm_t *pDM_Odm) return; } - if (*(pDM_Odm->pbScanInProcess)) { + if (adapter->mlmepriv.bScanInProcess) { ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG23a() Return: In Scan Progress \n")); return; } diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_dm.c b/drivers/staging/rtl8723au/hal/rtl8723a_dm.c index d1e423192309..22dec5ccffe8 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_dm.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_dm.c @@ -133,7 +133,6 @@ static void Init_ODM_ComInfo_8723a(struct rtw_adapter *Adapter) static void Update_ODM_ComInfo_8723a(struct rtw_adapter *Adapter) { - struct mlme_priv *pmlmepriv = &Adapter->mlmepriv; struct pwrctrl_priv *pwrctrlpriv = &Adapter->pwrctrlpriv; struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter); struct dm_odm_t *pDM_Odm = &pHalData->odmpriv; @@ -152,7 +151,6 @@ static void Update_ODM_ComInfo_8723a(struct rtw_adapter *Adapter) /* Pointer reference */ rtl8723a_odm_support_ability_set(Adapter, DYNAMIC_ALL_FUNC_ENABLE); - ODM23a_CmnInfoHook(pDM_Odm, ODM_CMNINFO_SCAN, &pmlmepriv->bScanInProcess); ODM23a_CmnInfoHook(pDM_Odm, ODM_CMNINFO_POWER_SAVING, &pwrctrlpriv->bpower_saving); @@ -210,7 +208,7 @@ rtl8723a_HalDmWatchDog( bLinked = true; ODM_CmnInfoUpdate23a(&pHalData->odmpriv, ODM_CMNINFO_LINK, bLinked); - ODM_DMWatchdog23a(pHalData); + ODM_DMWatchdog23a(Adapter); skip_dm: diff --git a/drivers/staging/rtl8723au/include/odm.h b/drivers/staging/rtl8723au/include/odm.h index 022387b23006..300f8fbd446f 100644 --- a/drivers/staging/rtl8723au/include/odm.h +++ b/drivers/staging/rtl8723au/include/odm.h @@ -319,7 +319,6 @@ enum odm_cmninfo { /* */ /* Dynamic value: */ /* */ - ODM_CMNINFO_SCAN, ODM_CMNINFO_POWER_SAVING, ODM_CMNINFO_MP_MODE, @@ -685,7 +684,6 @@ struct dm_odm_t { struct rtw_adapter *PADAPTER_temp; /* Common info for Status */ - bool *pbScanInProcess; bool *pbPowerSaving; /* POINTER REFERENCE----------- */ /* */ @@ -982,7 +980,7 @@ u32 ODM_Get_Rate_Bitmap23a(struct hal_data_8723a *pHalData, u32 macid, u32 ra_ma void ODM23a_DMInit(struct dm_odm_t *pDM_Odm); -void ODM_DMWatchdog23a(struct hal_data_8723a *pHalData); +void ODM_DMWatchdog23a(struct rtw_adapter *adapter); void ODM_CmnInfoInit23a(struct dm_odm_t *pDM_Odm, enum odm_cmninfo CmnInfo, u32 Value);