Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315106
b: refs/heads/master
c: 206d78e
h: refs/heads/master
v: v3
  • Loading branch information
Jitendra Kalsaria authored and David S. Miller committed Jul 11, 2012
1 parent ecf443f commit 876b1a4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d0de73096e6da4f71cc83623930edcc389a44ca6
refs/heads/master: 206d78e0c5e9eff0b025e54ff2825d90a0df77db
2 changes: 2 additions & 0 deletions trunk/drivers/net/ethernet/qlogic/qlge/qlge.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#define QLGE_VENDOR_ID 0x1077
#define QLGE_DEVICE_ID_8012 0x8012
#define QLGE_DEVICE_ID_8000 0x8000
#define QLGE_MEZZ_SSYS_ID_068 0x0068
#define QLGE_MEZZ_SSYS_ID_180 0x0180
#define MAX_CPUS 8
#define MAX_TX_RINGS MAX_CPUS
#define MAX_RX_RINGS ((MAX_CPUS * 2) + 1)
Expand Down
20 changes: 16 additions & 4 deletions trunk/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,17 +388,29 @@ static void ql_get_drvinfo(struct net_device *ndev,
static void ql_get_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
{
struct ql_adapter *qdev = netdev_priv(ndev);
/* What we support. */
wol->supported = WAKE_MAGIC;
/* What we've currently got set. */
wol->wolopts = qdev->wol;
unsigned short ssys_dev = qdev->pdev->subsystem_device;

/* WOL is only supported for mezz card. */
if (ssys_dev == QLGE_MEZZ_SSYS_ID_068 ||
ssys_dev == QLGE_MEZZ_SSYS_ID_180) {
wol->supported = WAKE_MAGIC;
wol->wolopts = qdev->wol;
}
}

static int ql_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
{
struct ql_adapter *qdev = netdev_priv(ndev);
int status;
unsigned short ssys_dev = qdev->pdev->subsystem_device;

/* WOL is only supported for mezz card. */
if (ssys_dev != QLGE_MEZZ_SSYS_ID_068 ||
ssys_dev != QLGE_MEZZ_SSYS_ID_180) {
netif_info(qdev, drv, qdev->ndev,
"WOL is only supported for mezz card\n");
return -EOPNOTSUPP;
}
if (wol->wolopts & ~WAKE_MAGIC)
return -EINVAL;
qdev->wol = wol->wolopts;
Expand Down

0 comments on commit 876b1a4

Please sign in to comment.