r15 - in unstable/rt2500/debian: . patches
aurel32 at alioth.debian.org
aurel32 at alioth.debian.org
Sun Jul 15 19:31:45 UTC 2007
Author: aurel32
Date: 2007-07-15 19:31:45 +0000 (Sun, 15 Jul 2007)
New Revision: 15
Added:
unstable/rt2500/debian/patches/003_linux-headers.diff
unstable/rt2500/debian/patches/2.6.22.diff
Modified:
unstable/rt2500/debian/changelog
unstable/rt2500/debian/patches/series
Log:
* patches/2.6.22: fix the build of the module with 2.6.22+ kernels
(closes: bug#432358).
Modified: unstable/rt2500/debian/changelog
===================================================================
--- unstable/rt2500/debian/changelog 2007-07-15 17:33:49 UTC (rev 14)
+++ unstable/rt2500/debian/changelog 2007-07-15 19:31:45 UTC (rev 15)
@@ -2,8 +2,10 @@
* Workaround linux-libc-dev bug by including linux/if.h before
linux/wireless.h (closes: bug#429019).
+ * patches/2.6.22: fix the build of the module with 2.6.22+ kernels
+ (closes: bug#432358).
- -- Aurelien Jarno <aurel32 at debian.org> Sun, 15 Jul 2007 18:30:15 +0200
+ -- Aurelien Jarno <aurel32 at debian.org> Sun, 15 Jul 2007 21:30:43 +0200
rt2500 (1:1.1.0-b4-3) unstable; urgency=low
Added: unstable/rt2500/debian/patches/003_linux-headers.diff
===================================================================
--- unstable/rt2500/debian/patches/003_linux-headers.diff (rev 0)
+++ unstable/rt2500/debian/patches/003_linux-headers.diff 2007-07-15 19:31:45 UTC (rev 15)
@@ -0,0 +1,40 @@
+--- Utilitys/rt_tool.cpp
++++ Utilitys/rt_tool.cpp
+@@ -3,6 +3,7 @@
+ #include <string.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
++#include <linux/if.h>
+ #include <linux/wireless.h>
+
+ #include "rt_tool.h"
+--- Utilitys/addprofiledlg.cpp
++++ Utilitys/addprofiledlg.cpp
+@@ -29,6 +29,7 @@
+ #include <string.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
++#include <linux/if.h>
+ #include <linux/wireless.h>
+ #include <ctype.h>
+
+--- Utilitys/rt_tool.h
++++ Utilitys/rt_tool.h
+@@ -3,6 +3,7 @@
+
+ #include <sys/socket.h>
+ #include <linux/types.h>
++#include <linux/if.h>
+ #include <linux/wireless.h>
+
+ #define CONFIGURATION_UI_VERSION "1.2.1.0"
+--- Utilitys/raconfig.cpp
++++ Utilitys/raconfig.cpp
+@@ -7,6 +7,7 @@
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <unistd.h>
++#include <linux/if.h>
+ #include <linux/wireless.h>
+ #include <asm/errno.h>
+ #include <fcntl.h>
Added: unstable/rt2500/debian/patches/2.6.22.diff
===================================================================
--- unstable/rt2500/debian/patches/2.6.22.diff (rev 0)
+++ unstable/rt2500/debian/patches/2.6.22.diff 2007-07-15 19:31:45 UTC (rev 15)
@@ -0,0 +1,54 @@
+diff -Nurd Module.orig/rtmp_data.c Module/rtmp_data.c
+--- Module.orig/rtmp_data.c 2006-06-17 22:12:58.000000000 +0200
++++ Module/rtmp_data.c 2007-07-15 21:26:25.000000000 +0200
+@@ -1196,7 +1196,7 @@
+
+ skb->dev = pAdapter->net_dev;
+ memcpy(skb_put(skb, pRxD->DataByteCnt), pData, pRxD->DataByteCnt);
+- skb->mac.raw = skb->data;
++ skb_reset_mac_header(skb);
+ skb->pkt_type = PACKET_OTHERHOST;
+ skb->protocol = htons(ETH_P_802_2);
+ skb->ip_summed = CHECKSUM_NONE;
+diff -Nurd Module.orig/rtmp.h Module/rtmp.h
+--- Module.orig/rtmp.h 2007-07-15 20:37:46.000000000 +0200
++++ Module/rtmp.h 2007-07-15 21:26:25.000000000 +0200
+@@ -62,6 +62,13 @@
+ #endif /*(LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) */
+ #endif /* pci_name */
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
++#define pci_module_init pci_register_driver
++#endif
++
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))
++#define skb_reset_mac_header(skb) (skb->mac.raw = skb->data)
++#endif
+
+ // Krellan: Limit range of user TxPower settings from -31 to +0 dBm.
+ // We could accept -31 to +31 dBm, relative to 0 dBm which is defined
+diff -Nurd Module.orig/rtmp_main.c Module/rtmp_main.c
+--- Module.orig/rtmp_main.c 2007-07-15 20:37:46.000000000 +0200
++++ Module/rtmp_main.c 2007-07-15 21:26:52.000000000 +0200
+@@ -340,7 +340,11 @@
+ NICDisableInterrupt(pAd);
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++ status = request_irq(pAd->pPci_Dev->irq, &RTMPIsr, IRQF_SHARED, net_dev->name, net_dev);
++#else
+ status = request_irq(pAd->pPci_Dev->irq, &RTMPIsr, SA_SHIRQ, net_dev->name, net_dev);
++#endif
+ if (status)
+ {
+ goto out_module_put;
+@@ -950,7 +954,8 @@
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ int status;
+
+- pci_enable_device(pdev);
++ if (pci_enable_device(pdev))
++ return -EIO;
+
+ printk(KERN_NOTICE "%s: got resume request\n", dev->name);
+
Modified: unstable/rt2500/debian/patches/series
===================================================================
--- unstable/rt2500/debian/patches/series 2007-07-15 17:33:49 UTC (rev 14)
+++ unstable/rt2500/debian/patches/series 2007-07-15 19:31:45 UTC (rev 15)
@@ -4,3 +4,4 @@
003_linux-headers.diff -p0
2.6.19.diff -p0
2.6.20.diff -p0
+2.6.22.diff -p0
More information about the Pkg-ralink-commits
mailing list