[openwrt/openwrt] ltq-vdsl: move to the default device name /dev/dsl_cpe_api/0

LEDE Commits lede-commits at lists.infradead.org
Fri Jan 7 16:28:46 PST 2022


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/5ee1e045174bad1b7f2754bb022346acc60220f5

commit 5ee1e045174bad1b7f2754bb022346acc60220f5
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Thu Dec 16 12:50:59 2021 +0100

    ltq-vdsl: move to the default device name /dev/dsl_cpe_api/0
    
    This makes patching it for ltq-vdsl-app unnecessary and paves the way
    for VRX518 support.
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch      |  4 ++--
 package/network/config/ltq-vdsl-app/patches/100-compat.patch | 11 -----------
 package/network/config/ltq-vdsl-app/src/src/dsl_cpe_ubus.c   |  2 +-
 3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch b/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch
index edacd5f6b8..7670fe6a00 100644
--- a/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch
+++ b/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch
@@ -82,9 +82,9 @@
  
     DSL_DRV_DevNodeInit();
  
-+   dsl_class = class_create(THIS_MODULE, "dsl_cpe_api0");
++   dsl_class = class_create(THIS_MODULE, DRV_DSL_CPE_API_DEV_NAME);
 +   dsl_devt = MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0);
-+   device_create(dsl_class, NULL, dsl_devt, NULL, "dsl_cpe_api0");
++   device_create(dsl_class, NULL, dsl_devt, NULL, "dsl_cpe_api/0");
 +
     return 0;
  }
diff --git a/package/network/config/ltq-vdsl-app/patches/100-compat.patch b/package/network/config/ltq-vdsl-app/patches/100-compat.patch
index 6b738cfe66..6bc359c3cc 100644
--- a/package/network/config/ltq-vdsl-app/patches/100-compat.patch
+++ b/package/network/config/ltq-vdsl-app/patches/100-compat.patch
@@ -9,14 +9,3 @@
     DSL_CPE_SIC_SET(DSL_TC_ATM, DSL_EMF_TC_CLEANED, DSL_EMF_TC_CLEANED, DSL_SYSTEMIF_MII, \
                     DSL_TC_EFM, DSL_EMF_TC_CLEANED, DSL_EMF_TC_CLEANED, DSL_SYSTEMIF_MII),
     DSL_CPE_MAC_CFG_SET(DSL_EFM_SPEED_100, DSL_EFM_DUPLEX_FULL, DSL_EFM_FLOWCTRL_ON, DSL_EFM_AUTONEG_OFF, \
---- a/src/dsl_cpe_control.c
-+++ b/src/dsl_cpe_control.c
-@@ -6761,7 +6761,7 @@ DSL_int_t dsl_cpe_daemon (
-    for (nDevice = 0; nDevice < DSL_CPE_MAX_DSL_ENTITIES; nDevice++)
-    {
- #if defined(INCLUDE_DSL_CPE_API_VRX)
--      sprintf (device, "%s/%d", DSL_CPE_DEVICE_NAME, nDevice);
-+      sprintf (device, "%s%d", DSL_CPE_DEVICE_NAME, nDevice);
- #else
-       sprintf (device, "%s", DSL_CPE_DEVICE_NAME);
- #endif /* defined(INCLUDE_DSL_CPE_API_VRX)*/
diff --git a/package/network/config/ltq-vdsl-app/src/src/dsl_cpe_ubus.c b/package/network/config/ltq-vdsl-app/src/src/dsl_cpe_ubus.c
index 707acdc606..93eecaf71d 100644
--- a/package/network/config/ltq-vdsl-app/src/src/dsl_cpe_ubus.c
+++ b/package/network/config/ltq-vdsl-app/src/src/dsl_cpe_ubus.c
@@ -735,7 +735,7 @@ static int metrics(struct ubus_context *ctx, struct ubus_object *obj,
 	vector_t vector = VECTOR_UNKNOWN;
 
 #ifndef INCLUDE_DSL_CPE_API_DANUBE
-	fd = open(DSL_CPE_DEVICE_NAME "0", O_RDWR, 0644);
+	fd = open(DSL_CPE_DEVICE_NAME "/0", O_RDWR, 0644);
 #else
 	fd = open(DSL_CPE_DEVICE_NAME, O_RDWR, 0644);
 #endif



More information about the lede-commits mailing list