ramips: fixes kernel 5.4 mt76 build error

Fixes: #10537
This commit is contained in:
AmadeusGhost 2022-11-27 23:08:21 +08:00
parent 31a2de36ab
commit ae96f27ccb

View File

@ -1565,7 +1565,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+#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 <nbd@nbd.name>
+ 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)