diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-03-20 15:36:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-22 01:51:23 -0400 |
commit | 6685254f80cdca085cb1d53c45a6d0d5d01f911e (patch) | |
tree | 786ed20b818cbff04a981a99e28477a741553094 /drivers | |
parent | 98d2faaeb72a2db4ea232263ca4ce9dbfe8e1f5a (diff) |
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')
-rw-r--r-- | drivers/net/wireless/prism54/islpci_dev.c | 28 |
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 9196825ed1b5..6e7d71c54091 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, | |||
804 | strcpy(info->version, DRV_VERSION); | 804 | strcpy(info->version, DRV_VERSION); |
805 | } | 805 | } |
806 | 806 | ||
807 | static struct ethtool_ops islpci_ethtool_ops = { | 807 | static const struct ethtool_ops islpci_ethtool_ops = { |
808 | .get_drvinfo = islpci_ethtool_get_drvinfo, | 808 | .get_drvinfo = islpci_ethtool_get_drvinfo, |
809 | }; | 809 | }; |
810 | 810 | ||
811 | static const struct net_device_ops islpci_netdev_ops = { | ||
812 | .ndo_open = islpci_open, | ||
813 | .ndo_stop = islpci_close, | ||
814 | .ndo_get_stats = islpci_statistics, | ||
815 | .ndo_do_ioctl = prism54_ioctl, | ||
816 | .ndo_start_xmit = islpci_eth_transmit, | ||
817 | .ndo_tx_timeout = islpci_eth_tx_timeout, | ||
818 | .ndo_set_mac_address = prism54_set_mac_address, | ||
819 | .ndo_change_mtu = eth_change_mtu, | ||
820 | .ndo_set_mac_address = eth_mac_addr, | ||
821 | .ndo_validate_addr = eth_validate_addr, | ||
822 | }; | ||
823 | |||
811 | struct net_device * | 824 | struct net_device * |
812 | islpci_setup(struct pci_dev *pdev) | 825 | islpci_setup(struct pci_dev *pdev) |
813 | { | 826 | { |
@@ -827,25 +840,16 @@ islpci_setup(struct pci_dev *pdev) | |||
827 | ndev->irq = pdev->irq; | 840 | ndev->irq = pdev->irq; |
828 | 841 | ||
829 | /* initialize the function pointers */ | 842 | /* initialize the function pointers */ |
830 | ndev->open = &islpci_open; | 843 | ndev->netdev_ops = &islpci_netdev_ops; |
831 | ndev->stop = &islpci_close; | 844 | ndev->wireless_handlers = &prism54_handler_def; |
832 | ndev->get_stats = &islpci_statistics; | ||
833 | ndev->do_ioctl = &prism54_ioctl; | ||
834 | ndev->wireless_handlers = | ||
835 | (struct iw_handler_def *) &prism54_handler_def; | ||
836 | ndev->ethtool_ops = &islpci_ethtool_ops; | 845 | ndev->ethtool_ops = &islpci_ethtool_ops; |
837 | 846 | ||
838 | ndev->hard_start_xmit = &islpci_eth_transmit; | ||
839 | /* ndev->set_multicast_list = &islpci_set_multicast_list; */ | 847 | /* ndev->set_multicast_list = &islpci_set_multicast_list; */ |
840 | ndev->addr_len = ETH_ALEN; | 848 | ndev->addr_len = ETH_ALEN; |
841 | ndev->set_mac_address = &prism54_set_mac_address; | ||
842 | /* Get a non-zero dummy MAC address for nameif. Jean II */ | 849 | /* Get a non-zero dummy MAC address for nameif. Jean II */ |
843 | memcpy(ndev->dev_addr, dummy_mac, 6); | 850 | memcpy(ndev->dev_addr, dummy_mac, 6); |
844 | 851 | ||
845 | #ifdef HAVE_TX_TIMEOUT | ||
846 | ndev->watchdog_timeo = ISLPCI_TX_TIMEOUT; | 852 | ndev->watchdog_timeo = ISLPCI_TX_TIMEOUT; |
847 | ndev->tx_timeout = &islpci_eth_tx_timeout; | ||
848 | #endif | ||
849 | 853 | ||
850 | /* allocate a private device structure to the network device */ | 854 | /* allocate a private device structure to the network device */ |
851 | priv = netdev_priv(ndev); | 855 | priv = netdev_priv(ndev); |