aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/hack-5.10
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2023-03-20 18:51:06 +0100
committerFelix Fietkau <nbd@nbd.name>2023-03-23 17:54:18 +0100
commitd0a06965e8ab0a92a4813fddbb8e045407897310 (patch)
treeab28e516d0727210ac0a43128d532438de7bb393 /target/linux/generic/hack-5.10
parentfbcfb7f7afe8dd73ee40e8210f2727d7b6f7940e (diff)
downloadupstream-d0a06965e8ab0a92a4813fddbb8e045407897310.tar.gz
upstream-d0a06965e8ab0a92a4813fddbb8e045407897310.tar.bz2
upstream-d0a06965e8ab0a92a4813fddbb8e045407897310.zip
mediatek: add kernel code for supporting offloading wlan->eth and wlan->wlan flows
Will be enabled by an upcoming mt76 update Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/generic/hack-5.10')
-rw-r--r--target/linux/generic/hack-5.10/100-update-mtk_wed_h.patch25
1 files changed, 19 insertions, 6 deletions
diff --git a/target/linux/generic/hack-5.10/100-update-mtk_wed_h.patch b/target/linux/generic/hack-5.10/100-update-mtk_wed_h.patch
index 151f2e8054..5f05179a36 100644
--- a/target/linux/generic/hack-5.10/100-update-mtk_wed_h.patch
+++ b/target/linux/generic/hack-5.10/100-update-mtk_wed_h.patch
@@ -1,10 +1,11 @@
--- a/include/linux/soc/mediatek/mtk_wed.h
+++ b/include/linux/soc/mediatek/mtk_wed.h
-@@ -5,21 +5,76 @@
+@@ -5,21 +5,77 @@
#include <linux/rcupdate.h>
#include <linux/regmap.h>
#include <linux/pci.h>
+#include <linux/skbuff.h>
++#include <linux/netdevice.h>
#define MTK_WED_TX_QUEUES 2
+#define MTK_WED_RX_QUEUES 2
@@ -77,7 +78,7 @@
struct mtk_wed_device {
#ifdef CONFIG_NET_MEDIATEK_SOC_WED
const struct mtk_wed_ops *ops;
-@@ -28,30 +83,76 @@ struct mtk_wed_device {
+@@ -28,30 +84,76 @@ struct mtk_wed_device {
bool init_done, running;
int wdma_idx;
int irq;
@@ -156,7 +157,7 @@
} wlan;
#endif
};
-@@ -59,10 +160,16 @@ struct mtk_wed_device {
+@@ -59,10 +161,16 @@ struct mtk_wed_device {
struct mtk_wed_ops {
int (*attach)(struct mtk_wed_device *dev);
int (*tx_ring_setup)(struct mtk_wed_device *dev, int ring,
@@ -174,7 +175,16 @@
void (*stop)(struct mtk_wed_device *dev);
void (*start)(struct mtk_wed_device *dev, u32 irq_mask);
-@@ -97,12 +204,22 @@ mtk_wed_device_attach(struct mtk_wed_dev
+@@ -73,6 +181,8 @@ struct mtk_wed_ops {
+
+ u32 (*irq_get)(struct mtk_wed_device *dev, u32 mask);
+ void (*irq_set_mask)(struct mtk_wed_device *dev, u32 mask);
++ int (*setup_tc)(struct mtk_wed_device *wed, struct net_device *dev,
++ enum tc_setup_type type, void *type_data);
+ };
+
+ extern const struct mtk_wed_ops __rcu *mtk_soc_wed_ops;
+@@ -97,12 +207,22 @@ mtk_wed_device_attach(struct mtk_wed_dev
return ret;
}
@@ -199,7 +209,7 @@
#define mtk_wed_device_txfree_ring_setup(_dev, _regs) \
(_dev)->ops->txfree_ring_setup(_dev, _regs)
#define mtk_wed_device_reg_read(_dev, _reg) \
-@@ -113,6 +230,14 @@ mtk_wed_device_attach(struct mtk_wed_dev
+@@ -113,6 +233,16 @@ mtk_wed_device_attach(struct mtk_wed_dev
(_dev)->ops->irq_get(_dev, _mask)
#define mtk_wed_device_irq_set_mask(_dev, _mask) \
(_dev)->ops->irq_set_mask(_dev, _mask)
@@ -211,10 +221,12 @@
+ (_dev)->ops->msg_update(_dev, _id, _msg, _len)
+#define mtk_wed_device_stop(_dev) (_dev)->ops->stop(_dev)
+#define mtk_wed_device_dma_reset(_dev) (_dev)->ops->reset_dma(_dev)
++#define mtk_wed_device_setup_tc(_dev, _netdev, _type, _type_data) \
++ (_dev)->ops->setup_tc(_dev, _netdev, _type, _type_data)
#else
static inline bool mtk_wed_device_active(struct mtk_wed_device *dev)
{
-@@ -120,12 +245,17 @@ static inline bool mtk_wed_device_active
+@@ -120,12 +250,18 @@ static inline bool mtk_wed_device_active
}
#define mtk_wed_device_detach(_dev) do {} while (0)
#define mtk_wed_device_start(_dev, _mask) do {} while (0)
@@ -230,6 +242,7 @@
+#define mtk_wed_device_update_msg(_dev, _id, _msg, _len) -ENODEV
+#define mtk_wed_device_stop(_dev) do {} while (0)
+#define mtk_wed_device_dma_reset(_dev) do {} while (0)
++#define mtk_wed_device_setup_tc(_dev, _netdev, _type, _type_data) -EOPNOTSUPP
#endif
#endif