mirror of https://gitee.com/openkylin/linux.git
staging: rtl8723au: Fold rtl8723au_set_queue_pipe_mapping into rtl8723au_chip_configure()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ec28fb8948
commit
4a293154a9
|
@ -60,33 +60,22 @@ _ConfigChipOutEP(struct rtw_adapter *pAdapter, u8 NumOutPipe)
|
||||||
(u32)NumOutPipe, (u32)pHalData->OutEpNumber)); */
|
(u32)NumOutPipe, (u32)pHalData->OutEpNumber)); */
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool rtl8723au_set_queue_pipe_mapping(struct rtw_adapter *pAdapter,
|
bool rtl8723au_chip_configure(struct rtw_adapter *padapter)
|
||||||
u8 NumInPipe, u8 NumOutPipe)
|
|
||||||
{
|
{
|
||||||
struct hal_data_8723a *pHalData = GET_HAL_DATA(pAdapter);
|
struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
|
||||||
bool result = false;
|
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. */
|
/* Normal chip with one IN and one OUT doesn't have interrupt IN EP. */
|
||||||
if (pHalData->OutEpNumber == 1) {
|
if (pHalData->OutEpNumber == 1) {
|
||||||
if (NumInPipe != 1)
|
if (NumInPipe != 1)
|
||||||
return result;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = Hal_MappingOutPipe23a(pAdapter, NumOutPipe);
|
return 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _InitPowerOn(struct rtw_adapter *padapter)
|
static int _InitPowerOn(struct rtw_adapter *padapter)
|
||||||
|
|
|
@ -63,6 +63,6 @@ static inline void rtw_reset_continual_urb_error(struct dvobj_priv *dvobj)
|
||||||
atomic_set(&dvobj->continual_urb_error, 0);
|
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_ */
|
#endif /* __USB_OPS_H_ */
|
||||||
|
|
|
@ -530,7 +530,8 @@ static struct rtw_adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
|
||||||
rtl8723a_read_chip_version(padapter);
|
rtl8723a_read_chip_version(padapter);
|
||||||
|
|
||||||
/* step usb endpoint mapping */
|
/* 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 */
|
/* step read efuse/eeprom data and get mac_addr */
|
||||||
rtl8723a_read_adapter_info(padapter);
|
rtl8723a_read_adapter_info(padapter);
|
||||||
|
|
Loading…
Reference in New Issue