mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-01 14:21:54 +02:00
9884360674
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20448 3c298f89-4303-0410-b956-a3cf2f4a3e73
50 lines
1.6 KiB
Diff
50 lines
1.6 KiB
Diff
--- a/pci.c
|
|
+++ b/pci.c
|
|
@@ -4135,6 +4135,18 @@ static struct vlynq_device_id acx_vlynq_
|
|
{ 0, 0, 0 },
|
|
};
|
|
|
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
|
|
+static const struct net_device_ops acx_netdev_ops = {
|
|
+ .ndo_open = &acxpci_e_open,
|
|
+ .ndo_stop = &acxpci_e_close,
|
|
+ .ndo_start_xmit = &acx_i_start_xmit,
|
|
+ .ndo_get_stats = &acx_e_get_stats,
|
|
+ .ndo_set_multicast_list = &acxpci_i_set_multicast_list,
|
|
+ .ndo_tx_timeout = &acxpci_i_tx_timeout,
|
|
+ .ndo_change_mtu = &acx_e_change_mtu,
|
|
+};
|
|
+#endif
|
|
+
|
|
static __devinit int vlynq_probe(struct vlynq_device *vdev,
|
|
struct vlynq_device_id *id)
|
|
{
|
|
@@ -4191,17 +4203,24 @@ static __devinit int vlynq_probe(struct
|
|
goto fail_alloc_netdev;
|
|
}
|
|
ether_setup(ndev);
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
|
|
ndev->open = &acxpci_e_open;
|
|
ndev->stop = &acxpci_e_close;
|
|
ndev->hard_start_xmit = &acx_i_start_xmit;
|
|
ndev->get_stats = &acx_e_get_stats;
|
|
+ ndev->set_multicast_list = &acxpci_i_set_multicast_list;
|
|
+ ndev->tx_timeout = &acxpci_i_tx_timeout;
|
|
+ ndev->change_mtu = &acx_e_change_mtu;
|
|
+ ndev->set_multicast_list = &acxpci_i_set_multicast_list;
|
|
+ ndev->tx_timeout = &acxpci_i_tx_timeout;
|
|
+ ndev->change_mtu = &acx_e_change_mtu;
|
|
+#else
|
|
+ ndev->netdev_ops = &acx_netdev_ops;
|
|
+#endif
|
|
#if IW_HANDLER_VERSION <= 5
|
|
ndev->get_wireless_stats = &acx_e_get_wireless_stats;
|
|
#endif
|
|
ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
|
|
- ndev->set_multicast_list = &acxpci_i_set_multicast_list;
|
|
- ndev->tx_timeout = &acxpci_i_tx_timeout;
|
|
- ndev->change_mtu = &acx_e_change_mtu;
|
|
ndev->watchdog_timeo = 4 * HZ;
|
|
|
|
adev = ndev2adev(ndev);
|