Commit Graph

156 Commits

Author SHA1 Message Date
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
Adrian Schmutzler
4202459541 ltq-vdsl-fw: replace backticks by $(...)
This replaces deprecated backticks by more versatile $(...) syntax.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-13 19:01:23 +02:00
Adrian Schmutzler
d8b3f53f5e ltq-adsl(-fw): Makefile clean-up and fixes
This fixes a few minor issues (partially cosmetic) in ltq-adsl and
ltq-adsl-fw Makefiles:
- fix PKG_SOURCE_URL and switch to https
- remove non-existant FW_NAME variable
- fix package name for config inclusion
- fix config symbol for debugging

Fixes: 1d0a9d0c04 ("move ltq-adsl")

Cc: John Crispin <john@phrozen.org>

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-24 17:59:22 +02:00
Martin Blumenstingl
0dbe8b9029 lantiq: ltq-tapi: fix compilation with newer Linux kernels
Compiling the ltq-tapi driver against Linux 5.4 results in a compile
error complaining that the size of struct sched_param is not known.
Switch the existing "sched/types.h" include to reference
include/uapi/linux/sched/types.h to fix compilation against Linux 5.4.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2020-03-16 22:28:16 +01:00
Martin Blumenstingl
588d574eb9 lantiq: ltq-deu: fix compatibility with Linux 5.3+
Upstream commit 84ede58dfcd1d ("crypto: hash - remove
CRYPTO_ALG_TYPE_DIGEST") drops the CRYPTO_ALG_TYPE_DIGEST define because
it has the same value as CRYPTO_ALG_TYPE_HASH. This was the case for
earlier kernels as well. Switch to CRYPTO_ALG_TYPE_HASH to fix building
against Linux 5.4.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2020-03-16 22:28:16 +01:00
Martin Blumenstingl
3fa5f058f6 lantiq: ltq-vdsl: fix compilation with Linux 5.0+
Upstream commit e4b92b108c6cd6 ("timekeeping: remove obsolete time
accessors") removed do_gettimeofday(). In Linux 4.19 this was only a
wrapper around ktime_get_real_ts64(). Use ktime_get_real_ts64() now that
the wrapper is gone to fix compilation against Linux 5.4.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2020-03-16 22:28:16 +01:00
Mathias Kresin
a6698551e5 ltq-adsl: fix compilation with Linux 5.0+
Upstream commit e4b92b108c6cd6 ("timekeeping: remove obsolete time
accessors") removed do_gettimeofday(). In Linux 4.19 this was only a
wrapper around ktime_get_real_ts64(). Use ktime_get_real_ts64() now that
the wrapper is gone to fix compilation against Linux 5.4.

Move the ifxmips_mei_interface header to the include directory, it can't
be found otherwise during compilation. The reason for the changed
behaviour is not yet clear, however having header files in an include
directory is more straight forward.

To use the of_device_id struct, the mod_devicetable header need to be
included. Instead of including this header, include the of_platform
header, which includes the mod_devicetable on its own.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2020-03-16 22:28:16 +01:00
Mathias Kresin
a3539c82cb ltq-atm: add Linux 5.0+ compatibility
Upstream commit 96d4f267e40f95 ("Remove 'type' argument from access_ok()
function") removes the first argument to access_ok.
Adjust the code so it builds with Linux 5.4.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
2020-03-16 22:28:16 +01:00
Sungbo Eo
e6c55d70f4 ltq-vdsl-mei: avoid underscore in package name
As 07e1d88d7b ("kernel: avoid underscore in *6lowpan package names") shows,
underscores might cause build failures. Replace underscore with dash.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2020-02-23 13:20:50 +01: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
Hauke Mehrtens
ddab758997 lantiq: Allow PKG_ASLR_PIE for DSL and voice drivers
When ASLR_PIE was activated globally these drivers failed to build
because the user space LDFLAGS leaked into the kernel build process.
This was fixed in upstream Linux kernel commit ce99d0bf312d ("kbuild:
clear LDFLAGS in the top Makefile") which went into Linux 4.17. The
lantiq target is now on Linux 4.19 only and these exceptions are not
needed any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-11-01 21:19:40 +01:00
Christian Franke
d544bc84a0 lantiq: Fix fw_cutter LzmaWrapper
The destination buffer size `d_len` is passed to `lzma_inflate` as a
pointer. Therefore, it needs to be dereferenced to compare its content.

Signed-off-by: Christian Franke <nobody@nowhere.ws>
2019-10-18 13:39:34 +02:00
Daniel Golle
4fc0a61ed3 ltq-vdsl-fw: update firmware filename and download URL
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2019-09-21 15:12:45 +02:00
Yousong Zhou
f0f5cb26cb ltq-ifxos: refer to https://bugs.openwrt.org
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-08-18 15:23:49 +00:00
Jeffery To
e545fac8d9 build: include BUILD_VARIANT in PKG_BUILD_DIR
This changes the default PKG_BUILD_DIR to take BUILD_VARIANT into
account (if set), so that packages do not need to manually override
PKG_BUILD_DIR just to handle variants.

This also updates most base packages with variants to use the updated
default PKG_BUILD_DIR.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2019-08-05 23:22:26 +02:00
Martin Blumenstingl
bf21b6e44d lantiq: ltq-tapi: fix compatibility with Linux 4.15+
Linux 4.15 removes the init_timer() API. It's replaced by two functions:
- timer_setup() is used instead of init_timer() and also replaces the
  timer "function" (callback) setup.
- from_timer() has to be used to obtain the use-case specific data from
  a struct timer_list, which is now passed to the timer callback.

Update the timer API to be compatible with Linux 4.15+ so it compiles
with the upcoming Linux 4.19 kernel update.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2019-07-04 08:29:13 +02: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
Daniel Golle
bc97257ffe ltq-vdsl-fw: update download URL
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2019-03-02 19:24:52 +01:00
Daniel Golle
a704a2c06f ltq-vdsl-fw: fix ltq-vdsl-vr9-vectoring-fw-installer package install
The package is not being generated otherwise, which is fatal because
it is part of the subtargets default package set...

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2018-06-21 12:00:12 +02:00
Daniel Golle
3d20bee2cd ltq-vdsl-fw: add meaningful version information
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2018-06-20 14:39:22 +02:00
Daniel Golle
512c57e7f3 ltq-vdsl-fw: add nonshared flag
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2018-06-19 17:57:06 +02:00
Kevin Darbyshire-Bryant
83f31b7947 ltq_atm: burn ifx_atm_alloc_tx with fire
Drop code that was never used.

Tested on: BT HomeHub 5a

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2018-06-18 21:47:05 +02:00
Daniel Golle
70f4845777 ltq-vdsl-fw: strip legacy dsl_fw logic
We unfortunately dropped support for persistent in-flash DSL firmware.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2018-06-15 13:30:47 +02:00
Daniel Golle
0653e31270 lantiq-vdsl-fw: update to provide recent vectoring firmware
Recent Speedport firmware downloads only work over HTTPS, so the user
either needs to provide the already downloaded file or install
ustream-ssl-* as well as ca-certificates or ca-bundle.

So to get VDSL2 with vectoring on xRX200, simply run
vdsl_fw_install.sh
on the target and either provide the downloaded file as instructed or
make sure the device is connected to the Internet and can download that
HTTPS url itself.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2018-06-15 12:45:37 +02:00
Daniel Golle
8e2f8b0c83 Revert "lantiq: get rid of ltq-vdsl-fw"
This reverts commit 0938233fcd.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2018-06-15 12:45:37 +02:00
Martin Schiller
eee8ab59dc ltq-vdsl-mei: reset g_tx_link_rate on showtime exit
Without this change, ifx_mei_atm_showtime_check() will always return
"showtime" after one call of MEI_InternalXtmSwhowtimeEntrySignal()
was done, even if MEI_InternalXtmSwhowtimeExitSignal() was called
in the meantime.

The ifx_mei_atm_showtime_check() function is used by the ltq-atm and
ltq-ptm driver.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2018-06-09 16:32:39 +02:00
Hauke Mehrtens
d11aa1d4af ltq-vdsl-mei: Fix section mismatch
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-03-18 14:06:00 +01:00
Hauke Mehrtens
5587b8f451 ltq-deu: Fix section mismatches
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-03-18 14:06:00 +01:00
Mathias Kresin
cde4f9008a lantiq: ltq-adsl: deactivate ASLR support
The package still leaks some user space linker options into the kernel
space. This breaks the build when ASLR is activated, deactivate it for
now.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-03-06 19:49:06 +01:00
Hauke Mehrtens
45ae5c2de3 lantiq: Deactivate ASLR support for some applications
The lantiq components still leak some user space linker options into the
kernel space. This breaks with build when ASLR is activated, deactivate
it for now on these packages.

Fixes: FS#1391
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-03-03 12:58:55 +01:00
Hauke Mehrtens
d67b3d0df8 lantiq: ltq-vmmc: Do not leak user space CFLAGS into kernel space
Do not leak the user space CFLAGS into the kernel space any more, this
allows us to activate the MIPS16 build.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-03-03 12:58:55 +01:00
Hauke Mehrtens
58ad312755 lantiq: ltq-tapi: Do not leak user space CFLAGS into kernel space
Do not leak the user space CFLAGS into the kernel space any more, this
allows us to activate the MIPS16 build.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-03-03 12:58:55 +01:00
Hauke Mehrtens
4d90887496 lantiq: ltq-adsl: Do not leak user space CFLAGS into kernel space
Do not leak the user space CFLAGS into the kernel space any more, this
allows us to activate the MIPS16 build.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-03-03 12:58:55 +01:00
Hauke Mehrtens
b5c5f7d203 lantiq: ltq-vdsl: Do not leak user space CFLAGS into kernel space
Do not leak the user space CFLAGS into the kernel space any more, this
allows us to activate the MIPS16 build.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-03-03 12:58:55 +01:00
Hauke Mehrtens
13639e76dd lantiq: ltq-vdsl-mei: Do not leak user space CFLAGS into kernel space
Do not leak the user space CFLAGS into the kernel space any more, this
allows us to activate the MIPS16 build.

This decreases the size of the ipk file from 87589 bytes to 81267 bytes.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-03-03 00:53:35 +01:00
Hauke Mehrtens
c8abbf1e22 lantiq: ltq-ifxos: Do not force O3 build any more
Do not force to build with O3 optimization any more, but take what was
selected by the OpenWrt build system.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-03-03 00:53:35 +01:00
Hauke Mehrtens
c6162fdc50 lantiq: ltq-ifxos: activate build with mips16
The build process does not leak the user space cflags into the kernel
build process any more, this allows to activate MIPS16 builds.
This was fixed with some update of ifxos.

This decreases size of the  libifxos.a and the ltq-vdsl-app
old:
78320 libifxos.a
44383 ltq-vdsl-app_4.17.18.6-2_mips_24kc.ipk

new:
66852 libifxos.a
43506 ltq-vdsl-app_4.17.18.6-2_mips_24kc.ipk

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-03-03 00:35:26 +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
Martin Schiller
a8b023272d
ltq-atm: cleanup unused variables and functions
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2018-02-05 17:45:54 +01:00
Alexander Couzens
17eb826a70 ltq-atm: rewrite tx path to use IRQs
The ATM subsystem is different from the generic ethernet NICs. The ATM
subsystem requires a callback when a packet has been sent. It means a
tx skb_buff need to be used after it has sent. While the generic NIC
can fill up the TX ring and free skb_buffs if it encounter a ring buffer slot
with an already sent skbuff.
The ATM drivers need call the pop() function after it has send a
single ATM package. The ATM subsystem controls via this ways the queuing.

The ppe engine use DMA channels for read and write. Every atm_vcc has it's
own TX DMA channel and each TX DMA channel has it's own ring buffer.

The old driver had multiple issues:
- Call the subsystem callback at the beginning of tx function (ppe_send).
  Didn't allowed the ATM subsystem to control the enqueued package
  amount.
- Filled up the TX ring until full and fail futher
- copy or decouple the skb from all other subsystem before giving it
  over to TX ring

The new tx path uses interupts.
- call the subsystem callback _after_ it was sent by hardware
- no need to copy our decouple the skb any more
- gives back control to the atm subsystem over the enqueued packages
- use an interupt for every sent atm package

Using interupts shouldn't be a problem because of the slow uplink bandwidth of
ADSL.
The speed _through_ the DSL router was always as high as it should
be, only traffic generated on the router itself were affected.

After changing to new tx path, the speed of iperf's run on the
router itself reached the same speed. The master/trunk wasn't as much
affected because of TCP optimisations (reboot-5022-gb2ea46fe236a).
The following results are taken on the remote server, which receives
the stream over the internet and the DSL line.

The sync moves between every sync a litte bit, but is so far stable
Latency / Interleave Delay:               Down: Fast (0.25 ms) / Up: Fast (0.50 ms)
Data Rate:                                Down: 13.287 Mb/s / Up: 1.151 Mb/s

reboot-5521-g9f8d28285d without patch
[ ID] Interval           Transfer     Bandwidth       Retr
[  5]   0.00-10.04  sec   947 KBytes   773 Kbits/sec    0             sender
[  5]   0.00-10.04  sec   928 KBytes   757 Kbits/sec                  receiver

reboot-5521-g9f8d28285d with patch
[  5]   0.00-10.06  sec  1.16 MBytes   970 Kbits/sec    0             sender
[  5]   0.00-10.06  sec  1.15 MBytes   959 Kbits/sec                  receiver

v17.01.4-239-g55c23e44f4 without patch
[ ID] Interval           Transfer     Bandwidth       Retr
[  5]   0.00-10.04  sec  87.4 KBytes  71.3 Kbits/sec    0             sender
[  5]   0.00-10.04  sec  59.6 KBytes  48.7 Kbits/sec                  receiver

v17.01.4-239-g55c23e44f4 with patch
[ ID] Interval           Transfer     Bandwidth       Retr
[  5]   0.00-10.05  sec  1.18 MBytes   983 Kbits/sec    1             sender
[  5]   0.00-10.05  sec  1.15 MBytes   959 Kbits/sec                  receiver

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2018-02-05 16:36:26 +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
Yousong Zhou
b59b799cb1 ltq-ifxos: fix compilation against glibc
Fixes FS#1196

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-11-30 14:53:16 +08:00
Jonas Gorski
dea3bad84e ltq-ptm: add missing depency to ltq-?dsl-*-mei
Add the required dependency to the mei driver as cought by the depenceny
checker.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2017-11-07 22:58:58 +01:00
Jonas Gorski
e76340198f ltq-atm: fix dependency for xrx200
Ad the missing dependency for the xrx200 variant, which depends on the
vdsl mei driver.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2017-11-07 22:58:58 +01:00
Jonas Gorski
a9a78a70cc ltq-adsl-mei: use the same file name for all variant
Due to limitations in the symvers treatment and the mei drivers
exporting the same funtions, modpost might use the wrong mei driver
to link against.

Work around this by renaming them all to the same name, making it
always the "right" module name even if the wrong file was used.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2017-11-07 22:58:58 +01:00
Mathias Kresin
56189f1e32 ltq-atm: add missing dependency to kmod-ltq-adsl-*-mei
Commit 2e496876c6 fixed the generation of the depends line for external
kernel modules which makes it possible for the build system to
automatically detect this missing dependency.

This fixes the packaging of kmod-ltq-atm for the ar9, xway and
xway-legacy subtarget.

Fixes: FS#1124

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-11-03 20:04:40 +01:00
Hauke Mehrtens
1e5e005841 ltq-atm: Add missing dependency to kmod-ltq-adsl-ase-mei
Commit 2e496876c6 fixed the generation of the depends line for external
kernel modules which makes it possible for the build system to
automatically detect this missing dependency. This fixes the build bot
build of the lantiq/aes target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-10-29 17:01:26 +01:00
Mathias Kresin
63c436ea4b ltq-atm: remove xrx200 special handling
The lantiq ATM driver is load for all subtargets on demand now. There
is not need to handle the xrx200 ATM driver in a special way any
longer.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-10-25 08:45:05 +02:00
Mathias Kresin
1470c79ceb ltq-adsl-app: use notification based ATM/PTM driver load
This patch removes the fixed atm/ptm driver loading and
switches to notification based driver loading.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-10-25 08:45:05 +02:00
Mathias Kresin
d07f924978 ltq-vmmc: disable for falcon
The module fails to compile with falcon. Remove the falcon depends from
the module to not (try to) compile it for falcon any longer.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-10-04 20:08:15 +02:00