|
1 | 1 | /* Broadcom NetXtreme-C/E network driver.
|
2 | 2 | *
|
3 | 3 | * Copyright (c) 2014-2016 Broadcom Corporation
|
| 4 | + * Copyright (c) 2016-2017 Broadcom Limited |
4 | 5 | *
|
5 | 6 | * This program is free software; you can redistribute it and/or modify
|
6 | 7 | * it under the terms of the GNU General Public License as published by
|
@@ -832,6 +833,20 @@ static void bnxt_get_drvinfo(struct net_device *dev,
|
832 | 833 | kfree(pkglog);
|
833 | 834 | }
|
834 | 835 |
|
| 836 | +static void bnxt_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) |
| 837 | +{ |
| 838 | + struct bnxt *bp = netdev_priv(dev); |
| 839 | + |
| 840 | + wol->supported = 0; |
| 841 | + wol->wolopts = 0; |
| 842 | + memset(&wol->sopass, 0, sizeof(wol->sopass)); |
| 843 | + if (bp->flags & BNXT_FLAG_WOL_CAP) { |
| 844 | + wol->supported = WAKE_MAGIC; |
| 845 | + if (bp->wol) |
| 846 | + wol->wolopts = WAKE_MAGIC; |
| 847 | + } |
| 848 | +} |
| 849 | + |
835 | 850 | u32 _bnxt_fw_to_ethtool_adv_spds(u16 fw_speeds, u8 fw_pause)
|
836 | 851 | {
|
837 | 852 | u32 speed_mask = 0;
|
@@ -2134,6 +2149,7 @@ const struct ethtool_ops bnxt_ethtool_ops = {
|
2134 | 2149 | .get_pauseparam = bnxt_get_pauseparam,
|
2135 | 2150 | .set_pauseparam = bnxt_set_pauseparam,
|
2136 | 2151 | .get_drvinfo = bnxt_get_drvinfo,
|
| 2152 | + .get_wol = bnxt_get_wol, |
2137 | 2153 | .get_coalesce = bnxt_get_coalesce,
|
2138 | 2154 | .set_coalesce = bnxt_set_coalesce,
|
2139 | 2155 | .get_msglevel = bnxt_get_msglevel,
|
|
0 commit comments