Lines Matching +full:mac +full:- +full:wol
1 // SPDX-License-Identifier: GPL-2.0
60 struct ethtool_wolinfo *wol) in at803x_set_wol() argument
64 if (wol->wolopts & WAKE_MAGIC) { in at803x_set_wol()
65 struct net_device *ndev = phydev->attached_dev; in at803x_set_wol()
66 const u8 *mac; in at803x_set_wol() local
75 return -ENODEV; in at803x_set_wol()
77 mac = (const u8 *)ndev->dev_addr; in at803x_set_wol()
79 if (!is_valid_ether_addr(mac)) in at803x_set_wol()
80 return -EINVAL; in at803x_set_wol()
84 mac[(i * 2) + 1] | (mac[(i * 2)] << 8)); in at803x_set_wol()
86 /* Enable WOL interrupt */ in at803x_set_wol()
91 /* Disable WOL interrupt */ in at803x_set_wol()
97 /* Clear WOL status */ in at803x_set_wol()
102 /* Check if there are other interrupts except for WOL triggered when PHY is in at803x_set_wol()
119 struct ethtool_wolinfo *wol) in at803x_get_wol() argument
123 wol->supported = WAKE_MAGIC; in at803x_get_wol()
124 wol->wolopts = 0; in at803x_get_wol()
131 wol->wolopts |= WAKE_MAGIC; in at803x_get_wol()
152 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { in at803x_config_intr()
210 /* Read the AT8035 PHY-Specific Status register, which indicates the in at803x_read_specific_status()
230 phydev->speed = SPEED_10; in at803x_read_specific_status()
233 phydev->speed = SPEED_100; in at803x_read_specific_status()
236 phydev->speed = SPEED_1000; in at803x_read_specific_status()
239 phydev->speed = SPEED_2500; in at803x_read_specific_status()
243 phydev->duplex = DUPLEX_FULL; in at803x_read_specific_status()
245 phydev->duplex = DUPLEX_HALF; in at803x_read_specific_status()
248 phydev->mdix = ETH_TP_MDI_X; in at803x_read_specific_status()
250 phydev->mdix = ETH_TP_MDI; in at803x_read_specific_status()
254 phydev->mdix_ctrl = ETH_TP_MDI; in at803x_read_specific_status()
257 phydev->mdix_ctrl = ETH_TP_MDI_X; in at803x_read_specific_status()
260 phydev->mdix_ctrl = ETH_TP_MDI_AUTO; in at803x_read_specific_status()
297 ret = at803x_config_mdix(phydev, phydev->mdix_ctrl); in at803x_prepare_config_aneg()
318 int err, old_link = phydev->link; in at803x_read_status()
326 if (phydev->autoneg == AUTONEG_ENABLE && old_link && phydev->link) in at803x_read_status()
329 phydev->speed = SPEED_UNKNOWN; in at803x_read_status()
330 phydev->duplex = DUPLEX_UNKNOWN; in at803x_read_status()
331 phydev->pause = 0; in at803x_read_status()
332 phydev->asym_pause = 0; in at803x_read_status()
344 if (phydev->autoneg == AUTONEG_ENABLE && phydev->autoneg_complete) in at803x_read_status()
379 FIELD_PREP(AT803X_SMART_SPEED_RETRY_LIMIT_MASK, cnt - 2); in at803x_set_downshift()
388 return -EINVAL; in at803x_set_downshift()
406 switch (tuna->id) { in at803x_get_tunable()
410 return -EOPNOTSUPP; in at803x_get_tunable()
418 switch (tuna->id) { in at803x_set_tunable()
422 return -EOPNOTSUPP; in at803x_set_tunable()
533 return -EINVAL; in qca808x_cdt_fault_length()
568 return -EINVAL; in qca808x_cable_test_get_pair_status()