fix rt61 build on 2.4
authorNicolas Thill <nico@openwrt.org>
Sun, 7 Jan 2007 23:29:43 +0000 (23:29 +0000)
committerNicolas Thill <nico@openwrt.org>
Sun, 7 Jan 2007 23:29:43 +0000 (23:29 +0000)
SVN-Revision: 6022

package/rt61/Makefile
package/rt61/patches/02-linux_2_4_module_param.patch [new file with mode: 0644]

index d685119b6b5ed1b465762e7d83a42c918d539ed2..0656cf4c43c2c72d5ba245199e2c70388c39d860 100644 (file)
@@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/package.mk
 define KernelPackage/rt61
   SUBMENU:=Wireless Drivers
   TITLE:=Driver for ralink MiMo pci chipsets 
-  DEPENDS:=@LINUX_2_4 @USB_SUPPORT +wireless-tools
+  DEPENDS:=@LINUX_2_4 @PCI_SUPPORT +wireless-tools
   DESCRIPTION:=\
         This package contains a driver for ralink rt61xx pci chipsets.
   URL:=http://rt2x00.serialmonkey.com/
@@ -34,11 +34,13 @@ define KernelPackage/rt61
   AUTOLOAD:=$(call AutoLoad,50,rt61)
 endef
 
+LINUX_PATCHLEVEL:=$(shell echo "$(LINUX_VERSION)" | cut -d. -f2)
+
 define Build/Compile
        $(MAKE) -C $(LINUX_DIR) \
                ARCH="$(LINUX_KARCH)" \
                CROSS_COMPILE="$(TARGET_CROSS)" \
-               PATCHLEVEL="$(LINUX_VERSION)" \
+               PATCHLEVEL="$(LINUX_PATCHLEVEL)" \
                KERNDIR="$(LINUX_DIR)" \
                SUBDIRS="$(PKG_BUILD_DIR)/Module" \
                modules
diff --git a/package/rt61/patches/02-linux_2_4_module_param.patch b/package/rt61/patches/02-linux_2_4_module_param.patch
new file mode 100644 (file)
index 0000000..ee773a8
--- /dev/null
@@ -0,0 +1,22 @@
+--- rt61-old/Module/rtmp_main.c        2006/06/16 11:12:40     1.14
++++ rt61-new/Module/rtmp_main.c        2006/08/12 13:03:25     1.15
+@@ -48,11 +48,19 @@
+ // Global variable, debug level flag
+ // Don't hide this behing debug define. There should be as little difference between debug and no-debug as possible.
+ int debug = 0;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+ module_param(debug, int, 0444);
++#else
++MODULE_PARM(debug, "i");
++#endif
+ MODULE_PARM_DESC(debug, "Enable level: accepted values: 1 to switch debug on, 0 to switch debug off.");
+ static char *ifname = NULL ;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+ module_param(ifname, charp, 0444);
++#else
++MODULE_PARM(ifname, "s");
++#endif
+ MODULE_PARM_DESC(ifname, "Network device name (default ra%d)");
+ static dma_addr_t             dma_adapter;