diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2014-11-30 16:05:07 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-12-02 16:40:01 -0800 |
commit | 4405ef40f2c2f5fbd266dcf117f7747b63cdef08 (patch) | |
tree | 0dba15ee741f73568bef4ff9bba95f2184e7a571 /drivers/staging/rtl8723au | |
parent | b024793188002b9eed452b5f6a04d45003ed5772 (diff) |
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>
Diffstat (limited to 'drivers/staging/rtl8723au')
-rw-r--r-- | drivers/staging/rtl8723au/hal/usb_halinit.c | 15 | ||||
-rw-r--r-- | drivers/staging/rtl8723au/include/rtl8723a_hal.h | 2 |
2 files changed, 8 insertions, 9 deletions
diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c b/drivers/staging/rtl8723au/hal/usb_halinit.c index 4cfa2f765c9f..c23bd48f11e1 100644 --- a/drivers/staging/rtl8723au/hal/usb_halinit.c +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c @@ -500,12 +500,13 @@ enum rt_rf_power_state RfOnOffDetect23a(struct rtw_adapter *pAdapter) 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 pwrctrl_priv *pwrctrlpriv = &Adapter->pwrctrlpriv; struct registry_priv *pregistrypriv = &Adapter->registrypriv; + u8 val8 = 0; + u32 boundary; + int status = _SUCCESS; + bool mac_on; 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 is 0x00 */ if (val8 == 0xEA) { - pHalData->bMACFuncEnable = false; + mac_on = false; } else { - pHalData->bMACFuncEnable = true; + mac_on = true; RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("%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; } - if (!pHalData->bMACFuncEnable) { + if (!mac_on) { status = InitLLTTable23a(Adapter, boundary); if (status == _FAIL) { 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[1] = PHY_QueryRFReg(Adapter, (enum RF_RADIO_PATH)1, RF_CHNLBW, bRFRegOffsetMask); - if (!pHalData->bMACFuncEnable) { + if (!mac_on) { _InitQueueReservedPage(Adapter); _InitTxBufferBoundary(Adapter); } diff --git a/drivers/staging/rtl8723au/include/rtl8723a_hal.h b/drivers/staging/rtl8723au/include/rtl8723a_hal.h index 5a70f2fd3ead..49f745345376 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_hal.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_hal.h @@ -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 */ /* independent file in the future. */ - bool bMACFuncEnable; - /* Interrupt related register information. */ u32 IntArray[2]; u32 IntrMask[2]; |