summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-05-02 19:51:56 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-05-02 19:51:56 +0000
commit2797601c5615fe158d369f607597926c28a7a3c7 (patch)
treeee25bf8e72609b8bc6ab2b3123b561188200eb26
parentf6b0b922544abd7b69d3f2870db7a2c3c229d410 (diff)
[package] make acx available to PCI platforms as well (#7174)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21313 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/acx/Makefile2
-rw-r--r--package/acx/patches/006-netdev_ops.patch47
2 files changed, 38 insertions, 11 deletions
diff --git a/package/acx/Makefile b/package/acx/Makefile
index 64725be26..caa55c577 100644
--- a/package/acx/Makefile
+++ b/package/acx/Makefile
@@ -25,7 +25,7 @@ include $(INCLUDE_DIR)/package.mk
define KernelPackage/acx
TITLE:=Driver for TI ACX1xx chipset
- DEPENDS:=@LINUX_2_6 @TARGET_ar7 +wireless-tools
+ DEPENDS:=@LINUX_2_6 @PCI_SUPPORT||TARGET_ar7 +wireless-tools
URL:=http://acx100.sourceforge.net/
SUBMENU:=Wireless Drivers
FILES:= $(PKG_BUILD_DIR)/acx.$(LINUX_KMOD_SUFFIX)
diff --git a/package/acx/patches/006-netdev_ops.patch b/package/acx/patches/006-netdev_ops.patch
index 210e92935..b687c211c 100644
--- a/package/acx/patches/006-netdev_ops.patch
+++ b/package/acx/patches/006-netdev_ops.patch
@@ -1,10 +1,12 @@
---- a/pci.c
-+++ b/pci.c
-@@ -4135,6 +4135,18 @@ static struct vlynq_device_id acx_vlynq_
- { 0, 0, 0 },
- };
+Index: acx-20080210/pci.c
+===================================================================
+--- acx-20080210.orig/pci.c 2010-05-02 21:37:00.000000000 +0200
++++ acx-20080210/pci.c 2010-05-02 21:48:22.000000000 +0200
+@@ -1437,6 +1437,18 @@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+ static void dummy_netdev_init(struct net_device *ndev) {}
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
+static const struct net_device_ops acx_netdev_ops = {
+ .ndo_open = &acxpci_e_open,
+ .ndo_stop = &acxpci_e_close,
@@ -16,14 +18,39 @@
+};
+#endif
+
- static __devinit int vlynq_probe(struct vlynq_device *vdev,
- struct vlynq_device_id *id)
+ #ifdef CONFIG_PCI
+ static int __devinit acxpci_e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
-@@ -4191,17 +4203,24 @@ static __devinit int vlynq_probe(struct
+@@ -1547,17 +1559,21 @@
+ }
+
+ ether_setup(ndev);
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
+ 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;
++#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;
+ ndev->irq = pdev->irq;
+ ndev->base_addr = pci_resource_start(pdev, 0);
+@@ -4191,17 +4207,24 @@
goto fail_alloc_netdev;
}
ether_setup(ndev);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
ndev->open = &acxpci_e_open;
ndev->stop = &acxpci_e_close;
ndev->hard_start_xmit = &acx_i_start_xmit;