]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: rtl8723au: Use a local variable to state if MAC was already powered on
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sun, 30 Nov 2014 21:05:07 +0000 (16:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Dec 2014 00:40:01 +0000 (16:40 -0800)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/hal/usb_halinit.c
drivers/staging/rtl8723au/include/rtl8723a_hal.h

index 4cfa2f765c9fc42d8cdbcdf25b9e1ab14fa12e17..c23bd48f11e17af8765235f0ebea8cec6229f866 100644 (file)
@@ -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);
        }
index 5a70f2fd3eadb503b2f42c770e1c456a2df02f78..49f745345376ca3040cc7132438272c42f91534c 100644 (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 */
        /*  independent file in the future. */
 
-       bool                            bMACFuncEnable;
-
        /*  Interrupt related register information. */
        u32     IntArray[2];
        u32     IntrMask[2];