2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 14:43:58 +08:00

staging: rtl8723au: Use a local variable to state if MAC was already powered on

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jes Sorensen 2014-11-30 16:05:07 -05:00 committed by Greg Kroah-Hartman
parent b024793188
commit 4405ef40f2
2 changed files with 8 additions and 9 deletions

View File

@ -500,12 +500,13 @@ enum rt_rf_power_state RfOnOffDetect23a(struct rtw_adapter *pAdapter)
int rtl8723au_hal_init(struct rtw_adapter *Adapter) int rtl8723au_hal_init(struct rtw_adapter *Adapter)
{ {
u8 val8 = 0;
u32 boundary;
int status = _SUCCESS;
struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter); struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter);
struct pwrctrl_priv *pwrctrlpriv = &Adapter->pwrctrlpriv; struct pwrctrl_priv *pwrctrlpriv = &Adapter->pwrctrlpriv;
struct registry_priv *pregistrypriv = &Adapter->registrypriv; struct registry_priv *pregistrypriv = &Adapter->registrypriv;
u8 val8 = 0;
u32 boundary;
int status = _SUCCESS;
bool mac_on;
unsigned long init_start_time = jiffies; unsigned long init_start_time = jiffies;
@ -535,9 +536,9 @@ int rtl8723au_hal_init(struct rtw_adapter *Adapter)
/* 0x100 value of first mac is 0xEA while 0x100 value of secondary /* 0x100 value of first mac is 0xEA while 0x100 value of secondary
is 0x00 */ is 0x00 */
if (val8 == 0xEA) { if (val8 == 0xEA) {
pHalData->bMACFuncEnable = false; mac_on = false;
} else { } else {
pHalData->bMACFuncEnable = true; mac_on = true;
RT_TRACE(_module_hci_hal_init_c_, _drv_info_, RT_TRACE(_module_hci_hal_init_c_, _drv_info_,
("%s: MAC has already power on\n", __func__)); ("%s: MAC has already power on\n", __func__));
} }
@ -556,7 +557,7 @@ int rtl8723au_hal_init(struct rtw_adapter *Adapter)
boundary = WMM_NORMAL_TX_PAGE_BOUNDARY; boundary = WMM_NORMAL_TX_PAGE_BOUNDARY;
} }
if (!pHalData->bMACFuncEnable) { if (!mac_on) {
status = InitLLTTable23a(Adapter, boundary); status = InitLLTTable23a(Adapter, boundary);
if (status == _FAIL) { if (status == _FAIL) {
RT_TRACE(_module_hci_hal_init_c_, _drv_err_, RT_TRACE(_module_hci_hal_init_c_, _drv_err_,
@ -642,7 +643,7 @@ int rtl8723au_hal_init(struct rtw_adapter *Adapter)
pHalData->RfRegChnlVal[0] = PHY_QueryRFReg(Adapter, (enum RF_RADIO_PATH)0, RF_CHNLBW, bRFRegOffsetMask); pHalData->RfRegChnlVal[0] = PHY_QueryRFReg(Adapter, (enum RF_RADIO_PATH)0, RF_CHNLBW, bRFRegOffsetMask);
pHalData->RfRegChnlVal[1] = PHY_QueryRFReg(Adapter, (enum RF_RADIO_PATH)1, RF_CHNLBW, bRFRegOffsetMask); pHalData->RfRegChnlVal[1] = PHY_QueryRFReg(Adapter, (enum RF_RADIO_PATH)1, RF_CHNLBW, bRFRegOffsetMask);
if (!pHalData->bMACFuncEnable) { if (!mac_on) {
_InitQueueReservedPage(Adapter); _InitQueueReservedPage(Adapter);
_InitTxBufferBoundary(Adapter); _InitTxBufferBoundary(Adapter);
} }

View File

@ -402,8 +402,6 @@ struct hal_data_8723a {
* 2011/02/23 MH Add for 8723 mylti function definition. The define should be moved to an */ * 2011/02/23 MH Add for 8723 mylti function definition. The define should be moved to an */
/* independent file in the future. */ /* independent file in the future. */
bool bMACFuncEnable;
/* Interrupt related register information. */ /* Interrupt related register information. */
u32 IntArray[2]; u32 IntArray[2];
u32 IntrMask[2]; u32 IntrMask[2];