r8169: move rtl_wol_enable_rx() and rtl_prepare_power_down()
There is no functional change. Moving these two functions for following patch "r8169: fix dmar pte write access is not set error". Signed-off-by: Chunhao Lin <hau@realtek.com> Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e71460d446
commit
ad425666a1
@ -2210,28 +2210,6 @@ static int rtl_set_mac_address(struct net_device *dev, void *p)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rtl_wol_enable_rx(struct rtl8169_private *tp)
|
|
||||||
{
|
|
||||||
if (tp->mac_version >= RTL_GIGA_MAC_VER_25)
|
|
||||||
RTL_W32(tp, RxConfig, RTL_R32(tp, RxConfig) |
|
|
||||||
AcceptBroadcast | AcceptMulticast | AcceptMyPhys);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void rtl_prepare_power_down(struct rtl8169_private *tp)
|
|
||||||
{
|
|
||||||
if (tp->dash_type != RTL_DASH_NONE)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (tp->mac_version == RTL_GIGA_MAC_VER_32 ||
|
|
||||||
tp->mac_version == RTL_GIGA_MAC_VER_33)
|
|
||||||
rtl_ephy_write(tp, 0x19, 0xff64);
|
|
||||||
|
|
||||||
if (device_may_wakeup(tp_to_dev(tp))) {
|
|
||||||
phy_speed_down(tp->phydev, false);
|
|
||||||
rtl_wol_enable_rx(tp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void rtl_init_rxcfg(struct rtl8169_private *tp)
|
static void rtl_init_rxcfg(struct rtl8169_private *tp)
|
||||||
{
|
{
|
||||||
switch (tp->mac_version) {
|
switch (tp->mac_version) {
|
||||||
@ -2455,6 +2433,28 @@ static void rtl_enable_rxdvgate(struct rtl8169_private *tp)
|
|||||||
rtl_wait_txrx_fifo_empty(tp);
|
rtl_wait_txrx_fifo_empty(tp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void rtl_wol_enable_rx(struct rtl8169_private *tp)
|
||||||
|
{
|
||||||
|
if (tp->mac_version >= RTL_GIGA_MAC_VER_25)
|
||||||
|
RTL_W32(tp, RxConfig, RTL_R32(tp, RxConfig) |
|
||||||
|
AcceptBroadcast | AcceptMulticast | AcceptMyPhys);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void rtl_prepare_power_down(struct rtl8169_private *tp)
|
||||||
|
{
|
||||||
|
if (tp->dash_type != RTL_DASH_NONE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (tp->mac_version == RTL_GIGA_MAC_VER_32 ||
|
||||||
|
tp->mac_version == RTL_GIGA_MAC_VER_33)
|
||||||
|
rtl_ephy_write(tp, 0x19, 0xff64);
|
||||||
|
|
||||||
|
if (device_may_wakeup(tp_to_dev(tp))) {
|
||||||
|
phy_speed_down(tp->phydev, false);
|
||||||
|
rtl_wol_enable_rx(tp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void rtl_set_tx_config_registers(struct rtl8169_private *tp)
|
static void rtl_set_tx_config_registers(struct rtl8169_private *tp)
|
||||||
{
|
{
|
||||||
u32 val = TX_DMA_BURST << TxDMAShift |
|
u32 val = TX_DMA_BURST << TxDMAShift |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user