/Linux-v5.10/net/ethtool/ |
D | wol.c | 13 struct ethtool_wolinfo wol; member 39 dev->ethtool_ops->get_wol(dev, &data->wol); in wol_prepare_data() 42 data->show_sopass = info && (data->wol.supported & WAKE_MAGICSECURE); in wol_prepare_data() 54 len = ethnl_bitset32_size(&data->wol.wolopts, &data->wol.supported, in wol_reply_size() 59 len += nla_total_size(sizeof(data->wol.sopass)); in wol_reply_size() 72 ret = ethnl_put_bitset32(skb, ETHTOOL_A_WOL_MODES, &data->wol.wolopts, in wol_fill_reply() 73 &data->wol.supported, WOL_MODE_COUNT, in wol_fill_reply() 78 nla_put(skb, ETHTOOL_A_WOL_SOPASS, sizeof(data->wol.sopass), in wol_fill_reply() 79 data->wol.sopass)) in wol_fill_reply() 109 struct ethtool_wolinfo wol = { .cmd = ETHTOOL_GWOL }; in ethnl_set_wol() local [all …]
|
/Linux-v5.10/drivers/net/phy/ |
D | dp83tc811.c | 57 /* WoL Registers */ 64 /* WoL bits */ 98 struct ethtool_wolinfo *wol) in dp83811_set_wol() argument 104 if (wol->wolopts & (WAKE_MAGIC | WAKE_MAGICSECURE)) { in dp83811_set_wol() 122 if (wol->wolopts & WAKE_MAGIC) in dp83811_set_wol() 127 if (wol->wolopts & WAKE_MAGICSECURE) { in dp83811_set_wol() 130 (wol->sopass[1] << 8) | wol->sopass[0]); in dp83811_set_wol() 133 (wol->sopass[3] << 8) | wol->sopass[2]); in dp83811_set_wol() 136 (wol->sopass[5] << 8) | wol->sopass[4]); in dp83811_set_wol() 142 /* Clear any pending WoL interrupt */ in dp83811_set_wol() [all …]
|
D | dp83822.c | 83 /* WoL Registers */ 90 /* WoL bits */ 138 struct ethtool_wolinfo *wol) in dp83822_set_wol() argument 144 if (wol->wolopts & (WAKE_MAGIC | WAKE_MAGICSECURE)) { in dp83822_set_wol() 162 if (wol->wolopts & WAKE_MAGIC) in dp83822_set_wol() 167 if (wol->wolopts & WAKE_MAGICSECURE) { in dp83822_set_wol() 170 (wol->sopass[1] << 8) | wol->sopass[0]); in dp83822_set_wol() 173 (wol->sopass[3] << 8) | wol->sopass[2]); in dp83822_set_wol() 176 (wol->sopass[5] << 8) | wol->sopass[4]); in dp83822_set_wol() 182 /* Clear any pending WoL interrupt */ in dp83822_set_wol() [all …]
|
D | dp83869.c | 211 struct ethtool_wolinfo *wol) in dp83869_set_wol() argument 226 if (wol->wolopts & (WAKE_MAGIC | WAKE_MAGICSECURE | WAKE_UCAST | in dp83869_set_wol() 231 if (wol->wolopts & WAKE_MAGIC || in dp83869_set_wol() 232 wol->wolopts & WAKE_MAGICSECURE) { in dp83869_set_wol() 261 if (wol->wolopts & WAKE_MAGICSECURE) { in dp83869_set_wol() 264 (wol->sopass[1] << 8) | wol->sopass[0]); in dp83869_set_wol() 270 (wol->sopass[3] << 8) | wol->sopass[2]); in dp83869_set_wol() 275 (wol->sopass[5] << 8) | wol->sopass[4]); in dp83869_set_wol() 284 if (wol->wolopts & WAKE_UCAST) in dp83869_set_wol() 289 if (wol->wolopts & WAKE_BCAST) in dp83869_set_wol() [all …]
|
D | dp83867.c | 181 struct ethtool_wolinfo *wol) in dp83867_set_wol() argument 190 if (wol->wolopts & (WAKE_MAGIC | WAKE_MAGICSECURE | WAKE_UCAST | in dp83867_set_wol() 195 if (wol->wolopts & WAKE_MAGIC) { in dp83867_set_wol() 213 if (wol->wolopts & WAKE_MAGICSECURE) { in dp83867_set_wol() 215 (wol->sopass[1] << 8) | wol->sopass[0]); in dp83867_set_wol() 217 (wol->sopass[3] << 8) | wol->sopass[2]); in dp83867_set_wol() 219 (wol->sopass[5] << 8) | wol->sopass[4]); in dp83867_set_wol() 226 if (wol->wolopts & WAKE_UCAST) in dp83867_set_wol() 231 if (wol->wolopts & WAKE_BCAST) in dp83867_set_wol() 247 struct ethtool_wolinfo *wol) in dp83867_get_wol() argument [all …]
|
D | meson-gxl.c | 39 /* WOL Registers */ 150 * can detect this using a magic bit in the WOL bank (reg 12 - bit 12). 160 int ret, wol, lpa, exp; in meson_gxl_read_status() local 170 wol = meson_gxl_read_reg(phydev, BANK_WOL, LPI_STATUS); in meson_gxl_read_status() 171 if (wol < 0) in meson_gxl_read_status() 172 return wol; in meson_gxl_read_status() 182 if (!(wol & LPI_STATUS_RSV12) || in meson_gxl_read_status()
|
/Linux-v5.10/drivers/net/wireless/marvell/mwifiex/ |
D | ethtool.c | 23 struct ethtool_wolinfo *wol) in mwifiex_ethtool_get_wol() argument 28 wol->supported = WAKE_UCAST|WAKE_MCAST|WAKE_BCAST|WAKE_PHY; in mwifiex_ethtool_get_wol() 34 wol->wolopts |= WAKE_UCAST; in mwifiex_ethtool_get_wol() 36 wol->wolopts |= WAKE_MCAST; in mwifiex_ethtool_get_wol() 38 wol->wolopts |= WAKE_BCAST; in mwifiex_ethtool_get_wol() 40 wol->wolopts |= WAKE_PHY; in mwifiex_ethtool_get_wol() 44 struct ethtool_wolinfo *wol) in mwifiex_ethtool_set_wol() argument 49 if (wol->wolopts & ~(WAKE_UCAST|WAKE_MCAST|WAKE_BCAST|WAKE_PHY)) in mwifiex_ethtool_set_wol() 52 if (wol->wolopts & WAKE_UCAST) in mwifiex_ethtool_set_wol() 54 if (wol->wolopts & WAKE_MCAST) in mwifiex_ethtool_set_wol() [all …]
|
/Linux-v5.10/drivers/net/ethernet/broadcom/genet/ |
D | bcmgenet_wol.c | 38 /* ethtool function - get WOL (Wake on LAN) settings, Only Magic Packet 41 void bcmgenet_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) in bcmgenet_get_wol() argument 45 wol->supported = WAKE_MAGIC | WAKE_MAGICSECURE | WAKE_FILTER; in bcmgenet_get_wol() 46 wol->wolopts = priv->wolopts; in bcmgenet_get_wol() 47 memset(wol->sopass, 0, sizeof(wol->sopass)); in bcmgenet_get_wol() 49 if (wol->wolopts & WAKE_MAGICSECURE) in bcmgenet_get_wol() 50 memcpy(wol->sopass, priv->sopass, sizeof(priv->sopass)); in bcmgenet_get_wol() 53 /* ethtool function - set WOL (Wake on LAN) settings. 56 int bcmgenet_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) in bcmgenet_set_wol() argument 64 if (wol->wolopts & ~(WAKE_MAGIC | WAKE_MAGICSECURE | WAKE_FILTER)) in bcmgenet_set_wol() [all …]
|
/Linux-v5.10/drivers/net/wireless/marvell/libertas/ |
D | ethtool.c | 65 struct ethtool_wolinfo *wol) in lbs_ethtool_get_wol() argument 69 wol->supported = WAKE_UCAST|WAKE_MCAST|WAKE_BCAST|WAKE_PHY; in lbs_ethtool_get_wol() 75 wol->wolopts |= WAKE_UCAST; in lbs_ethtool_get_wol() 77 wol->wolopts |= WAKE_MCAST; in lbs_ethtool_get_wol() 79 wol->wolopts |= WAKE_BCAST; in lbs_ethtool_get_wol() 81 wol->wolopts |= WAKE_PHY; in lbs_ethtool_get_wol() 85 struct ethtool_wolinfo *wol) in lbs_ethtool_set_wol() argument 89 if (wol->wolopts & ~(WAKE_UCAST|WAKE_MCAST|WAKE_BCAST|WAKE_PHY)) in lbs_ethtool_set_wol() 93 if (wol->wolopts & WAKE_UCAST) in lbs_ethtool_set_wol() 95 if (wol->wolopts & WAKE_MCAST) in lbs_ethtool_set_wol() [all …]
|
/Linux-v5.10/drivers/net/ethernet/atheros/atl1c/ |
D | atl1c_ethtool.c | 229 struct ethtool_wolinfo *wol) in atl1c_get_wol() argument 233 wol->supported = WAKE_MAGIC | WAKE_PHY; in atl1c_get_wol() 234 wol->wolopts = 0; in atl1c_get_wol() 236 if (adapter->wol & AT_WUFC_EX) in atl1c_get_wol() 237 wol->wolopts |= WAKE_UCAST; in atl1c_get_wol() 238 if (adapter->wol & AT_WUFC_MC) in atl1c_get_wol() 239 wol->wolopts |= WAKE_MCAST; in atl1c_get_wol() 240 if (adapter->wol & AT_WUFC_BC) in atl1c_get_wol() 241 wol->wolopts |= WAKE_BCAST; in atl1c_get_wol() 242 if (adapter->wol & AT_WUFC_MAG) in atl1c_get_wol() [all …]
|
/Linux-v5.10/drivers/net/ethernet/atheros/atl1e/ |
D | atl1e_ethtool.c | 316 struct ethtool_wolinfo *wol) in atl1e_get_wol() argument 320 wol->supported = WAKE_MAGIC | WAKE_PHY; in atl1e_get_wol() 321 wol->wolopts = 0; in atl1e_get_wol() 323 if (adapter->wol & AT_WUFC_EX) in atl1e_get_wol() 324 wol->wolopts |= WAKE_UCAST; in atl1e_get_wol() 325 if (adapter->wol & AT_WUFC_MC) in atl1e_get_wol() 326 wol->wolopts |= WAKE_MCAST; in atl1e_get_wol() 327 if (adapter->wol & AT_WUFC_BC) in atl1e_get_wol() 328 wol->wolopts |= WAKE_BCAST; in atl1e_get_wol() 329 if (adapter->wol & AT_WUFC_MAG) in atl1e_get_wol() [all …]
|
/Linux-v5.10/drivers/net/ethernet/oki-semi/pch_gbe/ |
D | pch_gbe_ethtool.c | 204 * @wol: Wake-on-Lan information 207 struct ethtool_wolinfo *wol) in pch_gbe_get_wol() argument 211 wol->supported = WAKE_UCAST | WAKE_MCAST | WAKE_BCAST | WAKE_MAGIC; in pch_gbe_get_wol() 212 wol->wolopts = 0; in pch_gbe_get_wol() 215 wol->wolopts |= WAKE_UCAST; in pch_gbe_get_wol() 217 wol->wolopts |= WAKE_MCAST; in pch_gbe_get_wol() 219 wol->wolopts |= WAKE_BCAST; in pch_gbe_get_wol() 221 wol->wolopts |= WAKE_MAGIC; in pch_gbe_get_wol() 227 * @wol: Pointer of wake-on-Lan information straucture 233 struct ethtool_wolinfo *wol) in pch_gbe_set_wol() argument [all …]
|
/Linux-v5.10/drivers/net/ethernet/intel/e1000/ |
D | e1000_ethtool.c | 1580 struct ethtool_wolinfo *wol) in e1000_wol_exclusion() argument 1595 /* these don't support WoL at all */ in e1000_wol_exclusion() 1596 wol->supported = 0; in e1000_wol_exclusion() 1602 wol->supported = 0; in e1000_wol_exclusion() 1609 /* quad port adapters only support WoL on port A */ in e1000_wol_exclusion() 1611 wol->supported = 0; in e1000_wol_exclusion() 1618 /* dual port cards only support WoL on port A from now on in e1000_wol_exclusion() 1620 * so exclude FUNC_1 ports from having WoL enabled in e1000_wol_exclusion() 1624 wol->supported = 0; in e1000_wol_exclusion() 1635 struct ethtool_wolinfo *wol) in e1000_get_wol() argument [all …]
|
/Linux-v5.10/drivers/net/ethernet/microchip/ |
D | lan743x_ethtool.c | 777 struct ethtool_wolinfo *wol) in lan743x_ethtool_get_wol() argument 781 wol->supported = 0; in lan743x_ethtool_get_wol() 782 wol->wolopts = 0; in lan743x_ethtool_get_wol() 783 phy_ethtool_get_wol(netdev->phydev, wol); in lan743x_ethtool_get_wol() 785 wol->supported |= WAKE_BCAST | WAKE_UCAST | WAKE_MCAST | in lan743x_ethtool_get_wol() 788 wol->wolopts |= adapter->wolopts; in lan743x_ethtool_get_wol() 792 struct ethtool_wolinfo *wol) in lan743x_ethtool_set_wol() argument 797 if (wol->wolopts & WAKE_UCAST) in lan743x_ethtool_set_wol() 799 if (wol->wolopts & WAKE_MCAST) in lan743x_ethtool_set_wol() 801 if (wol->wolopts & WAKE_BCAST) in lan743x_ethtool_set_wol() [all …]
|
/Linux-v5.10/drivers/net/ethernet/freescale/ |
D | ucc_geth_ethtool.c | 342 static void uec_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) in uec_get_wol() argument 348 wol->supported |= WAKE_PHY; in uec_get_wol() 350 wol->supported |= WAKE_MAGIC; in uec_get_wol() 352 wol->wolopts = ugeth->wol_en; in uec_get_wol() 355 static int uec_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) in uec_set_wol() argument 360 if (wol->wolopts & ~(WAKE_PHY | WAKE_MAGIC)) in uec_set_wol() 362 else if (wol->wolopts & WAKE_PHY && (!phydev || !phydev->irq)) in uec_set_wol() 364 else if (wol->wolopts & WAKE_MAGIC && !qe_alive_during_sleep()) in uec_set_wol() 367 ugeth->wol_en = wol->wolopts; in uec_set_wol()
|
/Linux-v5.10/drivers/staging/qlge/ |
D | qlge_ethtool.c | 431 static void ql_get_wol(struct net_device *ndev, struct ethtool_wolinfo *wol) in ql_get_wol() argument 436 /* WOL is only supported for mezz card. */ in ql_get_wol() 439 wol->supported = WAKE_MAGIC; in ql_get_wol() 440 wol->wolopts = qdev->wol; in ql_get_wol() 444 static int ql_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol) in ql_set_wol() argument 449 /* WOL is only supported for mezz card. */ in ql_set_wol() 453 "WOL is only supported for mezz card\n"); in ql_set_wol() 456 if (wol->wolopts & ~WAKE_MAGIC) in ql_set_wol() 458 qdev->wol = wol->wolopts; in ql_set_wol() 460 netif_info(qdev, drv, qdev->ndev, "Set wol option 0x%x\n", qdev->wol); in ql_set_wol()
|
/Linux-v5.10/drivers/net/ethernet/intel/igc/ |
D | igc_ethtool.c | 330 struct ethtool_wolinfo *wol) in igc_ethtool_get_wol() argument 334 wol->wolopts = 0; in igc_ethtool_get_wol() 339 wol->supported = WAKE_UCAST | WAKE_MCAST | in igc_ethtool_get_wol() 349 if (adapter->wol & IGC_WUFC_EX) in igc_ethtool_get_wol() 350 wol->wolopts |= WAKE_UCAST; in igc_ethtool_get_wol() 351 if (adapter->wol & IGC_WUFC_MC) in igc_ethtool_get_wol() 352 wol->wolopts |= WAKE_MCAST; in igc_ethtool_get_wol() 353 if (adapter->wol & IGC_WUFC_BC) in igc_ethtool_get_wol() 354 wol->wolopts |= WAKE_BCAST; in igc_ethtool_get_wol() 355 if (adapter->wol & IGC_WUFC_MAG) in igc_ethtool_get_wol() [all …]
|
/Linux-v5.10/drivers/net/ethernet/stmicro/stmmac/ |
D | stmmac_ethtool.c | 625 /* Currently only support WOL through Magic packet. */ 626 static void stmmac_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) in stmmac_get_wol() argument 631 return phylink_ethtool_get_wol(priv->phylink, wol); in stmmac_get_wol() 635 wol->supported = WAKE_MAGIC | WAKE_UCAST; in stmmac_get_wol() 637 wol->supported &= ~WAKE_MAGIC; in stmmac_get_wol() 638 wol->wolopts = priv->wolopts; in stmmac_get_wol() 643 static int stmmac_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) in stmmac_set_wol() argument 652 int ret = phylink_ethtool_set_wol(priv->phylink, wol); in stmmac_set_wol() 655 device_set_wakeup_enable(priv->device, !!wol->wolopts); in stmmac_set_wol() 659 /* By default almost all GMAC devices support the WoL via in stmmac_set_wol() [all …]
|
/Linux-v5.10/Documentation/networking/device_drivers/ethernet/intel/ |
D | e100.rst | 141 Enabling Wake on LAN (WoL) 143 WoL is provided through the ethtool utility. For instructions on 144 enabling WoL with ethtool, refer to the ethtool man page. WoL will be 146 driver version, in order to enable WoL, the e100 driver must be loaded
|
/Linux-v5.10/drivers/net/ethernet/intel/e1000e/ |
D | ethtool.c | 1885 struct ethtool_wolinfo *wol) in e1000_get_wol() argument 1889 wol->supported = 0; in e1000_get_wol() 1890 wol->wolopts = 0; in e1000_get_wol() 1896 wol->supported = WAKE_UCAST | WAKE_MCAST | in e1000_get_wol() 1901 wol->supported &= ~WAKE_UCAST; in e1000_get_wol() 1903 if (adapter->wol & E1000_WUFC_EX) in e1000_get_wol() 1907 if (adapter->wol & E1000_WUFC_EX) in e1000_get_wol() 1908 wol->wolopts |= WAKE_UCAST; in e1000_get_wol() 1909 if (adapter->wol & E1000_WUFC_MC) in e1000_get_wol() 1910 wol->wolopts |= WAKE_MCAST; in e1000_get_wol() [all …]
|
/Linux-v5.10/drivers/net/ethernet/socionext/ |
D | sni_ave.c | 418 struct ethtool_wolinfo *wol) in ave_ethtool_get_wol() argument 420 wol->supported = 0; in ave_ethtool_get_wol() 421 wol->wolopts = 0; in ave_ethtool_get_wol() 424 phy_ethtool_get_wol(ndev->phydev, wol); in ave_ethtool_get_wol() 428 struct ethtool_wolinfo *wol) in __ave_ethtool_set_wol() argument 431 (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE))) in __ave_ethtool_set_wol() 434 return phy_ethtool_set_wol(ndev->phydev, wol); in __ave_ethtool_set_wol() 438 struct ethtool_wolinfo *wol) in ave_ethtool_set_wol() argument 442 ret = __ave_ethtool_set_wol(ndev, wol); in ave_ethtool_set_wol() 444 device_set_wakeup_enable(&ndev->dev, !!wol->wolopts); in ave_ethtool_set_wol() [all …]
|
/Linux-v5.10/drivers/net/ethernet/sfc/ |
D | ethtool.c | 195 struct ethtool_wolinfo *wol) in efx_ethtool_get_wol() argument 198 return efx->type->get_wol(efx, wol); in efx_ethtool_get_wol() 203 struct ethtool_wolinfo *wol) in efx_ethtool_set_wol() argument 206 return efx->type->set_wol(efx, wol->wolopts); in efx_ethtool_set_wol()
|
/Linux-v5.10/drivers/net/ethernet/aquantia/atlantic/ |
D | aq_ethtool.c | 607 struct ethtool_wolinfo *wol) in aq_ethtool_get_wol() argument 614 wol->supported = AQ_NIC_WOL_MODES; in aq_ethtool_get_wol() 615 wol->wolopts = cfg->wol; in aq_ethtool_get_wol() 619 struct ethtool_wolinfo *wol) in aq_ethtool_set_wol() argument 628 if (wol->wolopts & ~AQ_NIC_WOL_MODES) in aq_ethtool_set_wol() 631 cfg->wol = wol->wolopts; in aq_ethtool_set_wol() 633 err = device_set_wakeup_enable(&pdev->dev, !!cfg->wol); in aq_ethtool_set_wol()
|
/Linux-v5.10/drivers/net/ethernet/realtek/ |
D | 8139cp.c | 1327 const struct ethtool_wolinfo *wol) in netdev_set_wol() argument 1332 /* If WOL is being disabled, no need for complexity */ in netdev_set_wol() 1333 if (wol->wolopts) { in netdev_set_wol() 1334 if (wol->wolopts & WAKE_PHY) options |= LinkUp; in netdev_set_wol() 1335 if (wol->wolopts & WAKE_MAGIC) options |= MagicPacket; in netdev_set_wol() 1344 /* If WOL is being disabled, no need for complexity */ in netdev_set_wol() 1345 if (wol->wolopts) { in netdev_set_wol() 1346 if (wol->wolopts & WAKE_UCAST) options |= UWF; in netdev_set_wol() 1347 if (wol->wolopts & WAKE_BCAST) options |= BWF; in netdev_set_wol() 1348 if (wol->wolopts & WAKE_MCAST) options |= MWF; in netdev_set_wol() [all …]
|
/Linux-v5.10/drivers/net/usb/ |
D | pegasus.c | 892 pegasus_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) in pegasus_get_wol() argument 896 wol->supported = WAKE_MAGIC | WAKE_PHY; in pegasus_get_wol() 897 wol->wolopts = pegasus->wolopts; in pegasus_get_wol() 901 pegasus_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) in pegasus_set_wol() argument 907 if (wol->wolopts & ~WOL_SUPPORTED) in pegasus_set_wol() 910 if (wol->wolopts & WAKE_MAGIC) in pegasus_set_wol() 912 if (wol->wolopts & WAKE_PHY) in pegasus_set_wol() 915 if (wol->wolopts) in pegasus_set_wol() 919 pegasus->wolopts = wol->wolopts; in pegasus_set_wol() 924 wol->wolopts); in pegasus_set_wol() [all …]
|