aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar_ethtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/gianfar_ethtool.c')
-rw-r--r--drivers/net/gianfar_ethtool.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c
index d69698c695e..6d71bea5e90 100644
--- a/drivers/net/gianfar_ethtool.c
+++ b/drivers/net/gianfar_ethtool.c
@@ -10,12 +10,11 @@
10 * 10 *
11 * Copyright (c) 2003,2004 Freescale Semiconductor, Inc. 11 * Copyright (c) 2003,2004 Freescale Semiconductor, Inc.
12 * 12 *
13 * This software may be used and distributed according to 13 * This software may be used and distributed according to
14 * the terms of the GNU Public License, Version 2, incorporated herein 14 * the terms of the GNU Public License, Version 2, incorporated herein
15 * by reference. 15 * by reference.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
21#include <linux/string.h> 20#include <linux/string.h>
@@ -203,7 +202,7 @@ static int gfar_gsettings(struct net_device *dev, struct ethtool_cmd *cmd)
203 202
204 if (NULL == phydev) 203 if (NULL == phydev)
205 return -ENODEV; 204 return -ENODEV;
206 205
207 cmd->maxtxpkt = priv->txcount; 206 cmd->maxtxpkt = priv->txcount;
208 cmd->maxrxpkt = priv->rxcount; 207 cmd->maxrxpkt = priv->rxcount;
209 208
@@ -282,7 +281,7 @@ static unsigned int gfar_ticks2usecs(struct gfar_private *priv, unsigned int tic
282static int gfar_gcoalesce(struct net_device *dev, struct ethtool_coalesce *cvals) 281static int gfar_gcoalesce(struct net_device *dev, struct ethtool_coalesce *cvals)
283{ 282{
284 struct gfar_private *priv = netdev_priv(dev); 283 struct gfar_private *priv = netdev_priv(dev);
285 284
286 if (!(priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_COALESCE)) 285 if (!(priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_COALESCE))
287 return -EOPNOTSUPP; 286 return -EOPNOTSUPP;
288 287
@@ -556,19 +555,19 @@ static uint32_t gfar_get_tx_csum(struct net_device *dev)
556} 555}
557 556
558static uint32_t gfar_get_msglevel(struct net_device *dev) 557static uint32_t gfar_get_msglevel(struct net_device *dev)
559{ 558{
560 struct gfar_private *priv = netdev_priv(dev); 559 struct gfar_private *priv = netdev_priv(dev);
561 return priv->msg_enable; 560 return priv->msg_enable;
562} 561}
563 562
564static void gfar_set_msglevel(struct net_device *dev, uint32_t data) 563static void gfar_set_msglevel(struct net_device *dev, uint32_t data)
565{ 564{
566 struct gfar_private *priv = netdev_priv(dev); 565 struct gfar_private *priv = netdev_priv(dev);
567 priv->msg_enable = data; 566 priv->msg_enable = data;
568} 567}
569 568
570 569
571struct ethtool_ops gfar_ethtool_ops = { 570const struct ethtool_ops gfar_ethtool_ops = {
572 .get_settings = gfar_gsettings, 571 .get_settings = gfar_gsettings,
573 .set_settings = gfar_ssettings, 572 .set_settings = gfar_ssettings,
574 .get_drvinfo = gfar_gdrvinfo, 573 .get_drvinfo = gfar_gdrvinfo,