From ae96f27ccba015fef520f70dfd52c93032d1c602 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sun, 27 Nov 2022 23:08:21 +0800 Subject: [PATCH] ramips: fixes kernel 5.4 mt76 build error Fixes: #10537 --- .../999-backport-wireless-ethernet-dispatch.patch | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/target/linux/generic/pending-5.4/999-backport-wireless-ethernet-dispatch.patch b/target/linux/generic/pending-5.4/999-backport-wireless-ethernet-dispatch.patch index 384a69c21..5d7b08609 100644 --- a/target/linux/generic/pending-5.4/999-backport-wireless-ethernet-dispatch.patch +++ b/target/linux/generic/pending-5.4/999-backport-wireless-ethernet-dispatch.patch @@ -1565,7 +1565,7 @@ Signed-off-by: Felix Fietkau +#endif --- /dev/null +++ b/include/linux/soc/mediatek/mtk_wed.h -@@ -0,0 +1,140 @@ +@@ -0,0 +1,150 @@ +#ifndef __MTK_WED_H +#define __MTK_WED_H + @@ -1665,6 +1665,16 @@ Signed-off-by: Felix Fietkau + return ret; +} + ++static inline bool ++mtk_wed_get_rx_capa(struct mtk_wed_device *dev) ++{ ++#ifdef CONFIG_NET_MEDIATEK_SOC_WED ++ return dev->version != 1; ++#else ++ return false; ++#endif ++} ++ +#ifdef CONFIG_NET_MEDIATEK_SOC_WED +#define mtk_wed_device_active(_dev) !!(_dev)->ops +#define mtk_wed_device_detach(_dev) (_dev)->ops->detach(_dev)