diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-03-29 11:30:46 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-17 14:06:25 -0400 |
commit | 7bea36118ee888f0428d22ea6a5560de33e6e739 (patch) | |
tree | 2e51e35eebf297f15d55465182c5f5daedc2649f /drivers/staging | |
parent | 79bd1096bb31445a04b43e470e03d40d700a14a1 (diff) |
Staging: sxg: convert to netdev_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/sxg/sxg.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/drivers/staging/sxg/sxg.c b/drivers/staging/sxg/sxg.c index 891f6e334672..848d4be85a3d 100644 --- a/drivers/staging/sxg/sxg.c +++ b/drivers/staging/sxg/sxg.c | |||
@@ -896,6 +896,22 @@ static inline int sxg_read_config(struct adapter_t *adapter) | |||
896 | return status; | 896 | return status; |
897 | } | 897 | } |
898 | 898 | ||
899 | static const struct net_device_ops sxg_netdev_ops = { | ||
900 | .ndo_open = sxg_entry_open, | ||
901 | .ndo_stop = sxg_entry_halt, | ||
902 | .ndo_start_xmit = sxg_send_packets, | ||
903 | .ndo_do_ioctl = sxg_ioctl, | ||
904 | .ndo_change_mtu = sxg_change_mtu, | ||
905 | .ndo_get_stats = sxg_get_stats, | ||
906 | .ndo_set_multicast_list = sxg_mcast_set_list, | ||
907 | .ndo_validate_addr = eth_validate_addr, | ||
908 | #if XXXTODO | ||
909 | .ndo_set_mac_address = sxg_mac_set_address, | ||
910 | #else | ||
911 | .ndo_set_mac_address = eth_mac_addr, | ||
912 | #endif | ||
913 | }; | ||
914 | |||
899 | static int sxg_entry_probe(struct pci_dev *pcidev, | 915 | static int sxg_entry_probe(struct pci_dev *pcidev, |
900 | const struct pci_device_id *pci_tbl_entry) | 916 | const struct pci_device_id *pci_tbl_entry) |
901 | { | 917 | { |
@@ -1095,16 +1111,7 @@ static int sxg_entry_probe(struct pci_dev *pcidev, | |||
1095 | 1111 | ||
1096 | netdev->base_addr = (unsigned long)adapter->base_addr; | 1112 | netdev->base_addr = (unsigned long)adapter->base_addr; |
1097 | netdev->irq = adapter->irq; | 1113 | netdev->irq = adapter->irq; |
1098 | netdev->open = sxg_entry_open; | 1114 | netdev->netdev_ops = &sxg_netdev_ops; |
1099 | netdev->stop = sxg_entry_halt; | ||
1100 | netdev->hard_start_xmit = sxg_send_packets; | ||
1101 | netdev->do_ioctl = sxg_ioctl; | ||
1102 | netdev->change_mtu = sxg_change_mtu; | ||
1103 | #if XXXTODO | ||
1104 | netdev->set_mac_address = sxg_mac_set_address; | ||
1105 | #endif | ||
1106 | netdev->get_stats = sxg_get_stats; | ||
1107 | netdev->set_multicast_list = sxg_mcast_set_list; | ||
1108 | SET_ETHTOOL_OPS(netdev, &sxg_nic_ethtool_ops); | 1115 | SET_ETHTOOL_OPS(netdev, &sxg_nic_ethtool_ops); |
1109 | netdev->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM; | 1116 | netdev->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM; |
1110 | err = sxg_set_interrupt_capability(adapter); | 1117 | err = sxg_set_interrupt_capability(adapter); |