rendered paste bodydiff -Nru unicorn.orig/amu/amas.c unicorn/amu/amas.c
--- unicorn.orig/amu/amas.c 2006-12-20 20:58:11.000000000 +0200
+++ unicorn/amu/amas.c 2006-12-20 20:56:25.000000000 +0200
@@ -5,7 +5,7 @@
extern unsigned long g_ModemState, g_ShowtimeCounter;
extern unsigned int g_WaitForShowtime, g_WaitForInit;
-extern bool L3_flag;
+extern BOOLEAN L3_flag;
extern T_AMSW_ANT_StaticConfiguration g_StaticCfg;
extern T_AMSW_NT_NearEndLineOperData g_NearEndLineOperData;
@@ -23,9 +23,10 @@
// ADSL Modem Software calls this function to report any state changes
void AMSW_ANT_reportModemStateChange(AMSW_ModemState p_ModemState)
{
+ char *s;
+
g_ModemState = p_ModemState;
- char *s;
switch(p_ModemState)
{
case C_AMSW_IDLE : s = "IDLE"; break;
diff -Nru unicorn.orig/amu/amu.c unicorn/amu/amu.c
--- unicorn.orig/amu/amu.c 2006-12-20 20:58:11.000000000 +0200
+++ unicorn/amu/amu.c 2006-12-20 20:56:25.000000000 +0200
@@ -77,8 +77,14 @@
extern unsigned long Vendor_Id_code_Globspan;
unsigned long Vendor_Id_code_Globspan=0;
-extern "C" void HandleAtmError(void);
-extern "C" void HandleLeds(void);
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void HandleAtmError(void);
+ void HandleLeds(void);
+#ifdef __cplusplus
+}
+#endif
unsigned long amu_init_modem(unsigned short MODE);
unsigned long amu_init_modem(unsigned short MODE)
@@ -165,24 +171,27 @@
return l_RetCode;
}
-void AMUTask(unsigned long,unsigned long , unsigned long , unsigned long )
+void AMUTask(unsigned long Arg1, unsigned long Arg2, unsigned long Arg3, unsigned long Arg4)
{
unsigned long l_RetCode = C_AMSW_REJ;
//static int l_Lit = 0;
- static bool PM_toggle = TRUE;
-
- PRINT_ERROR("FmPollingRate=%ldms,InitTimeout=%ldms,ActTimeout=%ld\n",
- FmPollingRate,InitTimeout,ActTimeout);
+ static BOOLEAN PM_toggle = TRUE;
unsigned long PM_FM_POLLING_RATE = FmPollingRate;
unsigned long WAITFOR_SHOWTIME_COUNT = InitTimeout / PM_FM_POLLING_RATE;
unsigned long WAITFOR_INIT_COUNT = ActTimeout / PM_FM_POLLING_RATE;
unsigned long RETRY_WAIT_TIME = RETRY_WAIT_TIME_MIN_MSEC / PM_FM_POLLING_RATE;
- if (RetryTime > RETRY_WAIT_TIME_MIN_MSEC) // STM Gian Set RetryTime Only if is Bigger then minimum value
- RETRY_WAIT_TIME = RetryTime / PM_FM_POLLING_RATE;
unsigned long INIT_POLLING_TIME = 5; //(??????)
unsigned long WAITFOR_DISORDERLY_COUNT = 3;
+ UINT delay = 0;
+
+ if (RetryTime > RETRY_WAIT_TIME_MIN_MSEC) // STM Gian Set RetryTime Only if is Bigger then minimum value
+ RETRY_WAIT_TIME = RetryTime / PM_FM_POLLING_RATE;
+
+ PRINT_ERROR("FmPollingRate=%ldms,InitTimeout=%ldms,ActTimeout=%ld\n",
+ FmPollingRate,InitTimeout,ActTimeout);
+
NEAR_LCDNI_COUNT = LCD_Trig / PM_FM_POLLING_RATE;
NEAR_LCDI_COUNT = NEAR_LCDNI_COUNT;
NEAR_LOS_COUNT = LOS_LOF_Trig / PM_FM_POLLING_RATE;
@@ -194,8 +203,6 @@
FAR_LOS_SHORT_COUNT = NEAR_LOS_COUNT;
FAR_LOF_SHORT_COUNT = NEAR_LOS_COUNT;
- UINT delay = 0;
-
while (amu_go)
{
xtm_wkafter(500);
@@ -279,7 +286,7 @@
g_WaitForDisorderly++;
if(g_WaitForDisorderly >= WAITFOR_DISORDERLY_COUNT)
{
-
+ int i;
// if (RetryTime != 0)
// msw_report_event(AMU_EVENT_RETRY,0);
@@ -297,7 +304,7 @@
if(l_RetCode != C_AMSW_ACK) {
PRINT_ERROR("Error in AMSW_ANT_requestModemStateChange(C_AMSW_IDLE) = %d\n", l_RetCode);
}
- else for (int i=0; i<6; i++)
+ else for (i=0; i<6; i++)
{
if (g_ModemState == C_AMSW_IDLE || GlobalRemove) break;
xtm_wkafter(500);
@@ -345,7 +352,7 @@
// LCDI (Loss Of Cell Delineation Interleaved),
// LCDNI (Loss Of Cell Delineation Fast)defects
-unsigned long FM_Polling(bool pm_poll)
+unsigned long FM_Polling(BOOLEAN pm_poll)
{
unsigned long l_RetCode = C_AMSW_REJ;
@@ -361,8 +368,8 @@
//####################### Loss Of Signal ##############################
if( ((g_def_bitmap_set.near_end.status & LOS) == LOS) ||
- ((g_def_bitmap_set.near_end.status & LOS) == 0) &&
- ((g_def_bitmap_set.near_end.change & LOS) == LOS) )
+ (((g_def_bitmap_set.near_end.status & LOS) == 0) &&
+ ((g_def_bitmap_set.near_end.change & LOS) == LOS)) )
{
g_NEAR_LOS++;
}
@@ -371,8 +378,8 @@
g_NEAR_LOS = 0;
}
if( ((g_def_bitmap_set.far_end.status & LOS) == LOS) ||
- ((g_def_bitmap_set.far_end.status & LOS) == 0) &&
- ((g_def_bitmap_set.far_end.change & LOS) == LOS) )
+ (((g_def_bitmap_set.far_end.status & LOS) == 0) &&
+ ((g_def_bitmap_set.far_end.change & LOS) == LOS)) )
{
g_FAR_LOS++;
}
diff -Nru unicorn.orig/amu/amu.h unicorn/amu/amu.h
--- unicorn.orig/amu/amu.h 2006-12-20 20:58:11.000000000 +0200
+++ unicorn/amu/amu.h 2006-12-20 20:56:25.000000000 +0200
@@ -30,7 +30,7 @@
unsigned char g_FAR_LOS = 0, g_FAR_LOF = 0, g_FAR_LCDNI = 0, g_FAR_LCDI = 0;
unsigned char g_Mode = AMSW_ANSI | AMSW_UAWG | AMSW_G_DMT | AMSW_G_LITE;
unsigned long g_ShowtimeCounter = 0;
-bool L3_flag = FALSE; // bool var to acknowledge answer to orderly shutdown request
+BOOLEAN L3_flag = FALSE; // bool var to acknowledge answer to orderly shutdown request
T_AMSW_Identification g_Identification;
T_AMSW_NT_NearEndLineOperData g_NearEndLineOperData;
@@ -47,7 +47,7 @@
T_AMSW_VersionMS g_VersionMS;
void AMUTask(unsigned long Arg1, unsigned long , unsigned long , unsigned long );
-unsigned long FM_Polling(bool pm_poll);
+unsigned long FM_Polling(BOOLEAN pm_poll);
unsigned long PM_Polling(void);
#endif // _AMU_H_
diff -Nru unicorn.orig/amu/bsp.h unicorn/amu/bsp.h
--- unicorn.orig/amu/bsp.h 2006-12-20 20:58:11.000000000 +0200
+++ unicorn/amu/bsp.h 2006-12-20 20:56:25.000000000 +0200
@@ -18,7 +18,9 @@
#define DMT_IN_PIN0_MASK 0x0001 // GP_IN0 bit 0
#define DMT_IN_PIN1_MASK 0x0002 // GP_IN1 bit 1
+#ifdef __cplusplus
extern "C" {
+#endif
unsigned short initializeBoard(void);
unsigned long powerUp_Modem_Chipset (unsigned long Chipset);
@@ -26,6 +28,8 @@
unsigned long pull_Modem_Chipset_out_of_reset(unsigned long Chipset);
unsigned long put_Modem_Chipset_in_reset(unsigned long Chipset);
+#ifdef __cplusplus
} // extern "C"
+#endif
#endif
diff -Nru unicorn.orig/amu/bsp_pci.c unicorn/amu/bsp_pci.c
--- unicorn.orig/amu/bsp_pci.c 2006-12-20 20:58:11.000000000 +0200
+++ unicorn/amu/bsp_pci.c 2006-12-20 20:56:25.000000000 +0200
@@ -98,10 +98,18 @@
return 0;
}
-extern "C" void HandleAtmError(void)
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void HandleAtmError(void)
{
}
-extern "C" void HandleLeds(void)
+void HandleLeds(void)
{
}
+
+#ifdef __cplusplus
+}
+#endif
diff -Nru unicorn.orig/include/types.h unicorn/include/types.h
--- unicorn.orig/include/types.h 2006-12-20 20:58:11.000000000 +0200
+++ unicorn/include/types.h 2006-12-20 20:56:25.000000000 +0200
@@ -29,9 +29,6 @@
typedef const char *PCSTR, FAR *LPCSTR;
typedef void *PVOID, FAR *LPVOID;
typedef int BOOLEAN;
-#ifndef __cplusplus
-typedef int bool;
-#endif
#ifndef MAX
diff -Nru unicorn.orig/msw/fp_stubs.c unicorn/msw/fp_stubs.c
--- unicorn.orig/msw/fp_stubs.c 2006-12-20 20:58:11.000000000 +0200
+++ unicorn/msw/fp_stubs.c 2006-12-20 21:00:53.000000000 +0200
@@ -1,11 +1,13 @@
-#include <linux/config.h>
+#include <linux/version.h>
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
+# include <linux/config.h>
+#endif
#if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
#define MODVERSIONS
#endif
#ifdef MODVERSIONS
#include <linux/modversions.h>
#endif
-#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <stdio.h>
diff -Nru unicorn.orig/msw/linrapi.c unicorn/msw/linrapi.c
--- unicorn.orig/msw/linrapi.c 2006-12-20 20:58:11.000000000 +0200
+++ unicorn/msw/linrapi.c 2006-12-20 21:00:15.000000000 +0200
@@ -5,8 +5,10 @@
This file contain the rAPI(reduced API) functions.
rAPI is the interface between the Modem SW and the Operating System (here Linux).
*/
-#include <linux/config.h>
#include <linux/version.h>
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
+# include <linux/config.h>
+#endif
#if defined(CONFIG_MODVERSIONS) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
#include <linux/modversions.h>
#endif
@@ -201,7 +203,7 @@
WARN("__cxa_pure_virtual called\n");
}
-#if __GNUC__ >= 3
+#if __GNUC__ >= 3 && defined(__cplusplus)
extern void
__builtin_delete(void *ptr)
{
diff -Nru unicorn.orig/msw/msw.c unicorn/msw/msw.c
--- unicorn.orig/msw/msw.c 2006-12-20 20:58:11.000000000 +0200
+++ unicorn/msw/msw.c 2006-12-20 20:56:25.000000000 +0200
@@ -6,7 +6,7 @@
// Copyright STMicroelectronics 2000
// Copyright F.H.L.P. 2000
//----------------------------------------------------------------------
-#include <string.h>
+// #include <string.h>
#include "types.h"
#include "tracetool.h"
#include "hal.h"
@@ -24,10 +24,10 @@
extern unsigned long g_ModemState;
extern unsigned int g_WaitForInit;
extern unsigned int g_WaitForShowtime;
-extern bool L3_flag;
+extern BOOLEAN L3_flag;
extern unsigned long GlobalRemove;
-#if 1
+#if 0
extern void *operator new(size_t size)
{
void *ptr;
@@ -186,8 +186,9 @@
}
else
{
+ int i;
PRINT_ERROR("Waiting 5 sec to verify L3_executed\n");
- for (int i=0; i<10; i++)
+ for (i=0; i<10; i++)
{
// Abort everything on surprise removal
if (GlobalRemove) return;
diff -Nru unicorn.orig/unicorn_atm/unicorn_atmdrv.c unicorn/unicorn_atm/unicorn_atmdrv.c
--- unicorn.orig/unicorn_atm/unicorn_atmdrv.c 2006-12-20 20:58:11.000000000 +0200
+++ unicorn/unicorn_atm/unicorn_atmdrv.c 2006-12-20 21:01:05.000000000 +0200
@@ -4,8 +4,10 @@
ST70134A or ST70136 Analog Front End (AFE).
This file contains the ATM interface and SAR routines.
*/
-#include <linux/config.h>
#include <linux/version.h>
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
+# include <linux/config.h>
+#endif
#if defined(CONFIG_MODVERSIONS) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
#include <linux/modversions.h>
#endif
@@ -101,7 +103,7 @@
struct unicorn_atmdrv *unicorn_atmdrv = NULL;
// driver parameters
-unsigned char *mac_address=NULL;
+char mac_address[ETH_ALEN*2 + 1] = { 0x0 };
#if DEBUG
#ifdef ATM_DRIVER
unsigned long DebugLevel=0; // ATM_D,DATA_D
@@ -1293,10 +1295,10 @@
return 0;
}
-MODULE_PARM(mac_address, "s");
+module_param_string(mac_address, mac_address, sizeof(mac_address), 0);
#if DEBUG
#ifdef ATM_DRIVER
-MODULE_PARM(DebugLevel, "i");
+module_param(DebugLevel, ulong, 0);
#endif
#endif
diff -Nru unicorn.orig/unicorn_eth/unicorn_ethdrv.c unicorn/unicorn_eth/unicorn_ethdrv.c
--- unicorn.orig/unicorn_eth/unicorn_ethdrv.c 2006-12-20 20:58:11.000000000 +0200
+++ unicorn/unicorn_eth/unicorn_ethdrv.c 2006-12-20 20:59:57.000000000 +0200
@@ -4,8 +4,10 @@
ST70134A or ST70136 Analog Front End (AFE).
This file contains the ethernet interface and SAR routines.
*/
-#include <linux/config.h>
#include <linux/version.h>
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
+# include <linux/config.h>
+#endif
#if defined(CONFIG_MODVERSIONS) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
#include <linux/modversions.h>
#endif
@@ -140,12 +142,12 @@
struct unicorn_ethdrv *unicorn_ethdrv = NULL;
// driver parameters
-static char *if_name = NULL;
-static unsigned char *mac_address=NULL;
+static char if_name[IFNAMSIZ] = { 0x0 };
+static char mac_address[ETH_ALEN*2 + 1] = { 0x0 };
static int VPI= ATM_VPI_UNSPEC;
static int VCI= ATM_VCI_UNSPEC;
-static char *PROTOCOL = NULL;
-static char *ENCAPS = NULL;
+static char PROTOCOL[8] = { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
+static char ENCAPS[11] = { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
#if DEBUG
#ifdef ETH_DRIVER
unsigned long DebugLevel=0; // ATM_D,DATA_D
@@ -1355,15 +1357,15 @@
WARN("\n");
}
-MODULE_PARM(if_name,"s");
-MODULE_PARM(mac_address, "s");
-MODULE_PARM(VPI, "i");
-MODULE_PARM(VCI, "i");
-MODULE_PARM(PROTOCOL, "s");
-MODULE_PARM(ENCAPS, "s");
+module_param_string(if_name, if_name, sizeof(if_name), 0);
+module_param_string(mac_address, mac_address, sizeof(mac_address), 0);
+module_param(VPI, int, 0);
+module_param(VCI, int, 0);
+module_param_string(PROTOCOL, PROTOCOL, sizeof(PROTOCOL), 0);
+module_param_string(ENCAPS, ENCAPS, sizeof(ENCAPS), 0);
#if DEBUG
#ifdef ETH_DRIVER
-MODULE_PARM(DebugLevel, "i");
+module_param(DebugLevel, ulong, 0);
#endif
#endif
diff -Nru unicorn.orig/unicorn_pci/unicorn_pcidrv.c unicorn/unicorn_pci/unicorn_pcidrv.c
--- unicorn.orig/unicorn_pci/unicorn_pcidrv.c 2006-12-20 20:58:11.000000000 +0200
+++ unicorn/unicorn_pci/unicorn_pcidrv.c 2006-12-20 20:59:31.000000000 +0200
@@ -4,8 +4,10 @@
ST70134A, ST70136 or ST20174 Analog Front End (AFE).
This file contains the PCI specific routines.
*/
-#include <linux/config.h>
#include <linux/version.h>
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
+# include <linux/config.h>
+#endif
#if defined(CONFIG_MODVERSIONS) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
#include <linux/modversions.h>
#endif
@@ -647,7 +649,9 @@
//----------------------------------------------------------------------
// Interrupt Service Routine (ISR) for IRQ Irq
//----------------------------------------------------------------------
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19))
+static irqreturn_t unicorn_isr(int irq, void *context)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
static irqreturn_t unicorn_isr(int irq, void *context, struct pt_regs *regs)
#else
static void unicorn_isr(int irq, void *context, struct pt_regs *regs)
@@ -2157,38 +2161,25 @@
}
/* module parameters for MSW */
-MODULE_PARM(ActivationMode, "i");
-//MODULE_PARM(ActivationTaskTimeout, "i");
-MODULE_PARM(ActTimeout, "i");
-MODULE_PARM(AutoActivation, "i");
-//MODULE_PARM(BreakOnEntry, "i");
-MODULE_PARM(DownstreamRate, "i");
-MODULE_PARM(eocTrace, "i");
-//MODULE_PARM(ExchangeDelay, "i");
-MODULE_PARM(FmPollingRate, "i");
-//MODULE_PARM(g_RefGain, "i");
-MODULE_PARM(g_TeqMode, "i");
-MODULE_PARM(InitTimeout, "i");
-MODULE_PARM(Interoperability, "i");
-MODULE_PARM(LCD_Trig, "i");
-MODULE_PARM(LOS_LOF_Trig, "i");
-MODULE_PARM(LoopbackMode, "i");
-MODULE_PARM(MswDebugLevel, "i");
-MODULE_PARM(RetryTime, "i");
-MODULE_PARM(setINITIALDAC, "i");
-//MODULE_PARM(TrainingDelay, "i");
-//MODULE_PARM(TruncateMode, "i");
-MODULE_PARM(useAFE, "i");
-//MODULE_PARM(useRFC019v, "i");
-//MODULE_PARM(useRFC029v, "i");
-//MODULE_PARM(useRFC033v, "i");
-//MODULE_PARM(useRFC040v, "i");
-MODULE_PARM(useRFC041v, "i");
-//MODULE_PARM(useRFCFixedRate, "i");
-//MODULE_PARM(useVCXO, "i");
-//MODULE_PARM(_no_TS652, "i");
+module_param(ActivationMode, ulong, 0);
+module_param(ActTimeout, ulong, 0);
+module_param(AutoActivation, ulong, 0);
+module_param(DownstreamRate, ulong, 0);
+module_param(eocTrace, ulong, 0);
+module_param(FmPollingRate, ulong, 0);
+module_param(g_TeqMode, ushort, 0);
+module_param(InitTimeout, ulong, 0);
+module_param(Interoperability, ulong, 0);
+module_param(LCD_Trig, ulong, 0);
+module_param(LOS_LOF_Trig, ulong, 0);
+module_param(LoopbackMode, ulong, 0);
+module_param(MswDebugLevel, ulong, 0);
+module_param(RetryTime, ulong, 0);
+module_param(setINITIALDAC, ulong, 0);
+module_param(useAFE, ulong, 0);
+module_param(useRFC041v, ulong, 0);
#if DEBUG
-MODULE_PARM(DebugLevel, "i");
+module_param(DebugLevel, ulong, 0);
#endif
static int __init
diff -Nru unicorn.orig/unicorntest/unicorntest.c unicorn/unicorntest/unicorntest.c
--- unicorn.orig/unicorntest/unicorntest.c 2006-12-20 20:58:11.000000000 +0200
+++ unicorn/unicorntest/unicorntest.c 2006-12-20 20:56:25.000000000 +0200
@@ -540,10 +540,10 @@
printf(" ----------------------------------------------------------\n\n");
}
-bool InterpretCmdString (char *cmd,ADSL_DEVICE *device)
+BOOLEAN InterpretCmdString (char *cmd,ADSL_DEVICE *device)
{
int err;
- static bool MSW_INIT = FALSE;
+ static BOOLEAN MSW_INIT = FALSE;
int i;
if (strcmp(cmd,"HELP") == 0)
diff -Nru unicorn.orig/unicorn_usb/unicorn_usbdrv.c unicorn/unicorn_usb/unicorn_usbdrv.c
--- unicorn.orig/unicorn_usb/unicorn_usbdrv.c 2006-12-20 20:58:11.000000000 +0200
+++ unicorn/unicorn_usb/unicorn_usbdrv.c 2006-12-20 21:00:06.000000000 +0200
@@ -4,8 +4,10 @@
Analog Front End (AFE).
This file contains the USB specific routines.
*/
-#include <linux/config.h>
#include <linux/version.h>
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
+# include <linux/config.h>
+#endif
#if defined(CONFIG_MODVERSIONS) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
#include <linux/modversions.h>
#endif
@@ -380,7 +382,7 @@
//----------------------------------------------------------------------
// ATM US transfer complete
//----------------------------------------------------------------------
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
static void AtmUsXferComplete(struct urb *urb,struct pt_regs *pt_regs)
#else
static void AtmUsXferComplete(struct urb *urb)
@@ -430,7 +432,7 @@
//----------------------------------------------------------------------
// ATM DS transfer complete
//----------------------------------------------------------------------
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
static void AtmDsXferComplete(struct urb *urb,struct pt_regs *pt_regs)
#else
static void AtmDsXferComplete(struct urb *urb)
@@ -890,7 +892,7 @@
//----------------------------------------------------------------------
// Interrupt In pipe completion routine
//----------------------------------------------------------------------
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
static void IntInComplete(struct urb *urb,struct pt_regs *pt_regs)
#else
static void IntInComplete(struct urb *urb)
@@ -1374,7 +1376,7 @@
//-----------------------------------------------------------------------------
// ObcWriteIsocComplete:
//-----------------------------------------------------------------------------
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
static void ObcWriteIsocComplete(struct urb *urb,struct pt_regs *pt_regs)
#else
static void ObcWriteIsocComplete(struct urb *urb)
@@ -1400,7 +1402,7 @@
//-----------------------------------------------------------------------------
// ObcWriteIntComplete:
//-----------------------------------------------------------------------------
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
static void ObcWriteIntComplete(struct urb *urb,struct pt_regs *pt_regs)
#else
static void ObcWriteIntComplete(struct urb *urb)
@@ -1427,7 +1429,7 @@
//-----------------------------------------------------------------------------
// ObcReadIsocComplete:
//-----------------------------------------------------------------------------
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
static void ObcReadIsocComplete(struct urb *urb,struct pt_regs *pt_regs)
#else
static void ObcReadIsocComplete(struct urb *urb)
@@ -1468,7 +1470,7 @@
//-----------------------------------------------------------------------------
// ObcReadIntComplete:
//-----------------------------------------------------------------------------
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
static void ObcReadIntComplete(struct urb *urb,struct pt_regs *pt_regs)
#else
static void ObcReadIntComplete(struct urb *urb)
@@ -2289,39 +2291,32 @@
};
/* module parameters for MSW */
-MODULE_PARM(ActivationMode, "i");
-//MODULE_PARM(ActivationTaskTimeout, "i");
-MODULE_PARM(ActTimeout, "i");
-MODULE_PARM(AutoActivation, "i");
-//MODULE_PARM(BreakOnEntry, "i");
-MODULE_PARM(DownstreamRate, "i");
-MODULE_PARM(eocTrace, "i");
-MODULE_PARM(ExchangeDelay, "i");
-MODULE_PARM(FmPollingRate, "i");
-MODULE_PARM(g_RefGain, "i");
-MODULE_PARM(g_TeqMode, "i");
-MODULE_PARM(InitTimeout, "i");
-MODULE_PARM(Interoperability, "i");
-MODULE_PARM(LCD_Trig, "i");
-MODULE_PARM(LOS_LOF_Trig, "i");
-MODULE_PARM(LoopbackMode, "i");
-MODULE_PARM(MswDebugLevel, "i");
-MODULE_PARM(RetryTime, "i");
-//MODULE_PARM(setINITIALDAC, "i");
-MODULE_PARM(TrainingDelay, "i");
-//MODULE_PARM(TruncateMode, "i");
-MODULE_PARM(useAFE, "i");
-MODULE_PARM(useRFC019v, "i");
-MODULE_PARM(useRFC029v, "i");
-//MODULE_PARM(useRFC033v, "i");
-MODULE_PARM(useRFC040v, "i");
-MODULE_PARM(useRFC041v, "i");
-//MODULE_PARM(useRFCFixedRate, "i");
-MODULE_PARM(useVCXO, "i");
-MODULE_PARM(_no_TS652, "i");
-//MODULE_PARM(FrameNumber, "i");
+module_param(ActivationMode, ulong, 0);
+module_param(ActTimeout, ulong, 0);
+module_param(AutoActivation, ulong, 0);
+module_param(DownstreamRate, ulong, 0);
+module_param(eocTrace, ulong, 0);
+module_param(ExchangeDelay, ulong, 0);
+module_param(FmPollingRate, ulong, 0);
+module_param(g_RefGain, ulong, 0);
+module_param(g_TeqMode, ushort, 0);
+module_param(InitTimeout, ulong, 0);
+module_param(Interoperability, ulong, 0);
+module_param(LCD_Trig, ulong, 0);
+module_param(LOS_LOF_Trig, ulong, 0);
+module_param(LoopbackMode, ulong, 0);
+module_param(MswDebugLevel, ulong, 0);
+module_param(RetryTime, ulong, 0);
+module_param(TrainingDelay, ulong, 0);
+module_param(useAFE, ulong, 0);
+module_param(useRFC019v, ulong, 0);
+module_param(useRFC029v, ulong, 0);
+module_param(useRFC040v, ulong, 0);
+module_param(useRFC041v, ulong, 0);
+module_param(useVCXO, ulong, 0);
+module_param(_no_TS652, ulong, 0);
#if DEBUG
-MODULE_PARM(DebugLevel, "i");
+module_param(DebugLevel, ulong, 0);
#endif
//----------------------------------------------------------------------