aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_ethtool.c
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2006-03-02 21:18:48 -0500
committerroot <root@jk-desktop.jf.intel.com>2006-03-02 21:18:48 -0500
commit8491682986e04fe7b258e5ba1d22f9a0ea2d803e (patch)
treedac61abf2c1e8e859e5434783f557576226449f3 /drivers/net/e1000/e1000_ethtool.c
parent8df06e504e999ff729f1b2a2e573d96bf3690dbc (diff)
e1000: Fix Quadport Wake on LAN
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
Diffstat (limited to 'drivers/net/e1000/e1000_ethtool.c')
-rw-r--r--drivers/net/e1000/e1000_ethtool.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index f7e81e96a191..f1b9cf4643c9 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -1632,10 +1632,26 @@ e1000_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
1632 case E1000_DEV_ID_82546EB_QUAD_COPPER: 1632 case E1000_DEV_ID_82546EB_QUAD_COPPER:
1633 case E1000_DEV_ID_82545EM_FIBER: 1633 case E1000_DEV_ID_82545EM_FIBER:
1634 case E1000_DEV_ID_82545EM_COPPER: 1634 case E1000_DEV_ID_82545EM_COPPER:
1635 case E1000_DEV_ID_82546GB_QUAD_COPPER:
1635 wol->supported = 0; 1636 wol->supported = 0;
1636 wol->wolopts = 0; 1637 wol->wolopts = 0;
1637 return; 1638 return;
1638 1639
1640 case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
1641 /* device id 10B5 port-A supports wol */
1642 if (!adapter->ksp3_port_a) {
1643 wol->supported = 0;
1644 return;
1645 }
1646 /* KSP3 does not suppport UCAST wake-ups for any interface */
1647 wol->supported = WAKE_MCAST | WAKE_BCAST | WAKE_MAGIC;
1648
1649 if (adapter->wol & E1000_WUFC_EX)
1650 DPRINTK(DRV, ERR, "Interface does not support "
1651 "directed (unicast) frame wake-up packets\n");
1652 wol->wolopts = 0;
1653 goto do_defaults;
1654
1639 case E1000_DEV_ID_82546EB_FIBER: 1655 case E1000_DEV_ID_82546EB_FIBER:
1640 case E1000_DEV_ID_82546GB_FIBER: 1656 case E1000_DEV_ID_82546GB_FIBER:
1641 case E1000_DEV_ID_82571EB_FIBER: 1657 case E1000_DEV_ID_82571EB_FIBER:
@@ -1650,8 +1666,9 @@ e1000_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
1650 default: 1666 default:
1651 wol->supported = WAKE_UCAST | WAKE_MCAST | 1667 wol->supported = WAKE_UCAST | WAKE_MCAST |
1652 WAKE_BCAST | WAKE_MAGIC; 1668 WAKE_BCAST | WAKE_MAGIC;
1653
1654 wol->wolopts = 0; 1669 wol->wolopts = 0;
1670
1671do_defaults:
1655 if (adapter->wol & E1000_WUFC_EX) 1672 if (adapter->wol & E1000_WUFC_EX)
1656 wol->wolopts |= WAKE_UCAST; 1673 wol->wolopts |= WAKE_UCAST;
1657 if (adapter->wol & E1000_WUFC_MC) 1674 if (adapter->wol & E1000_WUFC_MC)
@@ -1676,10 +1693,22 @@ e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
1676 case E1000_DEV_ID_82543GC_COPPER: 1693 case E1000_DEV_ID_82543GC_COPPER:
1677 case E1000_DEV_ID_82544EI_FIBER: 1694 case E1000_DEV_ID_82544EI_FIBER:
1678 case E1000_DEV_ID_82546EB_QUAD_COPPER: 1695 case E1000_DEV_ID_82546EB_QUAD_COPPER:
1696 case E1000_DEV_ID_82546GB_QUAD_COPPER:
1679 case E1000_DEV_ID_82545EM_FIBER: 1697 case E1000_DEV_ID_82545EM_FIBER:
1680 case E1000_DEV_ID_82545EM_COPPER: 1698 case E1000_DEV_ID_82545EM_COPPER:
1681 return wol->wolopts ? -EOPNOTSUPP : 0; 1699 return wol->wolopts ? -EOPNOTSUPP : 0;
1682 1700
1701 case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
1702 /* device id 10B5 port-A supports wol */
1703 if (!adapter->ksp3_port_a)
1704 return wol->wolopts ? -EOPNOTSUPP : 0;
1705
1706 if (wol->wolopts & WAKE_UCAST) {
1707 DPRINTK(DRV, ERR, "Interface does not support "
1708 "directed (unicast) frame wake-up packets\n");
1709 return -EOPNOTSUPP;
1710 }
1711
1683 case E1000_DEV_ID_82546EB_FIBER: 1712 case E1000_DEV_ID_82546EB_FIBER:
1684 case E1000_DEV_ID_82546GB_FIBER: 1713 case E1000_DEV_ID_82546GB_FIBER:
1685 case E1000_DEV_ID_82571EB_FIBER: 1714 case E1000_DEV_ID_82571EB_FIBER: