r8169: improve configuring RxConfig register
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 26 Apr 2020 21:36:56 +0000 (23:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Apr 2020 18:48:47 +0000 (11:48 -0700)
commit10478283f210e64ac682083083437dd5f89b7c4a
tree5abeb25dcde655c95f0ead680dd9b7493830a22d
parent975e8505e6701c77b43bcdd5acc48d3735063b68
r8169: improve configuring RxConfig register

Two bits in RxConfig are controlled by the following dev->feature's:
- NETIF_F_RXALL
- NETIF_F_HW_VLAN_CTAG_RX (since RTL8125)

We have to take care that RxConfig gets fully configured in
rtl_hw_start() after e.g. resume from hibernation. Therefore:

- Factor out setting the feature-controlled RxConfig bits to a new
  function rtl_set_rx_config_features() that is called from
  rtl8169_set_features() and rtl_hw_start().
- Don't deal with RX_VLAN_8125 in rtl_init_rxcfg(), it will be set
  by rtl_set_rx_config_features().
- Don't handle NETIF_F_RXALL in rtl_set_rx_mode().

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c