summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/prism54
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-03-20 19:36:34 +0000
committerDavid S. Miller <davem@davemloft.net>2009-03-21 22:51:23 -0700
commit6685254f80cdca085cb1d53c45a6d0d5d01f911e (patch)
tree786ed20b818cbff04a981a99e28477a741553094 /drivers/net/wireless/prism54
parent98d2faaeb72a2db4ea232263ca4ce9dbfe8e1f5a (diff)
downloadop-kernel-dev-6685254f80cdca085cb1d53c45a6d0d5d01f911e.zip
op-kernel-dev-6685254f80cdca085cb1d53c45a6d0d5d01f911e.tar.gz
prism54: convert to net_device_ops
Also, make ethtool_ops const as it should be, and get rid of useless cast. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/prism54')
-rw-r--r--drivers/net/wireless/prism54/islpci_dev.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c
index 9196825..6e7d71c 100644
--- a/drivers/net/wireless/prism54/islpci_dev.c
+++ b/drivers/net/wireless/prism54/islpci_dev.c
@@ -804,10 +804,23 @@ static void islpci_ethtool_get_drvinfo(struct net_device *dev,
strcpy(info->version, DRV_VERSION);
}
-static struct ethtool_ops islpci_ethtool_ops = {
+static const struct ethtool_ops islpci_ethtool_ops = {
.get_drvinfo = islpci_ethtool_get_drvinfo,
};
+static const struct net_device_ops islpci_netdev_ops = {
+ .ndo_open = islpci_open,
+ .ndo_stop = islpci_close,
+ .ndo_get_stats = islpci_statistics,
+ .ndo_do_ioctl = prism54_ioctl,
+ .ndo_start_xmit = islpci_eth_transmit,
+ .ndo_tx_timeout = islpci_eth_tx_timeout,
+ .ndo_set_mac_address = prism54_set_mac_address,
+ .ndo_change_mtu = eth_change_mtu,
+ .ndo_set_mac_address = eth_mac_addr,
+ .ndo_validate_addr = eth_validate_addr,
+};
+
struct net_device *
islpci_setup(struct pci_dev *pdev)
{
@@ -827,25 +840,16 @@ islpci_setup(struct pci_dev *pdev)
ndev->irq = pdev->irq;
/* initialize the function pointers */
- ndev->open = &islpci_open;
- ndev->stop = &islpci_close;
- ndev->get_stats = &islpci_statistics;
- ndev->do_ioctl = &prism54_ioctl;
- ndev->wireless_handlers =
- (struct iw_handler_def *) &prism54_handler_def;
+ ndev->netdev_ops = &islpci_netdev_ops;
+ ndev->wireless_handlers = &prism54_handler_def;
ndev->ethtool_ops = &islpci_ethtool_ops;
- ndev->hard_start_xmit = &islpci_eth_transmit;
/* ndev->set_multicast_list = &islpci_set_multicast_list; */
ndev->addr_len = ETH_ALEN;
- ndev->set_mac_address = &prism54_set_mac_address;
/* Get a non-zero dummy MAC address for nameif. Jean II */
memcpy(ndev->dev_addr, dummy_mac, 6);
-#ifdef HAVE_TX_TIMEOUT
ndev->watchdog_timeo = ISLPCI_TX_TIMEOUT;
- ndev->tx_timeout = &islpci_eth_tx_timeout;
-#endif
/* allocate a private device structure to the network device */
priv = netdev_priv(ndev);
OpenPOWER on IntegriCloud