mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 17:01:14 +00:00
f872b96609
In order to calculate the required pre-distortion for downstream vectoring, the vectoring control entity (VCE) at the carrier office needs error samples from the modem. On Lantiq VR9 modems, error reports are generated by the firmware, but need to be multiplexed into the data stream by the driver on the main processor when L2 encapsulation is selected by the VCE. This driver provides the necessary callback function, which is called by the MEI driver after receiving an error report from the firmware. Originally, it is part of the Lantiq PPA driver, but after a few changes it also works with the PTM driver used in OpenWrt. The direct call to ndo_start_xmit needs to be replaced, as the PTM driver relies on locks from the kernel. Instead dev_queue_xmit is used, which is called from a work queue, as it is not safe to call from an interrupt handler. Additional changes include fixes to support recent kernel versions and a change of the used interface from ptm0 to dsl0. Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Jan Hoffmann <jan@3e8.eu>
74 lines
2.0 KiB
Diff
74 lines
2.0 KiB
Diff
--- a/src/vectoring/ifxmips_vectoring.c
|
|
+++ b/src/vectoring/ifxmips_vectoring.c
|
|
@@ -325,7 +325,7 @@ static int proc_write_dbg(struct file *f
|
|
else
|
|
printk(dbg_enable_mask_str[i] + 1);
|
|
}
|
|
- printk("] > /proc/vectoring\n");
|
|
+ printk("] > /proc/driver/vectoring\n");
|
|
}
|
|
|
|
if ( f_enable )
|
|
@@ -433,11 +433,10 @@ static int __init vectoring_init(void)
|
|
{
|
|
struct proc_dir_entry *res;
|
|
|
|
- res = proc_create("vectoring",
|
|
+ res = proc_create("driver/vectoring",
|
|
S_IRUGO|S_IWUSR,
|
|
0,
|
|
&g_proc_file_vectoring_dbg_seq_fops);
|
|
- printk("res = %p\n", res);
|
|
|
|
register_netdev_event_handler();
|
|
g_ptm_net_dev = dev_get_by_name(&init_net, "ptm0");
|
|
@@ -460,7 +459,7 @@ static void __exit vectoring_exit(void)
|
|
|
|
unregister_netdev_event_handler();
|
|
|
|
- remove_proc_entry("vectoring", NULL);
|
|
+ remove_proc_entry("driver/vectoring", NULL);
|
|
}
|
|
|
|
module_init(vectoring_init);
|
|
--- a/src/vectoring/ifxmips_vectoring_test.c
|
|
+++ b/src/vectoring/ifxmips_vectoring_test.c
|
|
@@ -79,7 +79,7 @@ static int proc_write_vectoring(struct f
|
|
}
|
|
}
|
|
else
|
|
- printk("echo send <size> > /proc/eth/vectoring\n");
|
|
+ printk("echo send <size> > /proc/driver/vectoring_test\n");
|
|
|
|
return count;
|
|
}
|
|
@@ -112,9 +112,7 @@ static __init void proc_file_create(void
|
|
{
|
|
struct proc_dir_entry *res;
|
|
|
|
-// g_proc_dir = proc_mkdir("eth", NULL);
|
|
-
|
|
- res = proc_create("eth/vectoring",
|
|
+ res = proc_create("driver/vectoring_test",
|
|
S_IRUGO|S_IWUSR,
|
|
g_proc_dir,
|
|
&g_proc_file_vectoring_seq_fops);
|
|
@@ -122,10 +120,7 @@ static __init void proc_file_create(void
|
|
|
|
static __exit void proc_file_delete(void)
|
|
{
|
|
- remove_proc_entry("vectoring",
|
|
- g_proc_dir);
|
|
-
|
|
- remove_proc_entry("eth", NULL);
|
|
+ remove_proc_entry("driver/vectoring_test", NULL);
|
|
}
|
|
|
|
|
|
@@ -151,3 +146,5 @@ static void __exit vectoring_test_exit(v
|
|
|
|
module_init(vectoring_test_init);
|
|
module_exit(vectoring_test_exit);
|
|
+
|
|
+MODULE_LICENSE("GPL");
|