staging: r8188eu: process HalUsbSetQueuePipeMapping8188EUsb's return value
authorMartin Kaiser <martin@kaiser.cx>
Sat, 6 Aug 2022 19:55:29 +0000 (21:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Aug 2022 13:17:57 +0000 (15:17 +0200)
At the moment, HalUsbSetQueuePipeMapping8188EUsb returns an error status
to rtl8188eu_interface_configure, where this status is discarded.

Pass the error status from rtl8188eu_interface_configure to
rtw_usb_if1_init and handle it there.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806195540.777390-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/usb_halinit.c
drivers/staging/r8188eu/include/hal_intf.h
drivers/staging/r8188eu/os_dep/usb_intf.c

index ba068e6fd9fb25846bead8b91a388876baa83c6f..839841f90d29808d138498a19b06e5f0db551551 100644 (file)
@@ -42,11 +42,11 @@ static int HalUsbSetQueuePipeMapping8188EUsb(struct adapter *adapt, u8 NumOutPip
        return Hal_MappingOutPipe(adapt, NumOutPipe);
 }
 
-void rtl8188eu_interface_configure(struct adapter *adapt)
+int rtl8188eu_interface_configure(struct adapter *adapt)
 {
        struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(adapt);
 
-       HalUsbSetQueuePipeMapping8188EUsb(adapt, pdvobjpriv->RtNumOutPipes);
+       return HalUsbSetQueuePipeMapping8188EUsb(adapt, pdvobjpriv->RtNumOutPipes);
 }
 
 u32 rtl8188eu_InitPowerOn(struct adapter *adapt)
index 3ed5b7e031cd0364dfeba069ea01e3dfef40b208..fd8e792958ce246d7eb3eb861a38381952277fc4 100644 (file)
@@ -10,7 +10,7 @@
 
 typedef s32 (*c2h_id_filter)(u8 id);
 
-void rtl8188eu_interface_configure(struct adapter *adapt);
+int rtl8188eu_interface_configure(struct adapter *adapt);
 int ReadAdapterInfo8188EU(struct adapter *Adapter);
 void rtl8188eu_init_default_value(struct adapter *adapt);
 void rtl8188e_SetHalODMVar(struct adapter *Adapter, void *pValue1, bool bSet);
index db91f72dd40f225efc8ead8b6d8c248e74063d3f..2b330104a55d0945c6ead7dc1f61f90e3db97095 100644 (file)
@@ -330,7 +330,9 @@ static int rtw_usb_if1_init(struct dvobj_priv *dvobj, struct usb_interface *pusb
        rtl8188e_read_chip_version(padapter);
 
        /* step usb endpoint mapping */
-       rtl8188eu_interface_configure(padapter);
+       ret = rtl8188eu_interface_configure(padapter);
+       if (ret)
+               goto handle_dualmac;
 
        /* step read efuse/eeprom data and get mac_addr */
        ret = ReadAdapterInfo8188EU(padapter);