diff options
author | Antti Seppälä <a.seppala@gmail.com> | 2021-01-03 17:09:39 +0200 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2021-02-12 05:07:04 +0000 |
commit | 38646938a458d0d9eda7ea3d14e182892470efe8 (patch) | |
tree | 01dc9740e7fb62834f046772872be7dffd662f79 /package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c | |
parent | 6934d30cf8d95bc8652b4dcd8180d14e5e8e2417 (diff) | |
download | upstream-38646938a458d0d9eda7ea3d14e182892470efe8.tar.gz upstream-38646938a458d0d9eda7ea3d14e182892470efe8.tar.bz2 upstream-38646938a458d0d9eda7ea3d14e182892470efe8.zip |
ltq-ptm: Update VR9 PTM firmware
After looking at various vendor GPL source code dumps I discovered that some
of them contain updated versions of ltq-ptm driver when compared to what
openwrt has.
The driver update is mostly cursory (simple changes to comments, whitespace,
formatting etc.) or adds debug features not used by openwrt.
However the updated driver also contains a later version of PTM firmware which
is extracted and included in this commit along with bits to correctly identify
its version when driver loads.
Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Diffstat (limited to 'package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c')
-rw-r--r-- | package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c index f77f475656..44d805049b 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c @@ -621,12 +621,15 @@ static void do_swap_desc_tasklet(unsigned long arg) static inline int ifx_ptm_version(char *buf) { int len = 0; - unsigned int major, minor; + unsigned int major, mid, minor; - ifx_ptm_get_fw_ver(&major, &minor); + ifx_ptm_get_fw_ver(&major, &mid, &minor); - len += sprintf(buf + len, "PTM %d.%d.%d", IFX_PTM_VER_MAJOR, IFX_PTM_VER_MID, IFX_PTM_VER_MINOR); - len += sprintf(buf + len, " PTM (E1) firmware version %d.%d\n", major, minor); + len += ifx_drv_ver(buf + len, "PTM", IFX_PTM_VER_MAJOR, IFX_PTM_VER_MID, IFX_PTM_VER_MINOR); + if ( mid == ~0 ) + len += sprintf(buf + len, " PTM (E1) firmware version %u.%u\n", major, minor); + else + len += sprintf(buf + len, " PTM (E1) firmware version %u.%u.%u\n", major, mid, minor); return len; } @@ -963,7 +966,7 @@ static int ltq_ptm_probe(struct platform_device *pdev) { int ret; int i; - char ver_str[128]; + char ver_str[256]; struct port_cell_info port_cell = {0}; ret = init_priv_data(); |