From: Greg Kroah-Hartman Date: Wed, 21 Jan 2009 16:12:10 +0000 (-0800) Subject: Staging: sxg: fix build warnings in sxg_ethtool X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a7c0ea6e954635c7c9c60a197320e2fd72a42078;p=mv-sheeva.git 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 Cc: LinSysSoft Sahara Team Cc: Christopher Harrer Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/sxg/sxg_ethtool.c b/drivers/staging/sxg/sxg_ethtool.c index a0632072a55..000c4d66e6f 100644 --- a/drivers/staging/sxg/sxg_ethtool.c +++ b/drivers/staging/sxg/sxg_ethtool.c @@ -161,14 +161,14 @@ static int sxg_nic_set_settings(struct net_device *netdev, return -EOPNOTSUPP; } -static int +static void sxg_nic_get_strings(struct net_device *netdev, u32 stringset, u8 * data) { int index; switch(stringset) { - case ETH_SS_TEST: - return -EOPNOTSUPP; + case ETH_SS_TEST: + /* return -EOPNOTSUPP; */ break; case ETH_SS_STATS: for (index = 0; index < SXG_NIC_STATS_LEN; index++) { @@ -228,7 +228,7 @@ static int sxg_nic_get_settings(struct net_device *netdev, 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); return ((adapter->flags & SXG_RCV_IP_CSUM_ENABLED) || @@ -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)); } -static int sxg_nic_get_wol(struct net_device *netdev, - struct ethtool_wolinfo *wol) +static void sxg_nic_get_wol(struct net_device *netdev, + struct ethtool_wolinfo *wol) { /* 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)