/openbmc/linux/net/ethtool/ |
H A D | wol.c | 13 struct ethtool_wolinfo wol; member 39 dev->ethtool_ops->get_wol(dev, &data->wol); in wol_prepare_data() 43 (data->wol.supported & WAKE_MAGICSECURE); in wol_prepare_data() 55 len = ethnl_bitset32_size(&data->wol.wolopts, &data->wol.supported, in wol_reply_size() 60 len += nla_total_size(sizeof(data->wol.sopass)); in wol_reply_size() 73 ret = ethnl_put_bitset32(skb, ETHTOOL_A_WOL_MODES, &data->wol.wolopts, in wol_fill_reply() 74 &data->wol.supported, WOL_MODE_COUNT, in wol_fill_reply() 79 nla_put(skb, ETHTOOL_A_WOL_SOPASS, sizeof(data->wol.sopass), in wol_fill_reply() 80 data->wol.sopass)) in wol_fill_reply() 107 struct ethtool_wolinfo wol = { .cmd = ETHTOOL_GWOL }; in ethnl_set_wol() local [all …]
|
/openbmc/linux/drivers/net/wireless/marvell/mwifiex/ |
H A D | ethtool.c | 11 struct ethtool_wolinfo *wol) in mwifiex_ethtool_get_wol() argument 16 wol->supported = WAKE_UCAST|WAKE_MCAST|WAKE_BCAST|WAKE_PHY; in mwifiex_ethtool_get_wol() 22 wol->wolopts |= WAKE_UCAST; in mwifiex_ethtool_get_wol() 24 wol->wolopts |= WAKE_MCAST; in mwifiex_ethtool_get_wol() 26 wol->wolopts |= WAKE_BCAST; in mwifiex_ethtool_get_wol() 28 wol->wolopts |= WAKE_PHY; in mwifiex_ethtool_get_wol() 32 struct ethtool_wolinfo *wol) in mwifiex_ethtool_set_wol() argument 37 if (wol->wolopts & ~(WAKE_UCAST|WAKE_MCAST|WAKE_BCAST|WAKE_PHY)) in mwifiex_ethtool_set_wol() 40 if (wol->wolopts & WAKE_UCAST) in mwifiex_ethtool_set_wol() 42 if (wol->wolopts & WAKE_MCAST) in mwifiex_ethtool_set_wol() [all …]
|
/openbmc/u-boot/net/ |
H A D | wol.c | 10 #include "wol.h" 19 * @param wol Wake-on-LAN packet 22 static int wol_check_magic(struct wol_hdr *wol, unsigned int len) in wol_check_magic() argument 30 if (wol->wol_sync[i] != WOL_SYNC_BYTE) in wol_check_magic() 34 if (memcmp(&wol->wol_dest[i * ARP_HLEN], in wol_check_magic() 43 struct wol_hdr *wol; in wol_receive() local 45 wol = (struct wol_hdr *)ip; in wol_receive() 47 if (!wol_check_magic(wol, len)) in wol_receive() 53 eth_env_set_enetaddr("wolpassword", wol->wol_passwd); in wol_receive() 56 struct in_addr *ip = (struct in_addr *)(wol->wol_passwd); in wol_receive() [all …]
|
/openbmc/linux/drivers/net/ethernet/wangxun/ngbe/ |
H A D | ngbe_ethtool.c | 13 struct ethtool_wolinfo *wol) in ngbe_get_wol() argument 19 wol->supported = WAKE_MAGIC; in ngbe_get_wol() 20 wol->wolopts = 0; in ngbe_get_wol() 21 if (wx->wol & WX_PSR_WKUP_CTL_MAG) in ngbe_get_wol() 22 wol->wolopts |= WAKE_MAGIC; in ngbe_get_wol() 26 struct ethtool_wolinfo *wol) in ngbe_set_wol() argument 34 wx->wol = 0; in ngbe_set_wol() 35 if (wol->wolopts & WAKE_MAGIC) in ngbe_set_wol() 36 wx->wol = WX_PSR_WKUP_CTL_MAG; in ngbe_set_wol() 37 netdev->wol_enabled = !!(wx->wol); in ngbe_set_wol() [all …]
|
/openbmc/linux/drivers/net/ethernet/broadcom/genet/ |
H A D | bcmgenet_wol.c | 37 /* ethtool function - get WOL (Wake on LAN) settings, Only Magic Packet 40 void bcmgenet_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) in bcmgenet_get_wol() argument 46 phy_ethtool_get_wol(dev->phydev, wol); in bcmgenet_get_wol() 53 wol->supported |= WAKE_MAGIC | WAKE_MAGICSECURE | WAKE_FILTER; in bcmgenet_get_wol() 54 wol->wolopts = priv->wolopts; in bcmgenet_get_wol() 55 memset(wol->sopass, 0, sizeof(wol->sopass)); in bcmgenet_get_wol() 57 if (wol->wolopts & WAKE_MAGICSECURE) in bcmgenet_get_wol() 58 memcpy(wol->sopass, priv->sopass, sizeof(priv->sopass)); in bcmgenet_get_wol() 61 /* ethtool function - set WOL (Wake on LAN) settings. 64 int bcmgenet_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) in bcmgenet_set_wol() argument [all …]
|
/openbmc/linux/drivers/net/phy/ |
H A 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 …]
|
H A D | dp83822.c | 83 /* WoL Registers */ 90 /* WoL bits */ 124 struct ethtool_wolinfo *wol) in dp83822_set_wol() argument 130 if (wol->wolopts & (WAKE_MAGIC | WAKE_MAGICSECURE)) { in dp83822_set_wol() 148 if (wol->wolopts & WAKE_MAGIC) in dp83822_set_wol() 153 if (wol->wolopts & WAKE_MAGICSECURE) { in dp83822_set_wol() 156 (wol->sopass[1] << 8) | wol->sopass[0]); in dp83822_set_wol() 159 (wol->sopass[3] << 8) | wol->sopass[2]); in dp83822_set_wol() 162 (wol->sopass[5] << 8) | wol->sopass[4]); in dp83822_set_wol() 168 /* Clear any pending WoL interrupt */ in dp83822_set_wol() [all …]
|
H A D | dp83869.c | 246 struct ethtool_wolinfo *wol) in dp83869_set_wol() argument 261 if (wol->wolopts & (WAKE_MAGIC | WAKE_MAGICSECURE | WAKE_UCAST | in dp83869_set_wol() 266 if (wol->wolopts & WAKE_MAGIC || in dp83869_set_wol() 267 wol->wolopts & WAKE_MAGICSECURE) { in dp83869_set_wol() 296 if (wol->wolopts & WAKE_MAGICSECURE) { in dp83869_set_wol() 299 (wol->sopass[1] << 8) | wol->sopass[0]); in dp83869_set_wol() 305 (wol->sopass[3] << 8) | wol->sopass[2]); in dp83869_set_wol() 310 (wol->sopass[5] << 8) | wol->sopass[4]); in dp83869_set_wol() 319 if (wol->wolopts & WAKE_UCAST) in dp83869_set_wol() 324 if (wol->wolopts & WAKE_BCAST) in dp83869_set_wol() [all …]
|
H A D | smsc.c | 276 * be cleared to de-assert PME signal after a WoL event happens, but in lan874x_phy_config_init() 295 struct ethtool_wolinfo *wol) in lan874x_get_wol() argument 300 wol->supported = (WAKE_UCAST | WAKE_BCAST | WAKE_MAGIC | in lan874x_get_wol() 302 wol->wolopts = 0; in lan874x_get_wol() 309 wol->wolopts |= WAKE_UCAST; in lan874x_get_wol() 312 wol->wolopts |= WAKE_BCAST; in lan874x_get_wol() 315 wol->wolopts |= WAKE_MAGIC; in lan874x_get_wol() 319 wol->wolopts |= WAKE_ARP; in lan874x_get_wol() 321 wol->wolopts |= WAKE_MCAST; in lan874x_get_wol() 407 struct ethtool_wolinfo *wol) in lan874x_set_wol() argument [all …]
|
H A D | dp83867.c | 192 struct ethtool_wolinfo *wol) in dp83867_set_wol() argument 201 if (wol->wolopts & (WAKE_MAGIC | WAKE_MAGICSECURE | WAKE_UCAST | in dp83867_set_wol() 206 if (wol->wolopts & WAKE_MAGIC) { in dp83867_set_wol() 224 if (wol->wolopts & WAKE_MAGICSECURE) { in dp83867_set_wol() 226 (wol->sopass[1] << 8) | wol->sopass[0]); in dp83867_set_wol() 228 (wol->sopass[3] << 8) | wol->sopass[2]); in dp83867_set_wol() 230 (wol->sopass[5] << 8) | wol->sopass[4]); in dp83867_set_wol() 237 if (wol->wolopts & WAKE_UCAST) in dp83867_set_wol() 242 if (wol->wolopts & WAKE_BCAST) in dp83867_set_wol() 258 struct ethtool_wolinfo *wol) in dp83867_get_wol() argument [all …]
|
H A D | bcm-phy-lib.c | 832 int bcm_phy_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol) in bcm_phy_set_wol() argument 843 if (wol->wolopts & ~BCM54XX_WOL_SUPPORTED_MASK) in bcm_phy_set_wol() 849 BUILD_BUG_ON(sizeof(wol->sopass) != ETH_ALEN); in bcm_phy_set_wol() 862 if (!wol->wolopts) { in bcm_phy_set_wol() 899 if (wol->wolopts & WAKE_MCAST) { in bcm_phy_set_wol() 905 if (wol->wolopts & WAKE_UCAST) { in bcm_phy_set_wol() 907 } else if (wol->wolopts & WAKE_BCAST) { in bcm_phy_set_wol() 909 } else if (wol->wolopts & WAKE_MAGICSECURE) { in bcm_phy_set_wol() 910 ether_addr_copy(da, wol->sopass); in bcm_phy_set_wol() 911 } else if (wol->wolopts & WAKE_MAGIC) { in bcm_phy_set_wol() [all …]
|
H A D | meson-gxl.c | 32 /* WOL Registers */ 143 * can detect this using a magic bit in the WOL bank (reg 12 - bit 12). 153 int ret, wol, lpa, exp; in meson_gxl_read_status() local 163 wol = meson_gxl_read_reg(phydev, BANK_WOL, LPI_STATUS); in meson_gxl_read_status() 164 if (wol < 0) in meson_gxl_read_status() 165 return wol; in meson_gxl_read_status() 175 if (!(wol & LPI_STATUS_RSV12) || in meson_gxl_read_status()
|
/openbmc/linux/drivers/net/wireless/marvell/libertas/ |
H A D | ethtool.c | 62 struct ethtool_wolinfo *wol) in lbs_ethtool_get_wol() argument 66 wol->supported = WAKE_UCAST|WAKE_MCAST|WAKE_BCAST|WAKE_PHY; in lbs_ethtool_get_wol() 72 wol->wolopts |= WAKE_UCAST; in lbs_ethtool_get_wol() 74 wol->wolopts |= WAKE_MCAST; in lbs_ethtool_get_wol() 76 wol->wolopts |= WAKE_BCAST; in lbs_ethtool_get_wol() 78 wol->wolopts |= WAKE_PHY; in lbs_ethtool_get_wol() 82 struct ethtool_wolinfo *wol) in lbs_ethtool_set_wol() argument 86 if (wol->wolopts & ~(WAKE_UCAST|WAKE_MCAST|WAKE_BCAST|WAKE_PHY)) in lbs_ethtool_set_wol() 90 if (wol->wolopts & WAKE_UCAST) in lbs_ethtool_set_wol() 92 if (wol->wolopts & WAKE_MCAST) in lbs_ethtool_set_wol() [all …]
|
/openbmc/linux/drivers/net/ethernet/atheros/atl1c/ |
H A 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 …]
|
/openbmc/linux/drivers/net/ethernet/atheros/atl1e/ |
H A 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 …]
|
/openbmc/u-boot/drivers/net/phy/ |
H A D | meson-gxl.c | 23 * can detect this using a magic bit in the WOL bank (reg 12 - bit 12). 34 int ret, wol, lpa, exp; in meson_gxl_startup() local 42 /* Need to access WOL bank, make sure the access is open */ in meson_gxl_startup() 56 /* Request LPI_STATUS WOL register */ in meson_gxl_startup() 62 wol = phy_read(phydev, MDIO_DEVAD_NONE, 0x15); in meson_gxl_startup() 63 if (wol < 0) in meson_gxl_startup() 64 return wol; in meson_gxl_startup() 74 if (!(wol & BIT(12)) || in meson_gxl_startup()
|
/openbmc/linux/drivers/net/ethernet/oki-semi/pch_gbe/ |
H A D | pch_gbe_ethtool.c | 206 * @wol: Wake-on-Lan information 209 struct ethtool_wolinfo *wol) in pch_gbe_get_wol() argument 213 wol->supported = WAKE_UCAST | WAKE_MCAST | WAKE_BCAST | WAKE_MAGIC; in pch_gbe_get_wol() 214 wol->wolopts = 0; in pch_gbe_get_wol() 217 wol->wolopts |= WAKE_UCAST; in pch_gbe_get_wol() 219 wol->wolopts |= WAKE_MCAST; in pch_gbe_get_wol() 221 wol->wolopts |= WAKE_BCAST; in pch_gbe_get_wol() 223 wol->wolopts |= WAKE_MAGIC; in pch_gbe_get_wol() 229 * @wol: Pointer of wake-on-Lan information straucture 235 struct ethtool_wolinfo *wol) in pch_gbe_set_wol() argument [all …]
|
/openbmc/linux/drivers/net/ethernet/microchip/ |
H A D | lan743x_ethtool.c | 1139 struct ethtool_wolinfo *wol) in lan743x_ethtool_get_wol() argument 1143 wol->supported = 0; in lan743x_ethtool_get_wol() 1144 wol->wolopts = 0; in lan743x_ethtool_get_wol() 1147 phy_ethtool_get_wol(netdev->phydev, wol); in lan743x_ethtool_get_wol() 1149 if (wol->supported != adapter->phy_wol_supported) in lan743x_ethtool_get_wol() 1151 "PHY changed its supported WOL! old=%x, new=%x\n", in lan743x_ethtool_get_wol() 1152 adapter->phy_wol_supported, wol->supported); in lan743x_ethtool_get_wol() 1154 wol->supported |= MAC_SUPPORTED_WAKES; in lan743x_ethtool_get_wol() 1157 wol->supported |= WAKE_MAGICSECURE; in lan743x_ethtool_get_wol() 1159 wol->wolopts |= adapter->wolopts; in lan743x_ethtool_get_wol() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/e1000/ |
H A D | e1000_ethtool.c | 1584 struct ethtool_wolinfo *wol) in e1000_wol_exclusion() argument 1599 /* these don't support WoL at all */ in e1000_wol_exclusion() 1600 wol->supported = 0; in e1000_wol_exclusion() 1606 wol->supported = 0; in e1000_wol_exclusion() 1613 /* quad port adapters only support WoL on port A */ in e1000_wol_exclusion() 1615 wol->supported = 0; in e1000_wol_exclusion() 1622 /* dual port cards only support WoL on port A from now on in e1000_wol_exclusion() 1624 * so exclude FUNC_1 ports from having WoL enabled in e1000_wol_exclusion() 1628 wol->supported = 0; in e1000_wol_exclusion() 1639 struct ethtool_wolinfo *wol) in e1000_get_wol() argument [all …]
|
/openbmc/linux/drivers/net/ethernet/broadcom/asp2/ |
H A D | bcmasp_ethtool.c | 191 static void bcmasp_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) in bcmasp_get_wol() argument 195 wol->supported = BCMASP_SUPPORTED_WAKE; in bcmasp_get_wol() 196 wol->wolopts = intf->wolopts; in bcmasp_get_wol() 197 memset(wol->sopass, 0, sizeof(wol->sopass)); in bcmasp_get_wol() 199 if (wol->wolopts & WAKE_MAGICSECURE) in bcmasp_get_wol() 200 memcpy(wol->sopass, intf->sopass, sizeof(intf->sopass)); in bcmasp_get_wol() 203 static int bcmasp_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) in bcmasp_set_wol() argument 213 intf->wolopts = wol->wolopts; in bcmasp_set_wol() 215 memcpy(intf->sopass, wol->sopass, sizeof(wol->sopass)); in bcmasp_set_wol()
|
/openbmc/linux/drivers/net/ethernet/freescale/ |
H A D | ucc_geth_ethtool.c | 346 static void uec_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) in uec_get_wol() argument 352 wol->supported |= WAKE_PHY; in uec_get_wol() 354 wol->supported |= WAKE_MAGIC; in uec_get_wol() 356 wol->wolopts = ugeth->wol_en; in uec_get_wol() 359 static int uec_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) in uec_set_wol() argument 364 if (wol->wolopts & ~(WAKE_PHY | WAKE_MAGIC)) in uec_set_wol() 366 else if (wol->wolopts & WAKE_PHY && (!phydev || !phydev->irq)) in uec_set_wol() 368 else if (wol->wolopts & WAKE_MAGIC && !qe_alive_during_sleep()) in uec_set_wol() 371 ugeth->wol_en = wol->wolopts; in uec_set_wol()
|
/openbmc/linux/drivers/staging/qlge/ |
H A D | qlge_ethtool.c | 430 static void qlge_get_wol(struct net_device *ndev, struct ethtool_wolinfo *wol) in qlge_get_wol() argument 435 /* WOL is only supported for mezz card. */ in qlge_get_wol() 438 wol->supported = WAKE_MAGIC; in qlge_get_wol() 439 wol->wolopts = qdev->wol; in qlge_get_wol() 443 static int qlge_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol) in qlge_set_wol() argument 448 /* WOL is only supported for mezz card. */ in qlge_set_wol() 452 "WOL is only supported for mezz card\n"); in qlge_set_wol() 455 if (wol->wolopts & ~WAKE_MAGIC) in qlge_set_wol() 457 qdev->wol = wol->wolopts; in qlge_set_wol() 459 netif_info(qdev, drv, qdev->ndev, "Set wol option 0x%x\n", qdev->wol); in qlge_set_wol()
|
/openbmc/linux/Documentation/netlink/specs/ |
H A D | ethtool.yaml | 349 name: wol 1089 name: wol-get 1090 doc: Get WOL params. 1092 attribute-set: wol 1094 do: &wol-get-op 1099 attributes: &wol 1103 dump: *wol-get-op 1105 name: wol-set 1106 doc: Set WOL params. 1108 attribute-set: wol [all …]
|
/openbmc/linux/Documentation/networking/device_drivers/ethernet/intel/ |
H A 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
|
/openbmc/linux/drivers/power/reset/ |
H A D | linkstation-poweroff.c | 68 /* If WOL was enabled and a magic packet was received before powering in linkstation_mvphy_reg_intn() 70 * Clear WOL status. in linkstation_mvphy_reg_intn() 99 /* If WOL was enabled and a magic packet was received before powering in readynas_mvphy_set_reg() 101 * Clear WOL status. in readynas_mvphy_set_reg()
|