提交 a7c0ea6e 编写于 作者: G Greg Kroah-Hartman

Staging: sxg: fix build warnings in sxg_ethtool

This fixes some build problems with the ethtool support recently added
for the sxg driver.

This is a very good example of why you need to check the build for
warnings and then fix them...

Cc: Mithlesh Thukral <mithlesh@linsyssoft.com>
Cc: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 0d414727
...@@ -161,14 +161,14 @@ static int sxg_nic_set_settings(struct net_device *netdev, ...@@ -161,14 +161,14 @@ static int sxg_nic_set_settings(struct net_device *netdev,
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
static int static void
sxg_nic_get_strings(struct net_device *netdev, u32 stringset, u8 * data) sxg_nic_get_strings(struct net_device *netdev, u32 stringset, u8 * data)
{ {
int index; int index;
switch(stringset) { switch(stringset) {
case ETH_SS_TEST: case ETH_SS_TEST:
return -EOPNOTSUPP; /* return -EOPNOTSUPP; */
break; break;
case ETH_SS_STATS: case ETH_SS_STATS:
for (index = 0; index < SXG_NIC_STATS_LEN; index++) { for (index = 0; index < SXG_NIC_STATS_LEN; index++) {
...@@ -228,7 +228,7 @@ static int sxg_nic_get_settings(struct net_device *netdev, ...@@ -228,7 +228,7 @@ static int sxg_nic_get_settings(struct net_device *netdev,
return 0; return 0;
} }
static int sxg_nic_get_rx_csum(struct net_device *netdev) static u32 sxg_nic_get_rx_csum(struct net_device *netdev)
{ {
struct adapter_t *adapter = netdev_priv(netdev); struct adapter_t *adapter = netdev_priv(netdev);
return ((adapter->flags & SXG_RCV_IP_CSUM_ENABLED) || return ((adapter->flags & SXG_RCV_IP_CSUM_ENABLED) ||
...@@ -266,11 +266,12 @@ static void sxg_nic_get_regs(struct net_device *netdev, ...@@ -266,11 +266,12 @@ static void sxg_nic_get_regs(struct net_device *netdev,
memcpy((buff+sizeof(struct sxg_hw_regs)), UcodeRegs, sizeof(struct sxg_ucode_regs)); memcpy((buff+sizeof(struct sxg_hw_regs)), UcodeRegs, sizeof(struct sxg_ucode_regs));
} }
static int sxg_nic_get_wol(struct net_device *netdev, static void sxg_nic_get_wol(struct net_device *netdev,
struct ethtool_wolinfo *wol) struct ethtool_wolinfo *wol)
{ {
/* We dont support wake-on-lan */ /* We dont support wake-on-lan */
return -EOPNOTSUPP; wol->supported = 0;
memset(&wol->sopass, 0, sizeof(wol->sopass));
} }
static int sxg_nic_get_eeprom_len(struct net_device *netdev) static int sxg_nic_get_eeprom_len(struct net_device *netdev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册