packages: clean up the package folder
[openwrt.git] / package / kernel / lantiq / ltq-vdsl / patches / 100-compat.patch
1 Index: drv_dsl_cpe_api-4.11.4/src/include/drv_dsl_cpe_os_linux.h
2 ===================================================================
3 --- drv_dsl_cpe_api-4.11.4.orig/src/include/drv_dsl_cpe_os_linux.h      2011-10-26 00:35:29.000000000 +0200
4 +++ drv_dsl_cpe_api-4.11.4/src/include/drv_dsl_cpe_os_linux.h   2012-11-28 23:05:38.766342592 +0100
5 @@ -17,7 +17,7 @@
6  #endif
7  
8  #include <asm/ioctl.h>
9 -#include <linux/autoconf.h>
10 +#include <generated/autoconf.h>
11  #include <linux/module.h>
12  #include <linux/kernel.h>
13  #include <linux/init.h>
14 @@ -28,7 +28,7 @@
15  #include <linux/sched.h>
16  
17  #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
18 -   #include <linux/utsrelease.h>
19 +   #include <generated/utsrelease.h>
20  #endif
21  
22  #include <linux/types.h>
23 @@ -40,7 +40,6 @@
24  #include <linux/delay.h>
25  #include <linux/poll.h>
26  #include <asm/uaccess.h>
27 -#include <linux/smp_lock.h>
28  
29  #ifdef INCLUDE_DSL_CPE_API_IFXOS_SUPPORT
30  /** IFXOS includes*/
31 Index: drv_dsl_cpe_api-4.11.4/src/Makefile.in
32 ===================================================================
33 --- drv_dsl_cpe_api-4.11.4.orig/src/Makefile.in 2012-03-05 15:24:31.000000000 +0100
34 +++ drv_dsl_cpe_api-4.11.4/src/Makefile.in      2012-11-28 23:05:38.770342592 +0100
35 @@ -72,7 +72,7 @@
36  
37  # the headerfile of linux kernels 2.6.x contain to much arithmetic
38  # with void pointers (which is allowed for gcc!)
39 -@KERNEL_2_6_FALSE@am__append_8 = -Wpointer-arith
40 +@KERNEL_2_6_FALSE@am__append_8 =
41  subdir = src
42  DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
43  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
44 Index: drv_dsl_cpe_api-4.11.4/src/common/drv_dsl_cpe_os_linux.c
45 ===================================================================
46 --- drv_dsl_cpe_api-4.11.4.orig/src/common/drv_dsl_cpe_os_linux.c       2011-10-26 00:35:28.000000000 +0200
47 +++ drv_dsl_cpe_api-4.11.4/src/common/drv_dsl_cpe_os_linux.c    2012-11-28 23:05:38.770342592 +0100
48 @@ -12,6 +12,7 @@
49  
50  #define DSL_INTERN
51  
52 +#include <linux/device.h>
53  #include "drv_dsl_cpe_api.h"
54  #include "drv_dsl_cpe_api_ioctl.h"
55  
56 @@ -34,7 +35,7 @@
57  static DSL_ssize_t DSL_DRV_Write(DSL_DRV_file_t *pFile, const DSL_char_t * pBuf,
58                                   DSL_DRV_size_t nSize, DSL_DRV_offset_t * pLoff);
59  
60 -static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_inode_t * pINode, DSL_DRV_file_t * pFile,
61 +static long DSL_DRV_Ioctls(DSL_DRV_file_t * pFile,
62                           DSL_uint_t nCommand, unsigned long nArg);
63  
64  static int DSL_DRV_Open(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil);
65 @@ -71,7 +72,7 @@
66     open:    DSL_DRV_Open,
67     release: DSL_DRV_Release,
68     write:   DSL_DRV_Write,
69 -   ioctl:   DSL_DRV_Ioctls,
70 +   unlocked_ioctl:   DSL_DRV_Ioctls,
71     poll:    DSL_DRV_Poll
72  };
73  #else
74 @@ -172,7 +173,7 @@
75     \return  Success or failure.
76     \ingroup Internal
77  */
78 -static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_inode_t * pINode,
79 +static long DSL_DRV_Ioctls(
80     DSL_DRV_file_t * pFile,
81     DSL_uint_t nCommand,
82     unsigned long nArg)
83 @@ -222,14 +223,7 @@
84        }
85     }
86  
87 -   if (pINode == DSL_NULL)
88 -   {
89 -      bIsInKernel = DSL_TRUE;
90 -   }
91 -   else
92 -   {
93        bIsInKernel = DSL_FALSE;
94 -   }
95  
96     if ( (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API) ||
97          (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_G997) ||
98 @@ -1082,6 +1076,7 @@
99  int __init DSL_ModuleInit(void)
100  {
101     DSL_int_t i;
102 +   static struct class *dsl_class;
103  
104     printk(DSL_DRV_CRLF DSL_DRV_CRLF "Lantiq CPE API Driver version: %s" DSL_DRV_CRLF,
105        &(dsl_cpe_api_version[4]));
106 @@ -1127,6 +1122,10 @@
107  
108     DSL_DRV_DevNodeInit();
109  
110 +   dsl_class = class_create(THIS_MODULE, "dsl_cpe_api0");
111 +   device_create(dsl_class, NULL, MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0), NULL, "dsl_cpe_api0");
112 +
113 +
114     return 0;
115  }
116  
117 Index: drv_dsl_cpe_api-4.11.4/src/device/drv_dsl_cpe_msg_vrx.c
118 ===================================================================
119 --- drv_dsl_cpe_api-4.11.4.orig/src/device/drv_dsl_cpe_msg_vrx.c        2012-03-05 11:25:21.000000000 +0100
120 +++ drv_dsl_cpe_api-4.11.4/src/device/drv_dsl_cpe_msg_vrx.c     2012-11-28 23:06:46.418344288 +0100
121 @@ -685,6 +685,7 @@
122     DSL_ProfileType_t nProfile = DSL_PROFILE_LAST;
123     DSL_G997_XTUSystemEnablingData_t data = {{0,0,0,0,0,0,0,0}};
124  
125 +   //printk("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
126     DSL_DEBUG( DSL_DBG_MSG,
127        (pContext, SYS_DBG_MSG"DSL[%02d]: IN - DSL_DRV_VXX_SendMsgSelectedProfileVdsl2Get"
128        DSL_DRV_CRLF, DSL_DEV_NUM(pContext)));
129 @@ -985,8 +988,10 @@
130  
131     /* Check consistency of XTSE status setting - Only one bit should be set at
132        a time */
133 +   //printk("XTSE (%d) - ", DSL_G997_NUM_XTSE_OCTETS);
134     for (i = 0, nBitCount = 0; i < DSL_G997_NUM_XTSE_OCTETS; i++)
135     {
136 +      //printk("%02X ", data.XTSE[i]);
137        for (j = 0; j < 8; j++)
138        {
139           if ( ((data.XTSE[i] >> j) & 0x01) != 0)
140 @@ -996,6 +1001,8 @@
141        }
142     }
143  
144 +       //printk("\n");
145 +
146     if (nBitCount > 1)
147     {
148        DSL_DEBUG( DSL_DBG_ERR,