aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/lantiq/ltq-vectoring/Makefile
diff options
context:
space:
mode:
authorJan Hoffmann <jan@3e8.eu>2022-03-13 22:14:35 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2022-06-07 21:36:58 +0200
commite56836dfc1353c49d43323b75d68ebc3456c6cff (patch)
treef7f62b4802cc5e9c0181b59357fedb8cf95cb09d /package/kernel/lantiq/ltq-vectoring/Makefile
parentde0a9b0eab4ad50ec0b359af5bf41a8ea852e423 (diff)
downloadupstream-e56836dfc1353c49d43323b75d68ebc3456c6cff.tar.gz
upstream-e56836dfc1353c49d43323b75d68ebc3456c6cff.tar.bz2
upstream-e56836dfc1353c49d43323b75d68ebc3456c6cff.zip
ltq-vectoring: add driver
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> (cherry picked from commit f872b966092ece5c0e2192e0d979a9eb69283f17)
Diffstat (limited to 'package/kernel/lantiq/ltq-vectoring/Makefile')
-rw-r--r--package/kernel/lantiq/ltq-vectoring/Makefile61
1 files changed, 61 insertions, 0 deletions
diff --git a/package/kernel/lantiq/ltq-vectoring/Makefile b/package/kernel/lantiq/ltq-vectoring/Makefile
new file mode 100644
index 0000000000..b7b1b83a07
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vectoring/Makefile
@@ -0,0 +1,61 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ltq-vectoring
+PKG_RELEASE:=$(AUTORELEASE)
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://gitlab.com/prpl-foundation/intel/ppa_drv.git
+PKG_SOURCE_DATE:=2019-05-20
+PKG_SOURCE_VERSION:=4fa7ac30fcc8ec4eddae9debba5f4230981f469f
+PKG_MIRROR_HASH:=444eb823dd9ddd25453976bf7a3230955e4148b8bf92f35f165ecffee32c4555
+PKG_LICENSE:=GPL-2.0 BSD-2-Clause
+
+MAKE_PATH:=src/vectoring
+PKG_EXTMOD_SUBDIRS:=$(MAKE_PATH)
+
+include $(INCLUDE_DIR)/kernel.mk
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/ltq-vectoring
+ SECTION:=sys
+ CATEGORY:=Kernel modules
+ SUBMENU:=Network Devices
+ TITLE:=driver for sending vectoring error samples
+ DEPENDS:=@TARGET_lantiq_xrx200
+ FILES:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/ltq_vectoring.ko
+ AUTOLOAD:=$(call AutoLoad,49,ltq_vectoring)
+endef
+
+define Package/ltq-vectoring/description
+ This driver is responsible for sending error reports to the vectoring
+ control entity, which is required for downstream vectoring to work.
+
+ The error reports are generated by the DSL firmware, and passed to this
+ driver by the MEI driver.
+endef
+
+define KernelPackage/ltq-vectoring-test
+ SECTION:=sys
+ CATEGORY:=Kernel modules
+ SUBMENU:=Network Devices
+ TITLE:=driver for testing the vectoring driver
+ DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-vectoring
+ FILES:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/ltq_vectoring_test.ko
+endef
+
+define Package/ltq-vectoring-test/description
+ This allows to send dummy data to the vectoring error block callback.
+ This is only needed for test and development purposes.
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+ +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
+ $(KERNEL_MAKE_FLAGS) \
+ M="$(PKG_BUILD_DIR)/$(MAKE_PATH)" \
+ modules
+endef
+
+$(eval $(call KernelPackage,ltq-vectoring))
+$(eval $(call KernelPackage,ltq-vectoring-test))