staging: rtl8723au: Fold rtl8723au_set_queue_pipe_mapping into rtl8723au_chip_configure()
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sun, 30 Nov 2014 21:05:00 +0000 (16:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Dec 2014 00:40:00 +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/usb_ops.h
drivers/staging/rtl8723au/os_dep/usb_intf.c

index 027b42a9087ea5676eea2abd54e5f1128152cde2..b8d5040798f4b3e27fe4ac6bcd7e67c1bc8b343a 100644 (file)
@@ -60,33 +60,22 @@ _ConfigChipOutEP(struct rtw_adapter *pAdapter, u8 NumOutPipe)
           (u32)NumOutPipe, (u32)pHalData->OutEpNumber)); */
 }
 
-static bool rtl8723au_set_queue_pipe_mapping(struct rtw_adapter *pAdapter,
-                                            u8 NumInPipe, u8 NumOutPipe)
+bool rtl8723au_chip_configure(struct rtw_adapter *padapter)
 {
-       struct hal_data_8723a *pHalData = GET_HAL_DATA(pAdapter);
-       bool result = false;
+       struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
+       struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
+       u8 NumInPipe = pdvobjpriv->RtNumInPipes;
+       u8 NumOutPipe = pdvobjpriv->RtNumOutPipes;
 
-       _ConfigChipOutEP(pAdapter, NumOutPipe);
+       _ConfigChipOutEP(padapter, NumOutPipe);
 
        /*  Normal chip with one IN and one OUT doesn't have interrupt IN EP. */
        if (pHalData->OutEpNumber == 1) {
                if (NumInPipe != 1)
-                       return result;
+                       return false;
        }
 
-       result = Hal_MappingOutPipe23a(pAdapter, NumOutPipe);
-
-       return result;
-}
-
-void rtl8723au_chip_configure(struct rtw_adapter *padapter)
-{
-       struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
-       struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
-
-       rtl8723au_set_queue_pipe_mapping(padapter,
-                                        pdvobjpriv->RtNumInPipes,
-                                        pdvobjpriv->RtNumOutPipes);
+       return Hal_MappingOutPipe23a(padapter, NumOutPipe);
 }
 
 static int _InitPowerOn(struct rtw_adapter *padapter)
index ade8bc71572a922a724853e3124424d9e5fe9c17..ff11e13b24a8e610440e8512298c0cc7b85569c0 100644 (file)
@@ -63,6 +63,6 @@ static inline void rtw_reset_continual_urb_error(struct dvobj_priv *dvobj)
        atomic_set(&dvobj->continual_urb_error, 0);
 }
 
-void rtl8723au_chip_configure(struct rtw_adapter *padapter);
+bool rtl8723au_chip_configure(struct rtw_adapter *padapter);
 
 #endif /* __USB_OPS_H_ */
index 92ab66747704400a375e8b3f7f7d1a39787e1923..373a617ace549a6b7c385297b16cc5c2f547cd2f 100644 (file)
@@ -530,7 +530,8 @@ static struct rtw_adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
        rtl8723a_read_chip_version(padapter);
 
        /* step usb endpoint mapping */
-       rtl8723au_chip_configure(padapter);
+       if (!rtl8723au_chip_configure(padapter))
+               goto free_hal_data;
 
        /* step read efuse/eeprom data and get mac_addr */
        rtl8723a_read_adapter_info(padapter);