mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
urtwn(4): move duplicate code from urtwn_(r92c/r88e)_dma_init()
to urtwn_dma_init() (noop). Reviewed by: kevlo Approved by: adrian (mentor, implicit) Differential Revision: https://reviews.freebsd.org/D4271
This commit is contained in:
parent
6111807106
commit
aacc26e329
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=291695
@ -2748,8 +2748,23 @@ urtwn_load_firmware(struct urtwn_softc *sc)
|
||||
static __inline int
|
||||
urtwn_dma_init(struct urtwn_softc *sc)
|
||||
{
|
||||
int error;
|
||||
|
||||
return sc->sc_dma_init(sc);
|
||||
/* Initialize LLT table. */
|
||||
error = urtwn_llt_init(sc);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
error = sc->sc_dma_init(sc);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
/* Set Tx/Rx transfer page size. */
|
||||
urtwn_write_1(sc, R92C_PBP,
|
||||
SM(R92C_PBP_PSRX, R92C_PBP_128) |
|
||||
SM(R92C_PBP_PSTX, R92C_PBP_128));
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -2757,12 +2772,6 @@ urtwn_r92c_dma_init(struct urtwn_softc *sc)
|
||||
{
|
||||
int hashq, hasnq, haslq, nqueues, nqpages, nrempages;
|
||||
uint32_t reg;
|
||||
int error;
|
||||
|
||||
/* Initialize LLT table. */
|
||||
error = urtwn_llt_init(sc);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
/* Get Tx queues to USB endpoints mapping. */
|
||||
hashq = hasnq = haslq = 0;
|
||||
@ -2825,10 +2834,6 @@ urtwn_r92c_dma_init(struct urtwn_softc *sc)
|
||||
/* Set Tx/Rx transfer page boundary. */
|
||||
urtwn_write_2(sc, R92C_TRXFF_BNDY + 2, 0x27ff);
|
||||
|
||||
/* Set Tx/Rx transfer page size. */
|
||||
urtwn_write_1(sc, R92C_PBP,
|
||||
SM(R92C_PBP_PSRX, R92C_PBP_128) |
|
||||
SM(R92C_PBP_PSTX, R92C_PBP_128));
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -2838,12 +2843,6 @@ urtwn_r88e_dma_init(struct urtwn_softc *sc)
|
||||
struct usb_interface *iface;
|
||||
uint32_t reg;
|
||||
int nqueues;
|
||||
int error;
|
||||
|
||||
/* Initialize LLT table. */
|
||||
error = urtwn_llt_init(sc);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
/* Get Tx queues to USB endpoints mapping. */
|
||||
iface = usbd_get_iface(sc->sc_udev, 0);
|
||||
@ -2875,11 +2874,6 @@ urtwn_r88e_dma_init(struct urtwn_softc *sc)
|
||||
/* Set Tx/Rx transfer page boundary. */
|
||||
urtwn_write_2(sc, R92C_TRXFF_BNDY + 2, 0x23ff);
|
||||
|
||||
/* Set Tx/Rx transfer page size. */
|
||||
urtwn_write_1(sc, R92C_PBP,
|
||||
SM(R92C_PBP_PSRX, R92C_PBP_128) |
|
||||
SM(R92C_PBP_PSTX, R92C_PBP_128));
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user