Commit Graph

19 Commits

Author SHA1 Message Date
Aleksander Jan Bajkowski 598e058080
kernel: ltq-ptm: do not write directly to dev->addr
One is never to write to dev->addr directly. In 6.1 it will be a const and
with the newly enabled WERROR, we get a failing grade.

Lets fix this ahead of time.

Ref: adeef3e321
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2023-06-06 20:10:34 +02:00
Christian Marangi 7ad1fa12ef
kernel: ltq-ptm: fix compilation warning for vr9
Fix compilation warning for unused variable for vr9.
Fix compilation warning:
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xrx200/ltq-ptm-vr9/ltq-ptm/ifxmips_ptm_vdsl.c: In function 'mailbox_irq_handler':
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xrx200/ltq-ptm-vr9/ltq-ptm/ifxmips_ptm_vdsl.c:560:9: error: unused variable 'i' [-Werror=unused-variable]
  560 |     int i;
      |         ^
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-14 18:04:33 +02:00
Mathias Kresin 804c541446 ltq-atm/ltq-ptm: add kernel 5.10 compatiblity
The callback handling of the tasklet API was redesigned and the macros
using the old syntax renamed to _OLD.

The stuck queue is now passed to ndo_tx_timeout callback but not used so
far.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2021-04-12 23:23:09 +02:00
Antti Seppälä 38646938a4 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>
2021-02-12 05:07:04 +00:00
Adrian Schmutzler b510ab513e kernel: drop outdated kernel version switches for local code
This drops kernel version switches for versions not supported by
OpenWrt master at the moment. This only adjusts local code, but
doesn't touch patches to existing external packages.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-17 18:35:51 +02:00
Martin Schiller 996f02e5ba lantiq: ltq-ptm: vr9: fix skb handling in ptm_hard_start_xmit()
Call skb_orphan(skb) to call the owner's destructor function and make
the skb unowned.

This is necessary to prevent sk_wmem_alloc of a socket from overflowing,
which leads to ENOBUFS errors on application level.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2020-01-26 18:38:17 +01:00
Martin Schiller ff3cfe0848 ltq-atm/ltq-ptm: re-enable/fix reset_ppe() functionality for VR9
This patch re-enables the reset_ppe() functionality for VR9 targets by using
the new lantiq rcu subsystem. The reset sequence in the reset_ppe() function
was taken from the ppa datapath driver of lantiq UGW 7.4.1.

Additionally it adds the required reset definitions to the vr9 dtsi file.

It also prepares the reset_ppe() function calls for the other lantiq targets.

This feature is needed to be able to switch between ltq-atm/ltq-ptm driver
in ATM/PTM Auto-Mode at runtime.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2019-03-10 16:49:31 +01:00
Hauke Mehrtens 73ba5e11f7 lantiq: fix lantiq applications kernel 4.14 compatiblity
This is fixing multiple compile problems with kernel 4.14 and updates the
code to take care of changes introduced between kernel 4.9 and 4.14.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-02-20 19:25:17 +01:00
Mathias Kresin d3fd38637f lantiq: create ATM/PTM interfaces with dsl as netdev name
Renaming an atm etherbride using 'ip link' (via hotplug) is racy since the
original netdev might disappear before br2684ctl has finished appling it's
setting:

 local2.notice br2684ctl[1667]: Interface "nas0" created sucessfully
 local2.notice br2684ctl[1667]: Communicating over ATM 0.8.35, encapsulation: LLC
 kern.info kernel: dsl0: renamed from nas0
 kern.err kernel: br2684:br2684_regvcc: tried to attach to non-existent device
 local2.err br2684ctl[1667]: Could not configure interface:No such device or address

By passing the final used netdev name to br2684ctl_wrap another race
condition workaround will be enabled again.

Change the lantiq ptm driver to create a netdev with the name dsl as well.
Albeit the rename via 'ip link' works fine so far, using a different
approach for ptm then atm could be confusing.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-01-10 08:08:53 +01:00
Martin Schiller 2d6c7c2526 lantiq: ltq-atm/ltq-ptm: fix showtime handling on driver load
This is needed to be able to load the ltq-atm/ltq-ptm driver
from a notify script during synchronization, because the line can
reach showtime state before the driver is fully loaded.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2017-08-06 09:22:03 +02:00
Hauke Mehrtens 2eed1179be ltq-ptm: use netif_trans_update() only for kernel >= 4.7
This fixes a bug introduced in commit c7ce9908bd
"ltq-ptm: fix build with kernel 4.9"

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-02-12 01:26:33 +01:00
Hauke Mehrtens c7ce9908bd ltq-ptm: fix build with kernel 4.9
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-02-11 23:31:47 +01:00
David Woodhouse 8a2a20e71e ltq-ptm: Support 1508-byte MTU for RFC4638
Tested with VDSL on TP-Link WD8970, I see full 1500-byte PPP data
frames, which end up being 1526 byte Ethernet frames (including
Ethernet+VLAN headers) on the wire.

Fixes: FS#210

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2016-10-15 11:36:51 +02:00
John Crispin 45b6eec9fc lantiq: ltq-ptm: set carrier status
Principal purpose is to prevent the error message

  ifxmips_ptm_vdsl.c:281:ptm_hard_start_xmit: not in showtime

which is printed at least once per second to the serial console, if the
ptm interface is not in showtime, but a processes already sends
packages over that interface. This happens for adsl as well as vdsl
over ptm.

It's pppd which sends packages over the ptm device before in showtime.
As far as I can see, pppd is started unconditionally since netif can
not gather the link status of the ptm network interface.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 47917
2015-12-17 09:28:21 +00:00
John Crispin 4c8227539e lantiq: Make ATM and PTM drivers compatible with kernel 4.1
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

SVN-Revision: 46218
2015-07-07 13:44:04 +00:00
John Crispin 0d414e1c78 lantiq: fix netdev setup in ltq-ptm-vdsl
The initial fix for 3.18 in r44346 wrongly treated the newly added
parameter of alloc_netdev to be another function pointer, causing
ether_config to be skipped during ptm netdev init.
Fix this by partially reverting r44346 and properly setting the newly
added macro parameter.
(Tested on VRX200 board)

A similar change might be needed for ltq-ptm-adsl as well.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 44607
2015-03-05 20:25:18 +00:00
John Crispin 64f9626963 lantiq: fix dsl drivers for 3.18
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44346
2015-02-09 12:12:52 +00:00
John Crispin aa1118c79b lantiq: fix ptm crash under load
https://dev.openwrt.org/ticket/14581

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40335
2014-03-30 14:01:21 +00:00
John Crispin 4ebf19b48f packages: clean up the package folder
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37007
2013-06-21 16:54:37 +00:00