X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Fgianfar_ethtool.c;h=7b411c1514db364c1c662d7abb3e90a4c8ea6356;hb=a9bde1d88c49cd7ab4faae5110261046555dd7a3;hp=e0f505285e5088535d0d809a0e302324de827985;hpb=e37a72de84d27ee8bc0e7dbb5c2f1774ed306dbb;p=linux-2.6-omap-h63xx.git diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c index e0f505285e5..7b411c1514d 100644 --- a/drivers/net/gianfar_ethtool.c +++ b/drivers/net/gianfar_ethtool.c @@ -10,13 +10,12 @@ * * Copyright (c) 2003,2004 Freescale Semiconductor, Inc. * - * This software may be used and distributed according to - * the terms of the GNU Public License, Version 2, incorporated herein + * This software may be used and distributed according to + * the terms of the GNU Public License, Version 2, incorporated herein * by reference. */ #include -#include #include #include #include @@ -42,8 +41,6 @@ #include "gianfar.h" -#define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0)) - extern void gfar_start(struct net_device *dev); extern int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit); @@ -202,7 +199,7 @@ static int gfar_gsettings(struct net_device *dev, struct ethtool_cmd *cmd) if (NULL == phydev) return -ENODEV; - + cmd->maxtxpkt = priv->txcount; cmd->maxrxpkt = priv->rxcount; @@ -281,7 +278,7 @@ static unsigned int gfar_ticks2usecs(struct gfar_private *priv, unsigned int tic static int gfar_gcoalesce(struct net_device *dev, struct ethtool_coalesce *cvals) { struct gfar_private *priv = netdev_priv(dev); - + if (!(priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_COALESCE)) return -EOPNOTSUPP; @@ -555,19 +552,19 @@ static uint32_t gfar_get_tx_csum(struct net_device *dev) } static uint32_t gfar_get_msglevel(struct net_device *dev) -{ +{ struct gfar_private *priv = netdev_priv(dev); return priv->msg_enable; -} - +} + static void gfar_set_msglevel(struct net_device *dev, uint32_t data) -{ +{ struct gfar_private *priv = netdev_priv(dev); priv->msg_enable = data; } -struct ethtool_ops gfar_ethtool_ops = { +const struct ethtool_ops gfar_ethtool_ops = { .get_settings = gfar_gsettings, .set_settings = gfar_ssettings, .get_drvinfo = gfar_gdrvinfo,