summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2007-08-28 16:02:14 +0000
committerNicolas Thill <nico@openwrt.org>2007-08-28 16:02:14 +0000
commitec70a7a19f472cca7f657ba96f3fcdeb2dd90198 (patch)
tree5d3293583537cc8a146f6bc4153980f6c2c7843c /package
parent902db2062ef52cfdc75c618bb0728c5fa47f4880 (diff)
downloadmtk-20170518-ec70a7a19f472cca7f657ba96f3fcdeb2dd90198.zip
mtk-20170518-ec70a7a19f472cca7f657ba96f3fcdeb2dd90198.tar.gz
mtk-20170518-ec70a7a19f472cca7f657ba96f3fcdeb2dd90198.tar.bz2
add acx-mac80211 (thanks to Matteo Croce)
SVN-Revision: 8531
Diffstat (limited to 'package')
-rw-r--r--package/acx-mac80211/Makefile58
-rw-r--r--package/acx-mac80211/patches/001-build_module.diff11
-rw-r--r--package/acx-mac80211/patches/002-no_reset.diff20
-rw-r--r--package/acx-mac80211/patches/003-endianness_fixes.patch109
4 files changed, 198 insertions, 0 deletions
diff --git a/package/acx-mac80211/Makefile b/package/acx-mac80211/Makefile
new file mode 100644
index 0000000..ee3f653
--- /dev/null
+++ b/package/acx-mac80211/Makefile
@@ -0,0 +1,58 @@
+#
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=acx-mac80211
+PKG_VERSION:=20070610
+PKG_RELEASE:=
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://www.hauke-m.de/fileadmin/acx
+PKG_MD5SUM:=7c6c70722a5a2ad6ad25075467ea4909
+
+PKG_FW_NAME:=tiacx111c16
+PKG_FW_URL:=http://teknoraver.campuslife.it/software/acx-mac80211/
+PKG_FW_MD5SUM:=7026826460376f6b174f9225bd7781b9
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/acx-mac80211
+ SUBMENU:=Wireless Drivers
+ TITLE:=ACX111 Mac80211 driver
+ DESCRIPTION:=Driver for acx111 cards (Mac80211 version)
+ DEPENDS:=@LINUX_2_6 +kmod-mac80211
+ VERSION:=$(PKG_VERSION)+$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)
+ KCONFIG:=CONFIG_MAC80211
+ FILES:=$(PKG_BUILD_DIR)/acx-mac80211.$(LINUX_KMOD_SUFFIX)
+ AUTOLOAD:=$(call AutoLoad,50,acx-mac80211)
+endef
+
+$(STAMP_BUILT): $(DL_DIR)/$(PKG_FW_NAME)
+
+$(DL_DIR)/$(PKG_FW_NAME):
+ $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_FW_NAME)" "$(PKG_FW_MD5SUM)" $(PKG_FW_URL)
+
+define Build/Compile
+ $(MAKE) -C "$(LINUX_DIR)" \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ ARCH="$(LINUX_KARCH)" \
+ SUBDIRS="$(PKG_BUILD_DIR)" \
+ CONFIG_ACX_MAC80211=m \
+ CONFIG_ACX_MAC80211_PCI=m \
+ EXTRA_CFLAGS="-DCONFIG_ACX_MAC80211_PCI -DCONFIG_ACX_PCI_DEBUG_MAX -I$(PKG_BUILD_DIR)/../mac80211" \
+ modules
+endef
+
+define KernelPackage/acx-mac80211/install
+ mkdir -p $(1)/lib/firmware
+ $(INSTALL_DATA) $(DL_DIR)/$(PKG_FW_NAME) $(1)/lib/firmware/
+endef
+
+$(eval $(call KernelPackage,acx-mac80211))
diff --git a/package/acx-mac80211/patches/001-build_module.diff b/package/acx-mac80211/patches/001-build_module.diff
new file mode 100644
index 0000000..3c1fcda
--- /dev/null
+++ b/package/acx-mac80211/patches/001-build_module.diff
@@ -0,0 +1,11 @@
+--- acx-mac80211-20070610/Makefile 2007-06-10 20:23:27.000000000 +0200
++++ acx-mac80211-20070610//Makefile 2007-07-23 17:00:34.000000000 +0200
+@@ -4,7 +4,7 @@
+ acx-mac80211-obj-$(CONFIG_ACX_MAC80211_USB) += usb.o
+
+ #acx-mac80211-objs := wlan.o conv.o ioctl.o common.o $(acx-mac80211-obj-y)
+-acx-mac80211-objs := common.o $(acx-mac80211-obj-y)
++acx-mac80211-objs := common.o $(acx-mac80211-obj-m)
+
+ # Use this if you have proper Kconfig integration:
+
diff --git a/package/acx-mac80211/patches/002-no_reset.diff b/package/acx-mac80211/patches/002-no_reset.diff
new file mode 100644
index 0000000..1166d07
--- /dev/null
+++ b/package/acx-mac80211/patches/002-no_reset.diff
@@ -0,0 +1,20 @@
+Index: acx-20070101/pci.c
+===================================================================
+--- acx-20070101.orig/pci.c 2007-06-04 13:22:42.489395912 +0200
++++ acx-20070101/pci.c 2007-06-04 13:22:42.557385576 +0200
+@@ -925,10 +925,13 @@
+
+ acx_lock(adev, flags);
+
+- acxpci_l_reset_mac(adev);
+-
+ ecpu_ctrl = read_reg16(adev, IO_ACX_ECPU_CTRL) & 1;
+ if (!ecpu_ctrl) {
++ acxpci_l_reset_mac(adev);
++ ecpu_ctrl = read_reg16(adev, IO_ACX_ECPU_CTRL) & 1;
++ }
++
++ if (!ecpu_ctrl) {
+ msg = "eCPU is already running. ";
+ goto end_unlock;
+ }
diff --git a/package/acx-mac80211/patches/003-endianness_fixes.patch b/package/acx-mac80211/patches/003-endianness_fixes.patch
new file mode 100644
index 0000000..5ced164
--- /dev/null
+++ b/package/acx-mac80211/patches/003-endianness_fixes.patch
@@ -0,0 +1,109 @@
+--- acx-mac80211-20070610/pci.c 2007-06-10 20:23:27.000000000 +0200
++++ acx-mac80211-20070610/pci.c 2007-07-23 16:49:06.000000000 +0200
+@@ -104,6 +104,11 @@
+ ** Register access
+ */
+
++#define acx_readl(v) le32_to_cpu(readl((v)))
++#define acx_readw(v) le16_to_cpu(readw((v)))
++#define acx_writew(v,r) writew(le16_to_cpu((v)), r)
++#define acx_writel(v,r) writel(le32_to_cpu((v)), r)
++
+ /* Pick one */
+ /* #define INLINE_IO static */
+ #define INLINE_IO static inline
+@@ -111,16 +116,16 @@
+ INLINE_IO u32 read_reg32(acx_device_t * adev, unsigned int offset)
+ {
+ #if ACX_IO_WIDTH == 32
+- return readl((u8 *) adev->iobase + adev->io[offset]);
++ return acx_readl((u8 *) adev->iobase + adev->io[offset]);
+ #else
+- return readw((u8 *) adev->iobase + adev->io[offset])
+- + (readw((u8 *) adev->iobase + adev->io[offset] + 2) << 16);
++ return acx_readw((u8 *) adev->iobase + adev->io[offset])
++ + (acx_readw((u8 *) adev->iobase + adev->io[offset] + 2) << 16);
+ #endif
+ }
+
+ INLINE_IO u16 read_reg16(acx_device_t * adev, unsigned int offset)
+ {
+- return readw((u8 *) adev->iobase + adev->io[offset]);
++ return acx_readw((u8 *) adev->iobase + adev->io[offset]);
+ }
+
+ INLINE_IO u8 read_reg8(acx_device_t * adev, unsigned int offset)
+@@ -131,16 +136,16 @@
+ INLINE_IO void write_reg32(acx_device_t * adev, unsigned int offset, u32 val)
+ {
+ #if ACX_IO_WIDTH == 32
+- writel(val, (u8 *) adev->iobase + adev->io[offset]);
++ acx_writel(val, (u8 *) adev->iobase + adev->io[offset]);
+ #else
+- writew(val & 0xffff, (u8 *) adev->iobase + adev->io[offset]);
+- writew(val >> 16, (u8 *) adev->iobase + adev->io[offset] + 2);
++ acx_writew(val & 0xffff, (u8 *) adev->iobase + adev->io[offset]);
++ acx_writew(val >> 16, (u8 *) adev->iobase + adev->io[offset] + 2);
+ #endif
+ }
+
+ INLINE_IO void write_reg16(acx_device_t * adev, unsigned int offset, u16 val)
+ {
+- writew(val, (u8 *) adev->iobase + adev->io[offset]);
++ acx_writew(val, (u8 *) adev->iobase + adev->io[offset]);
+ }
+
+ INLINE_IO void write_reg8(acx_device_t * adev, unsigned int offset, u8 val)
+@@ -165,7 +170,7 @@
+ {
+ /* fast version (accesses the first register, IO_ACX_SOFT_RESET,
+ * which should be safe): */
+- return readl(adev->iobase) != 0xffffffff;
++ return acx_readl(adev->iobase) != 0xffffffff;
+ }
+
+
+@@ -821,7 +826,7 @@
+ static inline void
+ acxpci_write_cmd_type_status(acx_device_t * adev, u16 type, u16 status)
+ {
+- writel(type | (status << 16), adev->cmd_area);
++ acx_writel(type | (status << 16), adev->cmd_area);
+ write_flush(adev);
+ }
+
+@@ -833,7 +838,7 @@
+ {
+ u32 cmd_type, cmd_status;
+
+- cmd_type = readl(adev->cmd_area);
++ cmd_type = acx_readl(adev->cmd_area);
+ cmd_status = (cmd_type >> 16);
+ cmd_type = (u16) cmd_type;
+
+@@ -2421,12 +2426,12 @@
+ #endif
+ u32 info_type, info_status;
+
+- info_type = readl(adev->info_area);
++ info_type = acx_readl(adev->info_area);
+ info_status = (info_type >> 16);
+ info_type = (u16) info_type;
+
+ /* inform fw that we have read this info message */
+- writel(info_type | 0x00010000, adev->info_area);
++ acx_writel(info_type | 0x00010000, adev->info_area);
+ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_INFOACK);
+ write_flush(adev);
+
+@@ -4304,8 +4309,8 @@
+ #define ENDIANNESS_STRING "running on a BIG-ENDIAN CPU\n"
+ #endif
+ log(L_INIT,
+- ENDIANNESS_STRING
+- "PCI module " ACX_RELEASE " initialized, "
++ "acx: " ENDIANNESS_STRING
++ "acx: PCI module " ACX_RELEASE " initialized, "
+ "waiting for cards to probe...\n");
+
+ res = pci_register_driver(&acxpci_drv_id);