mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-18 15:59:43 +02:00
23f27ea50b
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20648 3c298f89-4303-0410-b956-a3cf2f4a3e73
57 lines
1.8 KiB
Diff
57 lines
1.8 KiB
Diff
--- a/Embedded/src/GbE/iegbe_main.c
|
|
+++ b/Embedded/src/GbE/iegbe_main.c
|
|
@@ -724,6 +724,26 @@ static void iegbe_dump_eeprom(struct ieg
|
|
kfree(data);
|
|
}
|
|
|
|
+static const struct net_device_ops iegbe_netdev_ops = {
|
|
+ .ndo_open = iegbe_open,
|
|
+ .ndo_stop = iegbe_close,
|
|
+ .ndo_start_xmit = iegbe_xmit_frame,
|
|
+ .ndo_get_stats = iegbe_get_stats,
|
|
+ .ndo_set_rx_mode = iegbe_set_rx_mode,
|
|
+ .ndo_set_mac_address = iegbe_set_mac,
|
|
+ .ndo_tx_timeout = iegbe_tx_timeout,
|
|
+ .ndo_change_mtu = iegbe_change_mtu,
|
|
+ .ndo_do_ioctl = iegbe_ioctl,
|
|
+ .ndo_validate_addr = eth_validate_addr,
|
|
+
|
|
+ .ndo_vlan_rx_register = iegbe_vlan_rx_register,
|
|
+ .ndo_vlan_rx_add_vid = iegbe_vlan_rx_add_vid,
|
|
+ .ndo_vlan_rx_kill_vid = iegbe_vlan_rx_kill_vid,
|
|
+#ifdef CONFIG_NET_POLL_CONTROLLER
|
|
+ .ndo_poll_controller = iegbe_netpoll,
|
|
+#endif
|
|
+};
|
|
+
|
|
/**
|
|
* iegbe_probe - Device Initialization Routine
|
|
* @pdev: PCI device information struct
|
|
@@ -800,24 +820,11 @@ static int __devinit iegbe_probe(struct
|
|
if (!hw->hw_addr)
|
|
goto err_ioremap;
|
|
|
|
- netdev->open = &iegbe_open;
|
|
- netdev->stop = &iegbe_close;
|
|
- netdev->hard_start_xmit = &iegbe_xmit_frame;
|
|
- netdev->get_stats = &iegbe_get_stats;
|
|
- netdev->set_rx_mode = &iegbe_set_rx_mode;
|
|
- netdev->set_mac_address = &iegbe_set_mac;
|
|
- netdev->change_mtu = &iegbe_change_mtu;
|
|
- netdev->do_ioctl = &iegbe_ioctl;
|
|
+ netdev->netdev_ops = &iegbe_netdev_ops;
|
|
set_ethtool_ops(netdev);
|
|
- netdev->tx_timeout = &iegbe_tx_timeout;
|
|
netdev->watchdog_timeo = 5 * HZ;
|
|
netif_napi_add(netdev, &adapter->napi, iegbe_clean, 64);
|
|
- netdev->vlan_rx_register = iegbe_vlan_rx_register;
|
|
- netdev->vlan_rx_add_vid = iegbe_vlan_rx_add_vid;
|
|
- netdev->vlan_rx_kill_vid = iegbe_vlan_rx_kill_vid;
|
|
-#ifdef CONFIG_NET_POLL_CONTROLLER
|
|
- netdev->poll_controller = iegbe_netpoll;
|
|
-#endif
|
|
+
|
|
strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
|
|
|
|
|