diff options
author | Marek Vasut <marek.vasut+renesas@gmail.com> | 2020-04-12 22:35:12 +0300 |
---|---|---|
committer | marex <marex@desktop.lan> | 2020-05-01 13:35:21 +0300 |
commit | 89f3facffb8b35f45d405716dce63f6bc944a082 (patch) | |
tree | 8105e2ec997e67c9f686fe0c1f2b584054bd7bab /drivers/net/rtl8139.c | |
parent | 198e6b571b58de54803a92743970c8f5dea77782 (diff) | |
download | u-boot-89f3facffb8b35f45d405716dce63f6bc944a082.tar.xz |
net: rtl8139: Minor cleanup of set_rx_mode()
Rename the function to rtl8139_set_rx_mode(), use unsigned variables
where applicable and inline mc_filter[] values. No functional chanage.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net/rtl8139.c')
-rw-r--r-- | drivers/net/rtl8139.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c index 7a2829a163..4dfb709fa9 100644 --- a/drivers/net/rtl8139.c +++ b/drivers/net/rtl8139.c @@ -357,19 +357,17 @@ static const unsigned int rtl8139_rx_config = (RX_FIFO_THRESH << 13) | (RX_DMA_BURST << 8); -static void set_rx_mode(struct eth_device *dev) { - unsigned int mc_filter[2]; - int rx_mode; +static void rtl8139_set_rx_mode(struct eth_device *dev) +{ /* !IFF_PROMISC */ - rx_mode = RTL_REG_RXCONFIG_ACCEPTBROADCAST | - RTL_REG_RXCONFIG_ACCEPTMULTICAST | - RTL_REG_RXCONFIG_ACCEPTMYPHYS; - mc_filter[1] = mc_filter[0] = 0xffffffff; + unsigned int rx_mode = RTL_REG_RXCONFIG_ACCEPTBROADCAST | + RTL_REG_RXCONFIG_ACCEPTMULTICAST | + RTL_REG_RXCONFIG_ACCEPTMYPHYS; outl(rtl8139_rx_config | rx_mode, ioaddr + RTL_REG_RXCONFIG); - outl(mc_filter[0], ioaddr + RTL_REG_MAR0 + 0); - outl(mc_filter[1], ioaddr + RTL_REG_MAR0 + 4); + outl(0xffffffff, ioaddr + RTL_REG_MAR0 + 0); + outl(0xffffffff, ioaddr + RTL_REG_MAR0 + 4); } static void rtl_reset(struct eth_device *dev) @@ -425,8 +423,7 @@ static void rtl_reset(struct eth_device *dev) /* Start the chip's Tx and Rx process. */ outl(0, ioaddr + RTL_REG_RXMISSED); - /* set_rx_mode */ - set_rx_mode(dev); + rtl8139_set_rx_mode(dev); /* Disable all known interrupts by setting the interrupt mask. */ outw(0, ioaddr + RTL_REG_INTRMASK); |