aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/ar7-atm/patches-D7.05.01.00
diff options
context:
space:
mode:
authorJonas Gorski <jonas.gorski@gmail.com>2017-10-13 11:32:31 +0200
committerJonas Gorski <jonas.gorski@gmail.com>2017-10-29 23:41:00 +0100
commit889b21f95414dcff942cb5f72d764d876b68ace2 (patch)
tree3d89902692a5f3e7ec227a36ac96a01ce5e54fd9 /package/kernel/ar7-atm/patches-D7.05.01.00
parentb00cf0e58e701821a1117afbad76718d898ea21d (diff)
downloadupstream-889b21f95414dcff942cb5f72d764d876b68ace2.tar.gz
upstream-889b21f95414dcff942cb5f72d764d876b68ace2.tar.bz2
upstream-889b21f95414dcff942cb5f72d764d876b68ace2.zip
ar7-atm: drop LINUX_VERSION tests
Minimum supported kernel is 3.18, so we don't need to test for anything older. In addition, the API hasn't changed since then, so we don't need to check for any kernel version at all. This helps to keeps the amount of changes more managable. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Diffstat (limited to 'package/kernel/ar7-atm/patches-D7.05.01.00')
-rw-r--r--package/kernel/ar7-atm/patches-D7.05.01.00/170-bus_id_removal.patch19
-rw-r--r--package/kernel/ar7-atm/patches-D7.05.01.00/180-git_headers_include.patch35
-rw-r--r--package/kernel/ar7-atm/patches-D7.05.01.00/190-2.6.32_proc_fixes.patch40
-rw-r--r--package/kernel/ar7-atm/patches-D7.05.01.00/200-2.6.37_args.patch12
-rw-r--r--package/kernel/ar7-atm/patches-D7.05.01.00/220-3.10-update_proc_code.patch164
-rw-r--r--package/kernel/ar7-atm/patches-D7.05.01.00/240-3.18_fixes.patch18
-rw-r--r--package/kernel/ar7-atm/patches-D7.05.01.00/250-4.1_fixes.patch4
7 files changed, 111 insertions, 181 deletions
diff --git a/package/kernel/ar7-atm/patches-D7.05.01.00/170-bus_id_removal.patch b/package/kernel/ar7-atm/patches-D7.05.01.00/170-bus_id_removal.patch
index 6692f40f6a..53767e45be 100644
--- a/package/kernel/ar7-atm/patches-D7.05.01.00/170-bus_id_removal.patch
+++ b/package/kernel/ar7-atm/patches-D7.05.01.00/170-bus_id_removal.patch
@@ -1,30 +1,19 @@
--- a/tn7dsl.c
+++ b/tn7dsl.c
-@@ -117,6 +117,7 @@
- #include <linux/vmalloc.h>
- #include <linux/file.h>
- #include <linux/firmware.h>
-+#include <linux/version.h>
-
- #include <asm/io.h>
- #include <asm/ar7/ar7.h>
-@@ -492,7 +493,9 @@ static void avsar_release(struct device
+@@ -492,7 +492,6 @@ static void avsar_release(struct device
}
static struct device avsar = {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
- .bus_id = "vlynq",
-+#endif
+- .bus_id = "vlynq",
.release = avsar_release,
};
-@@ -501,6 +504,9 @@ int shim_osLoadFWImage(unsigned char *pt
+@@ -501,6 +500,8 @@ int shim_osLoadFWImage(unsigned char *pt
const struct firmware *fw_entry;
size_t size;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
+ dev_set_name(&avsar, "avsar");
-+#endif
++
printk("requesting firmware image \"ar0700xx.bin\"\n");
if(device_register(&avsar) < 0) {
printk(KERN_ERR
diff --git a/package/kernel/ar7-atm/patches-D7.05.01.00/180-git_headers_include.patch b/package/kernel/ar7-atm/patches-D7.05.01.00/180-git_headers_include.patch
index feb6ea8605..69b433b2b9 100644
--- a/package/kernel/ar7-atm/patches-D7.05.01.00/180-git_headers_include.patch
+++ b/package/kernel/ar7-atm/patches-D7.05.01.00/180-git_headers_include.patch
@@ -1,54 +1,39 @@
--- a/tn7atm.c
+++ b/tn7atm.c
-@@ -76,10 +76,16 @@
- #include <linux/proc_fs.h>
- #include <linux/string.h>
+@@ -78,8 +78,8 @@
#include <linux/ctype.h>
-+#include <linux/version.h>
#include <asm/io.h>
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
- #include <asm/ar7/ar7.h>
- #include <asm/ar7/prom.h>
-+#else
+-#include <asm/ar7/ar7.h>
+-#include <asm/ar7/prom.h>
+#include <asm/mach-ar7/ar7.h>
+#include <asm/mach-ar7/prom.h>
-+#endif
#include "dsl_hal_api.h"
#ifdef AR7_EFM
--- a/tn7dsl.c
+++ b/tn7dsl.c
-@@ -120,8 +120,13 @@
- #include <linux/version.h>
+@@ -119,8 +119,8 @@
+ #include <linux/firmware.h>
#include <asm/io.h>
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
- #include <asm/ar7/ar7.h>
- #include <asm/ar7/prom.h>
-+#else
+-#include <asm/ar7/ar7.h>
+-#include <asm/ar7/prom.h>
+#include <asm/mach-ar7/ar7.h>
+#include <asm/mach-ar7/prom.h>
-+#endif
/* Modules specific header files */
#ifdef AR7_EFM
--- a/tn7sar.c
+++ b/tn7sar.c
-@@ -53,10 +53,16 @@
- #include <linux/proc_fs.h>
- #include <linux/string.h>
+@@ -55,8 +55,8 @@
#include <linux/ctype.h>
-+#include <linux/version.h>
#include <asm/io.h>
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
- #include <asm/ar7/ar7.h>
- #include <asm/ar7/prom.h>
-+#else
+-#include <asm/ar7/ar7.h>
+-#include <asm/ar7/prom.h>
+#include <asm/mach-ar7/ar7.h>
+#include <asm/mach-ar7/prom.h>
-+#endif
#define _CPHAL_AAL5
#define _CPHAL_SAR
diff --git a/package/kernel/ar7-atm/patches-D7.05.01.00/190-2.6.32_proc_fixes.patch b/package/kernel/ar7-atm/patches-D7.05.01.00/190-2.6.32_proc_fixes.patch
index 52ebbc1529..23045bb7b2 100644
--- a/package/kernel/ar7-atm/patches-D7.05.01.00/190-2.6.32_proc_fixes.patch
+++ b/package/kernel/ar7-atm/patches-D7.05.01.00/190-2.6.32_proc_fixes.patch
@@ -1,53 +1,39 @@
--- a/tn7dsl.c
+++ b/tn7dsl.c
-@@ -215,7 +215,11 @@ led_reg_t ledreg[2];
+@@ -209,7 +209,7 @@ led_reg_t ledreg[2];
static struct led_funcs ledreg[2];
#endif
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
- #define DEV_DSLMOD CTL_UNNUMBERED
-+#else
+-#define DEV_DSLMOD CTL_UNNUMBERED
+#define DEV_DSLMOD 0
-+#endif
#define MAX_STR_SIZE 256
#define DSL_MOD_SIZE 256
-@@ -3615,9 +3619,16 @@ static int dslmod_sysctl(ctl_table *ctl,
+@@ -3605,9 +3605,9 @@ static int dslmod_sysctl(ctl_table *ctl,
*/
if(write)
{
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
- ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
--
-+#else
+- ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
+ ret = proc_dostring(ctl, write, buffer, lenp, 0);
-+#endif
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
- switch (ctl->ctl_name)
-+#else
+
+- switch (ctl->ctl_name)
+ switch ((long)ctl->extra2)
-+#endif
{
case DEV_DSLMOD:
ptr = strpbrk(info, " \t");
-@@ -3701,14 +3712,29 @@ static int dslmod_sysctl(ctl_table *ctl,
+@@ -3691,14 +3691,21 @@ static int dslmod_sysctl(ctl_table *ctl,
else
{
len += sprintf(info+len, mod_req);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
- ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
-+#else
+- ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
+ ret = proc_dostring(ctl, write, buffer, lenp, 0);
-+#endif
}
return ret;
}
ctl_table dslmod_table[] = {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
- {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string}
-+#else
+- {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string}
+ {
+ .procname = "dslmod",
+ .data = info,
@@ -56,24 +42,20 @@
+ .proc_handler = &dslmod_sysctl,
+ .extra2 = (void *)DEV_DSLMOD,
+ }
-+#endif
,
{0}
};
-@@ -3716,7 +3742,16 @@ ctl_table dslmod_table[] = {
+@@ -3706,7 +3713,12 @@ ctl_table dslmod_table[] = {
/* Make sure that /proc/sys/dev is there */
ctl_table dslmod_root_table[] = {
#ifdef CONFIG_PROC_FS
-+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
- {CTL_DEV, "dev", NULL, 0, 0555, dslmod_table}
-+ #else
+- {CTL_DEV, "dev", NULL, 0, 0555, dslmod_table}
+ {
+ .procname = "dev",
+ .maxlen = 0,
+ .mode = 0555,
+ .child = dslmod_table,
+ }
-+ #endif
,
#endif /* CONFIG_PROC_FS */
{0}
diff --git a/package/kernel/ar7-atm/patches-D7.05.01.00/200-2.6.37_args.patch b/package/kernel/ar7-atm/patches-D7.05.01.00/200-2.6.37_args.patch
index f6dba4be9f..75de5a33e7 100644
--- a/package/kernel/ar7-atm/patches-D7.05.01.00/200-2.6.37_args.patch
+++ b/package/kernel/ar7-atm/patches-D7.05.01.00/200-2.6.37_args.patch
@@ -1,28 +1,24 @@
--- a/tn7atm.c
+++ b/tn7atm.c
-@@ -2009,7 +2009,11 @@ static int __init tn7atm_register (Tn7At
+@@ -2003,7 +2003,7 @@ static int __init tn7atm_register (Tn7At
dgprintf (4, "device %s being registered\n", priv->name);
-+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
- mydev = atm_dev_register (priv->proc_name, &tn7atm_ops, -1, NULL);
-+ #else
+- mydev = atm_dev_register (priv->proc_name, &tn7atm_ops, -1, NULL);
+ mydev = atm_dev_register (priv->proc_name, NULL, &tn7atm_ops, -1, NULL);
-+ #endif
if (mydev == NULL)
{
--- a/tn7dsl.c
+++ b/tn7dsl.c
-@@ -512,14 +512,17 @@ int shim_osLoadFWImage(unsigned char *pt
+@@ -499,13 +499,16 @@ int shim_osLoadFWImage(unsigned char *pt
{
const struct firmware *fw_entry;
size_t size;
+ int ret;
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
dev_set_name(&avsar, "avsar");
- #endif
+
printk("requesting firmware image \"ar0700xx.bin\"\n");
- if(device_register(&avsar) < 0) {
+ dev_set_name(&avsar, "avsar");
diff --git a/package/kernel/ar7-atm/patches-D7.05.01.00/220-3.10-update_proc_code.patch b/package/kernel/ar7-atm/patches-D7.05.01.00/220-3.10-update_proc_code.patch
index 747869bf7c..1d3d7583be 100644
--- a/package/kernel/ar7-atm/patches-D7.05.01.00/220-3.10-update_proc_code.patch
+++ b/package/kernel/ar7-atm/patches-D7.05.01.00/220-3.10-update_proc_code.patch
@@ -125,7 +125,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#endif __SGAPI_H
--- a/tn7atm.c
+++ b/tn7atm.c
-@@ -265,11 +265,9 @@ MODULE_PARM_DESC(oam_lb_timeout, "OAM LB
+@@ -259,11 +259,9 @@ MODULE_PARM_DESC(oam_lb_timeout, "OAM LB
#ifdef AR7_EFM
extern void tn7dsl_disable_alarm(void);
@@ -140,7 +140,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
extern unsigned int g_efm_proc_ctl;
extern struct net_device *mydev_efm;
extern Tn7AtmPrivate *mypriv;
-@@ -305,31 +303,17 @@ extern int tn7efm_register (Tn7AtmPrivat
+@@ -299,31 +297,17 @@ extern int tn7efm_register (Tn7AtmPrivat
static int tn7atm_irq_request (struct atm_dev *dev);
#endif
@@ -177,15 +177,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
//CT - Added function to return chipset Id
void tn7atm_get_chipsetId (char *pVerId);
-@@ -456,78 +440,83 @@ const char drv_proc_root_folder[] = "ava
- static struct proc_dir_entry *root_proc_dir_entry = NULL;
- #define DRV_PROC_MODE 0644
- static int proc_root_already_exists = TRUE;
-+
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
-+#define PDE_DATA(inode) PDE(inode)->data
-+#endif
-+
+@@ -453,75 +437,75 @@ static int proc_root_already_exists = TR
static struct
{
const unsigned char name[32];
@@ -301,7 +293,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
};
/* *INDENT-ON* */
-@@ -1811,76 +1800,81 @@ int tn7atm_receive (void *os_dev, int ch
+@@ -1805,76 +1789,81 @@ int tn7atm_receive (void *os_dev, int ch
return 0;
}
@@ -353,15 +345,15 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
- return len;
+ return 0;
-+}
-+
-+static int tn7atm_proc_channels_open(struct inode *inode, struct file *file)
-+{
-+ return single_open(file, tn7atm_proc_channels, PDE_DATA(inode));
}
-static int tn7atm_proc_private (char *buf, char **start, off_t offset,
- int count, int *eof, void *data)
++static int tn7atm_proc_channels_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, tn7atm_proc_channels, PDE_DATA(inode));
++}
++
+static struct file_operations tn7atm_proc_channels_fops = {
+ .owner = THIS_MODULE,
+ .open = tn7atm_proc_channels_open,
@@ -426,7 +418,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
void tn7atm_sarhal_isr_register (void *os_dev, void *hal_isr,
int interrupt_num)
{
-@@ -2033,10 +2027,8 @@ static int __init tn7atm_register (Tn7At
+@@ -2023,10 +2012,8 @@ static int __init tn7atm_register (Tn7At
return ATM_REG_OK;
}
@@ -438,7 +430,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
char dslVer[8];
char dspVer[10];
char chipsetID[32]; //CT CQ10076 - Added temporary buffer to store chipset Id
-@@ -2051,58 +2043,52 @@ static int tn7atm_proc_version (char *bu
+@@ -2041,58 +2028,52 @@ static int tn7atm_proc_version (char *bu
priv = mydev->dev_data;
#ifdef AR7_EFM
@@ -517,7 +509,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
pdspV1, pdspV2, (priv->curr_TC_mode== TC_MODE_ATM) ? '*' : ' ');
tn7sar_get_EFM_firmware_version (&pdspV1, &pdspV2);
-@@ -2114,26 +2100,37 @@ static int tn7atm_proc_version (char *bu
+@@ -2104,26 +2085,37 @@ static int tn7atm_proc_version (char *bu
#endif
str = "EFM";
@@ -531,16 +523,16 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
tn7atm_get_chipsetId(chipsetID);
- len += sprintf (buf + len, "Chipset ID: [%s]\n",chipsetID);
+ seq_printf (m, "Chipset ID: [%s]\n",chipsetID);
-+
-+ return 0;
-+}
- return len;
++ return 0;
+ }
+
+static int tn7atm_proc_version_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, tn7atm_proc_version, PDE_DATA(inode));
- }
-
++}
++
+static struct file_operations tn7atm_proc_version_fops = {
+ .owner = THIS_MODULE,
+ .open = tn7atm_proc_version_open,
@@ -560,7 +552,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
int ctr;
const char *residual;
-@@ -2214,24 +2211,7 @@ static int __init tn7atm_detect (void)
+@@ -2204,24 +2196,7 @@ static int __init tn7atm_detect (void)
*/
for (ctr = 0; ctr < (NUM_ELEMS (proc_if)); ctr++)
{
@@ -586,7 +578,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
}
tn7dsl_dslmod_sysctl_register ();
-@@ -2711,73 +2691,18 @@ static int tn7atm_set_can_support_adsl2
+@@ -2701,73 +2676,18 @@ static int tn7atm_set_can_support_adsl2
return TRUE;
}
@@ -599,10 +591,10 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+static int tn7atm_proc_qos_read(struct seq_file *m, void *data)
{
- if (!de || !de->low_ino)
+- return 0;
+- if (de->namelen != len)
+ seq_printf (m, "\nEnableQoS = %d\n", EnableQoS);
return 0;
-- if (de->namelen != len)
-- return 0;
- return !strncmp (name, de->name, len);
-}
-
@@ -665,7 +657,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
}
static int tn7atm_proc_qos_write(struct file *fp, const char *buf, unsigned long count, void *data)
-@@ -2812,7 +2737,7 @@ static int tn7atm_proc_qos_write(struct
+@@ -2802,7 +2722,7 @@ static int tn7atm_proc_qos_write(struct
}
// [KT]
@@ -674,7 +666,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
{
char local_buf[10];
-@@ -2843,5 +2768,33 @@ int tn7atm_proc_turbodsl_write(struct fi
+@@ -2833,5 +2753,33 @@ int tn7atm_proc_turbodsl_write(struct fi
return count;
}
@@ -710,17 +702,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
module_exit (tn7atm_exit);
--- a/tn7dsl.c
+++ b/tn7dsl.c
-@@ -233,6 +233,9 @@ static struct led_funcs ledreg[2];
-
- #define tn7dsl_kfree_skb(x) dev_kfree_skb(x)
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
-+#define PDE_DATA(inode) PDE(inode)->data
-+#endif
-
- //---------------------------------------------
- // Begin Clear EOC definitions
-@@ -366,7 +369,7 @@ static void tn7dsl_register_dslss_led(vo
+@@ -356,7 +356,7 @@ static void tn7dsl_register_dslss_led(vo
void tn7dsl_dslmod_sysctl_register(void);
void tn7dsl_dslmod_sysctl_unregister(void);
static int tn7dsl_clear_eoc_receive(void);
@@ -729,7 +711,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
/* end of internal functions */
// UR8_MERGE_START CQ11054 Jack Zhang
-@@ -698,11 +701,9 @@ void shim_osCriticalExit(void)
+@@ -684,11 +684,9 @@ void shim_osCriticalExit(void)
spin_unlock_irqrestore(&shimLock, flags);
}
@@ -742,7 +724,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
int i, j;
int bin = (int) data;
unsigned short *rxSnrPerBin;
-@@ -723,95 +724,128 @@ static int tn7dsl_proc_snr_print (char *
+@@ -709,95 +707,128 @@ static int tn7dsl_proc_snr_print (char *
break;
default:
@@ -915,7 +897,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#ifndef NO_ACT
int tn7dsl_proc_ds_noise(char* buf, char **start, off_t offset, int count,
int *eof, void *data)
-@@ -874,59 +908,48 @@ static char *pUnknown= "Unknown";
+@@ -860,59 +891,48 @@ static char *pUnknown= "Unknown";
#ifdef ADV_DIAG_STATS //CQ10275, CQ10449
//UR8_MERGE_START CQ10449 Jack Zhang
@@ -975,15 +957,15 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
printk("proc_adv_stats - return: ctr=%d, len=%d\n", ctr, len);
- return len;
+ return 0;
- }
-
--static int proc_adv_stats_header(char* buf, int limit)
++}
++
+
+static int tn7dsl_proc_adv_stats_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, tn7dsl_proc_adv_stats, PDE_DATA(inode));
-+}
-+
+ }
+
+-static int proc_adv_stats_header(char* buf, int limit)
+struct file_operations tn7dsl_proc_adv_stats_fops = {
+ .owner = THIS_MODULE,
+ .open = tn7dsl_proc_adv_stats_open,
@@ -996,7 +978,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
{
int len = 0;
int i = 0;
-@@ -935,66 +958,53 @@ static int proc_adv_stats_header(char* b
+@@ -921,66 +941,53 @@ static int proc_adv_stats_header(char* b
*/
dslhal_api_gatherStatistics(pIhw);
@@ -1084,7 +1066,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
}
static int getDiagDisplayMode()
-@@ -1017,29 +1027,24 @@ static int getDiagDisplayMode()
+@@ -1003,29 +1010,24 @@ static int getDiagDisplayMode()
ret = 2;
return ret;
}
@@ -1118,7 +1100,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
(unsigned int)pIhw->AppData.BitAllocTblDstrm[i],
(unsigned int)pIhw->AppData.marginTblDstrm[i],
(int)pIhw->AppData.rxSnrPerBin0[i]);
-@@ -1050,26 +1055,34 @@ int tn7dsl_proc_adv_stats1(char* buf, ch
+@@ -1036,26 +1038,34 @@ int tn7dsl_proc_adv_stats1(char* buf, ch
if (dslhal_api_getSNRpsds(pIhw, SNRpsds, 1))
{
dgprintf(4, "dslhal_api_getSNRpsds failed!\n");
@@ -1161,7 +1143,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
int i;
int mode = 0; //mode = 0 => ADSL1 or ADSL2 & 2+
unsigned char SNRpsds[512];
-@@ -1079,12 +1092,10 @@ int tn7dsl_proc_adv_stats2(char* buf, ch
+@@ -1065,12 +1075,10 @@ int tn7dsl_proc_adv_stats2(char* buf, ch
if( mode==1) //ADSL1
{
dslhal_api_gatherStatistics(pIhw);
@@ -1176,7 +1158,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
(unsigned int)pIhw->AppData.BitAllocTblDstrm[i],
(unsigned int)pIhw->AppData.marginTblDstrm[i],
(int)pIhw->AppData.rxSnrPerBin0[i]);
-@@ -1095,26 +1106,35 @@ int tn7dsl_proc_adv_stats2(char* buf, ch
+@@ -1081,26 +1089,35 @@ int tn7dsl_proc_adv_stats2(char* buf, ch
if (dslhal_api_getSNRpsds(pIhw, SNRpsds, 1))
{
dgprintf(4, "dslhal_api_getSNRpsds failed!\n");
@@ -1220,7 +1202,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
int i;
int mode = 0; //mode = 0 => ADSL1 or ADSL2 & 2+
unsigned char SNRpsds[512];
-@@ -1124,12 +1144,10 @@ int tn7dsl_proc_adv_stats3(char* buf, ch
+@@ -1110,12 +1127,10 @@ int tn7dsl_proc_adv_stats3(char* buf, ch
if( mode==1) //ADSL1
{
dslhal_api_gatherStatistics(pIhw);
@@ -1235,7 +1217,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
(unsigned int)pIhw->AppData.BitAllocTblDstrm[i],
(unsigned int)pIhw->AppData.marginTblDstrm[i],
(int)pIhw->AppData.rxSnrPerBin0[i]);
-@@ -1140,283 +1158,287 @@ int tn7dsl_proc_adv_stats3(char* buf, ch
+@@ -1126,283 +1141,287 @@ int tn7dsl_proc_adv_stats3(char* buf, ch
if (dslhal_api_getSNRpsds(pIhw, SNRpsds, 1))
{
dgprintf(4, "dslhal_api_getSNRpsds failed!\n");
@@ -1455,9 +1437,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
{
+ return single_open(file, tn7dsl_proc_dbg_rmsgs1, PDE_DATA(inode));
+}
-
-- int len = 0;
-- int limit = count - 80;
++
+struct file_operations tn7dsl_proc_dbg_rmsgs1_fops = {
+ .owner = THIS_MODULE,
+ .open = tn7dsl_proc_dbg_rmsgs1_open,
@@ -1465,7 +1445,9 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+ .llseek = seq_lseek,
+ .release = single_release,
+};
-+
+
+- int len = 0;
+- int limit = count - 80;
+
+int tn7dsl_proc_dbg_rmsgs2(struct seq_file *m, void *data)
+{
@@ -1636,12 +1618,12 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
- return len;
+ return 0;
- }
++}
+
+static int tn7dsl_proc_dbg_rmsgs4_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, tn7dsl_proc_dbg_rmsgs4, PDE_DATA(inode));
-+}
+ }
+
+struct file_operations tn7dsl_proc_dbg_rmsgs4_fops = {
+ .owner = THIS_MODULE,
@@ -1664,7 +1646,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
int F4count, F5count;
unsigned int maxRate=0;
unsigned int us_maxRate=0;
-@@ -1424,80 +1446,58 @@ int tn7dsl_proc_stats(char* buf, char **
+@@ -1410,80 +1429,58 @@ int tn7dsl_proc_stats(char* buf, char **
//UR8_MERGE_START CQ10700 Manjula K
struct atm_dev *dev;
Tn7AtmPrivate *priv;
@@ -1768,7 +1750,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
((unsigned int) pIhw->AppData.usAtm_count[0] +
(unsigned int) pIhw->AppData.usAtm_count[1]) * 48,
((unsigned int) pIhw->AppData.dsGood_count[0] +
-@@ -1505,9 +1505,7 @@ int tn7dsl_proc_stats(char* buf, char **
+@@ -1491,9 +1488,7 @@ int tn7dsl_proc_stats(char* buf, char **
/*
* Superframe Count
*/
@@ -1779,7 +1761,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
"\tUS Superframe Cnt :\t%u\tDS Superframe Cnt:\t%u\n",
(unsigned int)pIhw->AppData.usSuperFrmCnt,
(unsigned int)pIhw->AppData.dsSuperFrmCnt );
-@@ -1515,59 +1513,45 @@ int tn7dsl_proc_stats(char* buf, char **
+@@ -1501,59 +1496,45 @@ int tn7dsl_proc_stats(char* buf, char **
/*
* US and DS power
*/
@@ -1851,7 +1833,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
(unsigned int)pIhw->AppData.currentHybridNum, trellis);
//@Added Maximum attainable bit rate information. 05-14-2004
-@@ -1581,12 +1565,12 @@ int tn7dsl_proc_stats(char* buf, char **
+@@ -1567,12 +1548,12 @@ int tn7dsl_proc_stats(char* buf, char **
}
else
{
@@ -1866,7 +1848,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
(unsigned char *) &rMsgsRA[0], 12);
maxRate = (unsigned int)pIhw->AppData.DSConRate;
-@@ -1602,294 +1586,223 @@ int tn7dsl_proc_stats(char* buf, char **
+@@ -1588,294 +1569,223 @@ int tn7dsl_proc_stats(char* buf, char **
}
}
@@ -2259,7 +2241,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
char *state;
int tag;
-@@ -1923,22 +1836,31 @@ extern int tn7efm_get_currTCmode(void);
+@@ -1909,22 +1819,31 @@ extern int tn7efm_get_currTCmode(void);
if(pIhw->lConnected == 1)
state = "SHOWTIME";
@@ -2301,7 +2283,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
/**********************************************************************
** *
** tn7dsl_hdlc_update_crc() -- Calculate CRC *
-@@ -2203,11 +2125,8 @@ static int tn7dsl_hdlc_rx_process(unsign
+@@ -2189,11 +2108,8 @@ static int tn7dsl_hdlc_rx_process(unsign
return(ret);
}
@@ -2314,7 +2296,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
int offset[2] = {34, 0}; // point to buffer parameter data structure
clearEocParm_t peoc;
-@@ -2216,62 +2135,49 @@ int tn7dsl_proc_eoc (char *buf, char **s
+@@ -2202,62 +2118,49 @@ int tn7dsl_proc_eoc (char *buf, char **s
(unsigned char *) &peoc,
sizeof (clearEocParm_t));
@@ -2417,7 +2399,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
int tn7dsl_clear_eoc_setup(void)
{
int i;
-@@ -4624,14 +4530,10 @@ int tn7dsl_proc_write_stats (struct file
+@@ -4591,14 +4494,10 @@ int tn7dsl_proc_write_stats (struct file
}
@@ -2433,13 +2415,12 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
typedef struct
{
-@@ -4712,197 +4614,185 @@ int tn7dsl_proc_train_mode_export (char
+@@ -4679,197 +4578,185 @@ int tn7dsl_proc_train_mode_export (char
}
- if(len <= count)
-+ for (i = 0; (i < num_entries) ; i++)
- {
+- {
- for (i = ctr; ((i < num_entries)&& (len <= count)) ; i++)
- {
- /*
@@ -2453,21 +2434,22 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
- else
- break;
- }
-+ seq_printf(m, "%s\t\t\t%#x\n",
-+ dsl_modes[i].mode_name, dsl_modes[i].mode_value);
- }
-
+- }
+-
- /*
- * Data was completely written
- */
- if (i >= num_entries)
-- {
++ for (i = 0; (i < num_entries) ; i++)
+ {
- /*
- * We are done with this
- */
- *eof = 1;
- ctr = 0;
-- }
++ seq_printf(m, "%s\t\t\t%#x\n",
++ dsl_modes[i].mode_name, dsl_modes[i].mode_value);
+ }
- else
- {
- /*
@@ -2475,7 +2457,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
- * terminate the buffer.
- */
- *(cp + len) = '\0';
--
+
- /*
- * Save the value of the counter for the next read for the rest of the
- * data.
@@ -2712,7 +2694,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
}
start = (indx -1) * 128;
-@@ -4911,39 +4801,89 @@ static int tn7dsl_proc_HLINpsdsIndx(char
+@@ -4878,39 +4765,89 @@ static int tn7dsl_proc_HLINpsdsIndx(char
{
if (!(i%8))
{
@@ -2817,7 +2799,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#endif
#endif //TR69_HLIN_IN
// UR8_MERGE_END CQ10979*
-@@ -4951,64 +4891,48 @@ int tn7dsl_proc_HLINpsds4(char* buf, cha
+@@ -4918,64 +4855,48 @@ int tn7dsl_proc_HLINpsds4(char* buf, cha
// * UR8_MERGE_START CQ11057 Jack Zhang
#ifdef TR69_PMD_IN
#ifndef NO_ADV_STATS
@@ -2897,7 +2879,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
}
-@@ -5016,19 +4940,28 @@ int tn7dsl_proc_PMDus(char* buf, char **
+@@ -4983,19 +4904,28 @@ int tn7dsl_proc_PMDus(char* buf, char **
for (i=0; i<pIhw->AppData.max_us_tones; i++)
{
if (!(i%16))
@@ -2937,15 +2919,11 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
// * UR8_MERGE_END CQ11057 *
--- a/tn7sar.c
+++ b/tn7sar.c
-@@ -1553,44 +1553,70 @@ int tn7sar_oam_generation(void *privCont
+@@ -1547,44 +1547,66 @@ int tn7sar_oam_generation(void *privCont
return 0;
}
-int tn7sar_proc_oam_ping(char* buf, char **start, off_t offset, int count,int *eof, void *data)
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
-+#define PDE_DATA(inode) PDE(inode)->data
-+#endif
-+
+static int tn7sar_proc_oam_ping(struct seq_file *m, void *data)
{
- int len = 0;
@@ -3020,7 +2998,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
struct atm_dev *dev;
Tn7AtmPrivate *priv;
int i, j, k;
-@@ -1599,21 +1625,19 @@ int tn7sar_proc_sar_stat(char* buf, char
+@@ -1593,21 +1615,19 @@ int tn7sar_proc_sar_stat(char* buf, char
unsigned int *pStateBase, *pSarStat;
HAL_FUNCTIONS *pHalFunc;
HAL_DEVICE *pHalDev;
@@ -3045,7 +3023,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
k=0;
for(j=0;j<4;j++)
{
-@@ -1626,26 +1650,16 @@ int tn7sar_proc_sar_stat(char* buf, char
+@@ -1620,26 +1640,16 @@ int tn7sar_proc_sar_stat(char* buf, char
{
if((char *)*pSarStat == NULL)
break;
@@ -3076,7 +3054,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
}
}
-@@ -1654,9 +1668,22 @@ int tn7sar_proc_sar_stat(char* buf, char
+@@ -1648,9 +1658,22 @@ int tn7sar_proc_sar_stat(char* buf, char
}
}
diff --git a/package/kernel/ar7-atm/patches-D7.05.01.00/240-3.18_fixes.patch b/package/kernel/ar7-atm/patches-D7.05.01.00/240-3.18_fixes.patch
index a29bae80a4..43da567b5f 100644
--- a/package/kernel/ar7-atm/patches-D7.05.01.00/240-3.18_fixes.patch
+++ b/package/kernel/ar7-atm/patches-D7.05.01.00/240-3.18_fixes.patch
@@ -1,6 +1,6 @@
--- a/tn7dsl.c
+++ b/tn7dsl.c
-@@ -363,7 +363,7 @@ static void tn7dsl_chng_modulation(void*
+@@ -350,7 +350,7 @@ static void tn7dsl_chng_modulation(void*
static unsigned int tn7dsl_set_modulation(void* data, int flag);
static void tn7dsl_ctrl_fineGain(int value);
static void tn7dsl_set_fineGainValue(int value);
@@ -9,7 +9,7 @@
void *buffer, size_t * lenp);
static void tn7dsl_register_dslss_led(void);
void tn7dsl_dslmod_sysctl_register(void);
-@@ -3505,7 +3505,7 @@ unsigned int tn7dsl_get_memory(unsigned
+@@ -3488,7 +3488,7 @@ unsigned int tn7dsl_get_memory(unsigned
@@ -18,21 +18,21 @@
void *buffer, size_t *lenp)
{
char *ptr;
-@@ -3631,7 +3631,7 @@ static int dslmod_sysctl(ctl_table *ctl,
+@@ -3603,7 +3603,7 @@ static int dslmod_sysctl(ctl_table *ctl,
}
-ctl_table dslmod_table[] = {
+struct ctl_table dslmod_table[] = {
- #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
- {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string}
- #else
-@@ -3649,7 +3649,7 @@ ctl_table dslmod_table[] = {
+ {
+ .procname = "dslmod",
+ .data = info,
+@@ -3617,7 +3617,7 @@ ctl_table dslmod_table[] = {
};
/* Make sure that /proc/sys/dev is there */
-ctl_table dslmod_root_table[] = {
+struct ctl_table dslmod_root_table[] = {
#ifdef CONFIG_PROC_FS
- #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
- {CTL_DEV, "dev", NULL, 0, 0555, dslmod_table}
+ {
+ .procname = "dev",
diff --git a/package/kernel/ar7-atm/patches-D7.05.01.00/250-4.1_fixes.patch b/package/kernel/ar7-atm/patches-D7.05.01.00/250-4.1_fixes.patch
index bc913a78a8..426d593191 100644
--- a/package/kernel/ar7-atm/patches-D7.05.01.00/250-4.1_fixes.patch
+++ b/package/kernel/ar7-atm/patches-D7.05.01.00/250-4.1_fixes.patch
@@ -1,6 +1,6 @@
--- a/tn7atm.c
+++ b/tn7atm.c
-@@ -856,7 +856,7 @@ static int __init tn7atm_irq_request (st
+@@ -845,7 +845,7 @@ static int __init tn7atm_irq_request (st
priv->sar_irq = LNXINTNUM (ATM_SAR_INT); /* Interrupt line # */
@@ -9,7 +9,7 @@
printk ("Could not register tn7atm_sar_irq\n");
/*
-@@ -880,7 +880,7 @@ static int __init tn7atm_irq_request (st
+@@ -869,7 +869,7 @@ static int __init tn7atm_irq_request (st
* Reigster Receive interrupt A
*/
priv->dsl_irq = LNXINTNUM (ATM_DSL_INT); /* Interrupt line # */