staging: rtl8192e: Cleanup checkpatch -f warnings and errors - Part VIII
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / staging / rtl8192e / rtl_ethtool.c
blob36452fb7cef8e0a6000f4d91b96306dcb323636e
1 /******************************************************************************
2 * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
4 * Based on the r8180 driver, which is:
5 * Copyright 2004-2005 Andrea Merello <andreamrl@tiscali.it>, et al.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of version 2 of the GNU General Public License as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 * The full GNU General Public License is included in this distribution in the
20 * file called LICENSE.
22 * Contact Information:
23 * wlanfae <wlanfae@realtek.com>
24 *****************************************************************************
26 #include <linux/netdevice.h>
27 #include <linux/ethtool.h>
28 #include <linux/delay.h>
30 #include "rtl_core.h"
32 static void rtl819x_ethtool_get_drvinfo(struct net_device *dev,
33 struct ethtool_drvinfo *info)
35 struct r8192_priv *priv = rtllib_priv(dev);
37 strcpy(info->driver, DRV_NAME);
38 strcpy(info->version, DRV_VERSION);
39 strcpy(info->bus_info, pci_name(priv->pdev));
42 static u32 rtl819x_ethtool_get_link(struct net_device *dev)
44 struct r8192_priv *priv = rtllib_priv(dev);
46 return ((priv->rtllib->state == RTLLIB_LINKED) ||
47 (priv->rtllib->state == RTLLIB_LINKED_SCANNING));
50 const struct ethtool_ops rtl819x_ethtool_ops = {
51 .get_drvinfo = rtl819x_ethtool_get_drvinfo,
52 .get_link = rtl819x_ethtool_get_link,