aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/ar7-atm/patches-D7.04.03.00/220-3.10-update_proc_code.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/kernel/ar7-atm/patches-D7.04.03.00/220-3.10-update_proc_code.patch')
-rw-r--r--package/kernel/ar7-atm/patches-D7.04.03.00/220-3.10-update_proc_code.patch118
1 files changed, 48 insertions, 70 deletions
diff --git a/package/kernel/ar7-atm/patches-D7.04.03.00/220-3.10-update_proc_code.patch b/package/kernel/ar7-atm/patches-D7.04.03.00/220-3.10-update_proc_code.patch
index be81ee1253..6026d30c60 100644
--- a/package/kernel/ar7-atm/patches-D7.04.03.00/220-3.10-update_proc_code.patch
+++ b/package/kernel/ar7-atm/patches-D7.04.03.00/220-3.10-update_proc_code.patch
@@ -116,7 +116,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#endif __SGAPI_H
--- a/tn7atm.c
+++ b/tn7atm.c
-@@ -277,25 +277,15 @@ static int tn7atm_change_qos (struct atm
+@@ -271,25 +271,15 @@ static int tn7atm_change_qos (struct atm
static int tn7atm_detect (void);
static int tn7atm_init (struct atm_dev *dev);
static int tn7atm_irq_request (struct atm_dev *dev);
@@ -147,15 +147,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
//CT - Added function to return chipset Id
void tn7atm_get_chipsetId (char *pVerId);
-@@ -415,63 +405,67 @@ 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
-+
+@@ -412,60 +402,59 @@ static int proc_root_already_exists = TR
static struct
{
const unsigned char name[32];
@@ -250,7 +242,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
};
/* *INDENT-ON* */
-@@ -1709,75 +1703,81 @@ int tn7atm_receive (void *os_dev, int ch
+@@ -1703,75 +1692,81 @@ int tn7atm_receive (void *os_dev, int ch
return 0;
}
@@ -301,15 +293,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,
@@ -353,11 +345,11 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+
+ seq_printf (m, "tx_irq: %02d", priv->sar_irq);
+ seq_printf (m, "rx_irq: %02d", priv->dsl_irq);
-
-- return len;
++
+ return 0;
+}
-+
+
+- return len;
+static int tn7atm_proc_private_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, tn7atm_proc_private, PDE_DATA(inode));
@@ -374,7 +366,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
void tn7atm_sarhal_isr_register (void *os_dev, void *hal_isr,
int interrupt_num)
{
-@@ -1900,10 +1900,8 @@ static int __init tn7atm_register (Tn7At
+@@ -1890,10 +1885,8 @@ static int __init tn7atm_register (Tn7At
return ATM_REG_OK;
}
@@ -386,7 +378,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
-@@ -1914,56 +1912,64 @@ static int tn7atm_proc_version (char *bu
+@@ -1904,56 +1897,64 @@ static int tn7atm_proc_version (char *bu
priv = mydev->dev_data;
@@ -472,7 +464,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
int ctr;
const char *residual;
-@@ -2012,24 +2018,7 @@ static int __init tn7atm_detect (void)
+@@ -2002,24 +2003,7 @@ static int __init tn7atm_detect (void)
*/
for (ctr = 0; ctr < (NUM_ELEMS (proc_if)); ctr++)
{
@@ -498,7 +490,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
}
tn7dsl_dslmod_sysctl_register ();
-@@ -2501,63 +2490,10 @@ static int tn7atm_set_can_support_adsl2
+@@ -2491,63 +2475,10 @@ static int tn7atm_set_can_support_adsl2
return TRUE;
}
@@ -564,7 +556,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)
-@@ -2591,5 +2527,19 @@ static int tn7atm_proc_qos_write(struct
+@@ -2581,5 +2512,19 @@ static int tn7atm_proc_qos_write(struct
return count;
}
@@ -586,17 +578,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
module_exit (tn7atm_exit);
--- a/tn7dsl.c
+++ b/tn7dsl.c
-@@ -221,6 +221,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
-@@ -349,7 +352,7 @@ static void tn7dsl_register_dslss_led(vo
+@@ -339,7 +339,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);
@@ -605,7 +587,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
/* end of internal functions */
// UR8_MERGE_START CQ11054 Jack Zhang
-@@ -649,11 +652,9 @@ void shim_osCriticalExit(void)
+@@ -635,11 +635,9 @@ void shim_osCriticalExit(void)
spin_unlock_irqrestore(&shimLock, flags);
}
@@ -618,7 +600,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
int i, j;
int bin = (int) data;
unsigned short *rxSnrPerBin;
-@@ -674,95 +675,128 @@ static int tn7dsl_proc_snr_print (char *
+@@ -660,95 +658,128 @@ static int tn7dsl_proc_snr_print (char *
break;
default:
@@ -791,7 +773,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)
-@@ -825,59 +859,48 @@ static char *pUnknown= "Unknown";
+@@ -811,59 +842,48 @@ static char *pUnknown= "Unknown";
#ifdef ADV_DIAG_STATS //CQ10275, CQ10449
//UR8_MERGE_START CQ10449 Jack Zhang
@@ -874,7 +856,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
{
int len = 0;
int i = 0;
-@@ -886,66 +909,53 @@ static int proc_adv_stats_header(char* b
+@@ -872,66 +892,53 @@ static int proc_adv_stats_header(char* b
*/
dslhal_api_gatherStatistics(pIhw);
@@ -963,7 +945,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
}
static int getDiagDisplayMode()
-@@ -968,29 +978,24 @@ static int getDiagDisplayMode()
+@@ -954,29 +961,24 @@ static int getDiagDisplayMode()
ret = 2;
return ret;
}
@@ -998,7 +980,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]);
-@@ -1001,26 +1006,34 @@ int tn7dsl_proc_adv_stats1(char* buf, ch
+@@ -987,26 +989,34 @@ int tn7dsl_proc_adv_stats1(char* buf, ch
if (dslhal_api_getSNRpsds(pIhw, SNRpsds, 1))
{
dgprintf(4, "dslhal_api_getSNRpsds failed!\n");
@@ -1041,7 +1023,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
int i;
int mode = 0; //mode = 0 => ADSL1 or ADSL2 & 2+
unsigned char SNRpsds[512];
-@@ -1030,12 +1043,10 @@ int tn7dsl_proc_adv_stats2(char* buf, ch
+@@ -1016,12 +1026,10 @@ int tn7dsl_proc_adv_stats2(char* buf, ch
if( mode==1) //ADSL1
{
dslhal_api_gatherStatistics(pIhw);
@@ -1056,7 +1038,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]);
-@@ -1046,26 +1057,35 @@ int tn7dsl_proc_adv_stats2(char* buf, ch
+@@ -1032,26 +1040,35 @@ int tn7dsl_proc_adv_stats2(char* buf, ch
if (dslhal_api_getSNRpsds(pIhw, SNRpsds, 1))
{
dgprintf(4, "dslhal_api_getSNRpsds failed!\n");
@@ -1100,7 +1082,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
int i;
int mode = 0; //mode = 0 => ADSL1 or ADSL2 & 2+
unsigned char SNRpsds[512];
-@@ -1075,12 +1095,10 @@ int tn7dsl_proc_adv_stats3(char* buf, ch
+@@ -1061,12 +1078,10 @@ int tn7dsl_proc_adv_stats3(char* buf, ch
if( mode==1) //ADSL1
{
dslhal_api_gatherStatistics(pIhw);
@@ -1115,7 +1097,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]);
-@@ -1091,283 +1109,287 @@ int tn7dsl_proc_adv_stats3(char* buf, ch
+@@ -1077,283 +1092,287 @@ int tn7dsl_proc_adv_stats3(char* buf, ch
if (dslhal_api_getSNRpsds(pIhw, SNRpsds, 1))
{
dgprintf(4, "dslhal_api_getSNRpsds failed!\n");
@@ -1256,7 +1238,9 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
{
+ return single_open(file, tn7dsl_proc_dbg_cmsgs, PDE_DATA(inode));
+}
-+
+
+- int len = 0;
+- int limit = count - 80;
+struct file_operations tn7dsl_proc_dbg_cmsgs_fops = {
+ .owner = THIS_MODULE,
+ .open = tn7dsl_proc_dbg_cmsgs_open,
@@ -1264,9 +1248,7 @@ 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_rmsgs1(struct seq_file *m, void *data)
+{
@@ -1544,7 +1526,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
int F4count, F5count;
unsigned int maxRate=0;
unsigned int us_maxRate=0;
-@@ -1375,80 +1397,58 @@ int tn7dsl_proc_stats(char* buf, char **
+@@ -1361,80 +1380,58 @@ int tn7dsl_proc_stats(char* buf, char **
//UR8_MERGE_START CQ10700 Manjula K
struct atm_dev *dev;
Tn7AtmPrivate *priv;
@@ -1648,7 +1630,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] +
-@@ -1456,9 +1456,7 @@ int tn7dsl_proc_stats(char* buf, char **
+@@ -1442,9 +1439,7 @@ int tn7dsl_proc_stats(char* buf, char **
/*
* Superframe Count
*/
@@ -1659,7 +1641,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 );
-@@ -1466,57 +1464,45 @@ int tn7dsl_proc_stats(char* buf, char **
+@@ -1452,57 +1447,45 @@ int tn7dsl_proc_stats(char* buf, char **
/*
* US and DS power
*/
@@ -1732,7 +1714,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
(unsigned int)pIhw->AppData.currentHybridNum, trellis);
//@Added Maximum attainable bit rate information. 05-14-2004
-@@ -1528,12 +1514,12 @@ int tn7dsl_proc_stats(char* buf, char **
+@@ -1514,12 +1497,12 @@ int tn7dsl_proc_stats(char* buf, char **
}
else
{
@@ -1747,7 +1729,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
(unsigned char *) &rMsgsRA[0], 12);
maxRate = (unsigned int)pIhw->AppData.DSConRate;
-@@ -1549,283 +1535,213 @@ int tn7dsl_proc_stats(char* buf, char **
+@@ -1535,283 +1518,213 @@ int tn7dsl_proc_stats(char* buf, char **
}
}
@@ -2129,7 +2111,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
char *state;
int tag;
-@@ -1859,16 +1775,26 @@ int tn7dsl_proc_modem(char* buf, char **
+@@ -1845,16 +1758,26 @@ int tn7dsl_proc_modem(char* buf, char **
if(pIhw->lConnected == 1)
state = "SHOWTIME";
@@ -2163,7 +2145,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
/**********************************************************************
** *
** tn7dsl_hdlc_update_crc() -- Calculate CRC *
-@@ -2133,11 +2059,8 @@ static int tn7dsl_hdlc_rx_process(unsign
+@@ -2119,11 +2042,8 @@ static int tn7dsl_hdlc_rx_process(unsign
return(ret);
}
@@ -2176,7 +2158,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
int offset[2] = {34, 0}; // point to buffer parameter data structure
clearEocParm_t peoc;
-@@ -2146,62 +2069,49 @@ int tn7dsl_proc_eoc (char *buf, char **s
+@@ -2132,62 +2052,49 @@ int tn7dsl_proc_eoc (char *buf, char **s
(unsigned char *) &peoc,
sizeof (clearEocParm_t));
@@ -2279,7 +2261,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
int tn7dsl_clear_eoc_setup(void)
{
int i;
-@@ -4440,14 +4350,10 @@ int tn7dsl_proc_write_stats (struct file
+@@ -4407,14 +4314,10 @@ int tn7dsl_proc_write_stats (struct file
}
@@ -2295,7 +2277,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
typedef struct
{
-@@ -4528,197 +4434,185 @@ int tn7dsl_proc_train_mode_export (char
+@@ -4495,197 +4398,185 @@ int tn7dsl_proc_train_mode_export (char
}
@@ -2574,7 +2556,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
}
start = (indx -1) * 128;
-@@ -4727,39 +4621,89 @@ static int tn7dsl_proc_HLINpsdsIndx(char
+@@ -4694,39 +4585,89 @@ static int tn7dsl_proc_HLINpsdsIndx(char
{
if (!(i%8))
{
@@ -2679,7 +2661,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#endif
#endif //TR69_HLIN_IN
// UR8_MERGE_END CQ10979*
-@@ -4767,64 +4711,48 @@ int tn7dsl_proc_HLINpsds4(char* buf, cha
+@@ -4734,64 +4675,48 @@ int tn7dsl_proc_HLINpsds4(char* buf, cha
// * UR8_MERGE_START CQ11057 Jack Zhang
#ifdef TR69_PMD_IN
#ifndef NO_ADV_STATS
@@ -2760,7 +2742,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
}
-@@ -4832,19 +4760,28 @@ int tn7dsl_proc_PMDus(char* buf, char **
+@@ -4799,19 +4724,28 @@ int tn7dsl_proc_PMDus(char* buf, char **
for (i=0; i<pIhw->AppData.max_us_tones; i++)
{
if (!(i%16))
@@ -2800,15 +2782,11 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
// * UR8_MERGE_END CQ11057 *
--- a/tn7sar.c
+++ b/tn7sar.c
-@@ -1401,44 +1401,70 @@ int tn7sar_oam_generation(void *privCont
+@@ -1395,44 +1395,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;
@@ -2883,7 +2861,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
struct atm_dev *dev;
Tn7AtmPrivate *priv;
int i, j, k;
-@@ -1447,21 +1473,19 @@ int tn7sar_proc_sar_stat(char* buf, char
+@@ -1441,21 +1463,19 @@ int tn7sar_proc_sar_stat(char* buf, char
unsigned int *pStateBase, *pSarStat;
HAL_FUNCTIONS *pHalFunc;
HAL_DEVICE *pHalDev;
@@ -2908,7 +2886,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
k=0;
for(j=0;j<4;j++)
{
-@@ -1474,26 +1498,16 @@ int tn7sar_proc_sar_stat(char* buf, char
+@@ -1468,26 +1488,16 @@ int tn7sar_proc_sar_stat(char* buf, char
{
if((char *)*pSarStat == NULL)
break;
@@ -2939,7 +2917,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
}
}
-@@ -1502,9 +1516,22 @@ int tn7sar_proc_sar_stat(char* buf, char
+@@ -1496,9 +1506,22 @@ int tn7sar_proc_sar_stat(char* buf, char
}
}