aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic_main.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-12-15 10:57:08 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-26 16:17:36 -0500
commit92104e94806f47e090e3bb40f6ae45f695351a5e (patch)
tree0af2214369f7867a4fa4aa72de782e7b761b7a64 /drivers/net/netxen/netxen_nic_main.c
parent3bf8ba38f38d3647368e4edcf7d019f9f8d9184a (diff)
netxen: remove private ioctl
The netxen driver includes a private ioctl that provides access to functionality that is already available in other ways. The PCI layer has application access hooks (see setpci), and the statistics are available in ethtool/netstats. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_main.c')
-rw-r--r--drivers/net/netxen/netxen_nic_main.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 575b71b67202..1658ca1fa230 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -38,7 +38,6 @@
38#include "netxen_nic.h" 38#include "netxen_nic.h"
39#define DEFINE_GLOBAL_RECV_CRB 39#define DEFINE_GLOBAL_RECV_CRB
40#include "netxen_nic_phan_reg.h" 40#include "netxen_nic_phan_reg.h"
41#include "netxen_nic_ioctl.h"
42 41
43#include <linux/dma-mapping.h> 42#include <linux/dma-mapping.h>
44#include <linux/vmalloc.h> 43#include <linux/vmalloc.h>
@@ -75,8 +74,6 @@ static void netxen_tx_timeout(struct net_device *netdev);
75static void netxen_tx_timeout_task(struct work_struct *work); 74static void netxen_tx_timeout_task(struct work_struct *work);
76static void netxen_watchdog(unsigned long); 75static void netxen_watchdog(unsigned long);
77static int netxen_handle_int(struct netxen_adapter *, struct net_device *); 76static int netxen_handle_int(struct netxen_adapter *, struct net_device *);
78static int netxen_nic_ioctl(struct net_device *netdev,
79 struct ifreq *ifr, int cmd);
80static int netxen_nic_poll(struct net_device *dev, int *budget); 77static int netxen_nic_poll(struct net_device *dev, int *budget);
81#ifdef CONFIG_NET_POLL_CONTROLLER 78#ifdef CONFIG_NET_POLL_CONTROLLER
82static void netxen_nic_poll_controller(struct net_device *netdev); 79static void netxen_nic_poll_controller(struct net_device *netdev);
@@ -383,7 +380,6 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
383 netdev->set_multicast_list = netxen_nic_set_multi; 380 netdev->set_multicast_list = netxen_nic_set_multi;
384 netdev->set_mac_address = netxen_nic_set_mac; 381 netdev->set_mac_address = netxen_nic_set_mac;
385 netdev->change_mtu = netxen_nic_change_mtu; 382 netdev->change_mtu = netxen_nic_change_mtu;
386 netdev->do_ioctl = netxen_nic_ioctl;
387 netdev->tx_timeout = netxen_tx_timeout; 383 netdev->tx_timeout = netxen_tx_timeout;
388 netdev->watchdog_timeo = HZ; 384 netdev->watchdog_timeo = HZ;
389 385
@@ -1137,47 +1133,6 @@ static void netxen_nic_poll_controller(struct net_device *netdev)
1137 enable_irq(adapter->irq); 1133 enable_irq(adapter->irq);
1138} 1134}
1139#endif 1135#endif
1140/*
1141 * netxen_nic_ioctl () We provide the tcl/phanmon support through these
1142 * ioctls.
1143 */
1144static int
1145netxen_nic_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
1146{
1147 int err = 0;
1148 unsigned long nr_bytes = 0;
1149 struct netxen_port *port = netdev_priv(netdev);
1150 struct netxen_adapter *adapter = port->adapter;
1151 char dev_name[NETXEN_NIC_NAME_LEN];
1152
1153 DPRINTK(INFO, "doing ioctl for %s\n", netdev->name);
1154 switch (cmd) {
1155 case NETXEN_NIC_CMD:
1156 err = netxen_nic_do_ioctl(adapter, (void *)ifr->ifr_data, port);
1157 break;
1158
1159 case NETXEN_NIC_NAME:
1160 DPRINTK(INFO, "ioctl cmd for NetXen\n");
1161 if (ifr->ifr_data) {
1162 sprintf(dev_name, "%s-%d", NETXEN_NIC_NAME_RSP,
1163 port->portnum);
1164 nr_bytes =
1165 copy_to_user((char __user *)ifr->ifr_data, dev_name,
1166 NETXEN_NIC_NAME_LEN);
1167 if (nr_bytes)
1168 err = -EIO;
1169
1170 }
1171 break;
1172
1173 default:
1174 DPRINTK(INFO, "ioctl cmd %x not supported\n", cmd);
1175 err = -EOPNOTSUPP;
1176 break;
1177 }
1178
1179 return err;
1180}
1181 1136
1182static struct pci_driver netxen_driver = { 1137static struct pci_driver netxen_driver = {
1183 .name = netxen_nic_driver_name, 1138 .name = netxen_nic_driver_name,