Le mercredi 14 mars 2007 05:03, Romain Beauxis a écrit : > Attached is the corrected patch which does the same but without the > connection issue.
Oops I attached the wrong patch.. Here is the good one.. Romain -- They seh when you have nuff money You got a whole heap o' friend But when your money done dem just don't know you again When your dollars gone dem nah see you again And when your money done dem nah want see you again Money money money money is the root of all evil And you see it
--- Module/rt_config.h 2006-06-17 22:12:58.000000000 +0200 +++ Module/rt_config.h 2007-03-14 04:44:19.000000000 +0100 @@ -55,7 +55,6 @@ #error You must compile this driver with "-O". #endif -#include <linux/config.h> //can delete #include <linux/module.h> #include <linux/version.h> #include <linux/kernel.h> --- Module/rtmp.h 2006-06-17 22:12:58.000000000 +0200 +++ Module/rtmp.h 2007-03-14 04:44:19.000000000 +0100 @@ -1096,10 +1096,16 @@ INT RT2500_close( IN struct net_device *net_dev); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) irqreturn_t RTMPIsr( IN INT irq, IN VOID *dev_instance, IN struct pt_regs *rgs); +#else +irqreturn_t RTMPIsr( + IN INT irq, + IN VOID *dev_instance); +#endif VOID RT2500_timer( IN unsigned long data); --- Module/rtmp_info.c 2006-06-17 22:12:58.000000000 +0200 +++ Module/rtmp_info.c 2007-03-14 04:42:59.000000000 +0100 @@ -1646,23 +1646,29 @@ break; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) + #define customLength (erq->length - 1) // minux null character. +#else + #define customLength (erq->length) +#endif + if(RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE)) { - if (copy_from_user(Ssid.Ssid, erq->pointer, (erq->length - 1))) + if (copy_from_user(Ssid.Ssid, erq->pointer, customLength)) { Status = -EFAULT; break; } - Ssid.SsidLength = erq->length - 1; //minus null character. + Ssid.SsidLength = customLength; }else{ // This SEEMS to be needed to actual work RobinC when iface // is down - if (copy_from_user(pAdapter->PortCfg.Ssid, erq->pointer, (erq->length - 1))) + if (copy_from_user(pAdapter->PortCfg.Ssid, erq->pointer, customLength)) { Status = -EFAULT; break; } - pAdapter->PortCfg.SsidLen = erq->length - 1; //minus null character. + pAdapter->PortCfg.SsidLen = customLength; memcpy(pAdapter->Mlme.CntlAux.Ssid, pAdapter->PortCfg.Ssid, pAdapter->PortCfg.SsidLen); pAdapter->Mlme.CntlAux.SsidLen = pAdapter->PortCfg.SsidLen; --- Module/rtmp_main.c 2006-06-17 22:12:58.000000000 +0200 +++ Module/rtmp_main.c 2007-03-14 04:44:19.000000000 +0100 @@ -217,8 +217,8 @@ csr_addr = (unsigned long) ioremap(pci_resource_start(pPci_Dev, 0), pci_resource_len(pPci_Dev, 0)); if (!csr_addr) { - DBGPRINT(RT_DEBUG_TRACE, "ioremap failed for device %s, region 0x%X @ 0x%lX\n", - print_name, (ULONG)pci_resource_len(pPci_Dev, 0), pci_resource_start(pPci_Dev, 0)); + DBGPRINT(RT_DEBUG_TRACE, "ioremap failed for device %s, region 0x%X @ 0x%X\n", + print_name, (ULONG)pci_resource_len(pPci_Dev, 0), (ULONG)pci_resource_start(pPci_Dev, 0)); goto err_out_free_res; } @@ -284,8 +284,8 @@ if (Status != NDIS_STATUS_SUCCESS) goto err_out_unmap; - DBGPRINT(RT_DEBUG_TRACE, "%s: at 0x%lx, VA 0x%lx, IRQ %d. \n", - net_dev->name, pci_resource_start(pPci_Dev, 0), (unsigned long)csr_addr, pPci_Dev->irq); + DBGPRINT(RT_DEBUG_TRACE, "%s: at 0x%x, VA 0x%lx, IRQ %d. \n", + net_dev->name, (ULONG)pci_resource_start(pPci_Dev, 0), (unsigned long)csr_addr, pPci_Dev->irq); // Set driver data pci_set_drvdata(pPci_Dev, net_dev); @@ -514,10 +514,16 @@ ======================================================================== */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) irqreturn_t RTMPIsr( IN INT irq, IN VOID *dev_instance, IN struct pt_regs *rgs) +#else +irqreturn_t RTMPIsr( + IN INT irq, + IN VOID *dev_instance) +#endif { struct net_device *net_dev = dev_instance; PRTMP_ADAPTER pAdapter = net_dev->priv;