[][MAC80211][External release build]
[Description]
Add external release build flow
[Release-log]
N/A
Change-Id: I9e7f99d972dec580eff7b50f18f1a0bc90487e4d
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/5687836
diff --git a/autobuild_mac80211_release/mt7986_mac80211/target/linux/mediatek/patches-5.4/1004-mtketh-add-threaded-napi-support.patch b/autobuild_mac80211_release/mt7986_mac80211/target/linux/mediatek/patches-5.4/1004-mtketh-add-threaded-napi-support.patch
new file mode 100644
index 0000000..a9e3495
--- /dev/null
+++ b/autobuild_mac80211_release/mt7986_mac80211/target/linux/mediatek/patches-5.4/1004-mtketh-add-threaded-napi-support.patch
@@ -0,0 +1,13 @@
+diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+index f3c789e9..58b17b7b 100755
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -3571,6 +3571,8 @@ static int mtk_probe(struct platform_device *pdev)
+ * for NAPI to work
+ */
+ init_dummy_netdev(ð->dummy_dev);
++ eth->dummy_dev.threaded = 1;
++
+ netif_napi_add(ð->dummy_dev, ð->tx_napi, mtk_napi_tx,
+ MTK_NAPI_WEIGHT);
+ netif_napi_add(ð->dummy_dev, ð->rx_napi[0].napi, mtk_napi_rx,
diff --git a/autobuild_mac80211_release/mt7986_mac80211/target/linux/mediatek/patches-5.4/1007-mtketh-add-qdma-sw-solution-for-mac80211-sdk.patch b/autobuild_mac80211_release/mt7986_mac80211/target/linux/mediatek/patches-5.4/1007-mtketh-add-qdma-sw-solution-for-mac80211-sdk.patch
new file mode 100644
index 0000000..b3e8644
--- /dev/null
+++ b/autobuild_mac80211_release/mt7986_mac80211/target/linux/mediatek/patches-5.4/1007-mtketh-add-qdma-sw-solution-for-mac80211-sdk.patch
@@ -0,0 +1,25 @@
+diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+index 991558dd..6b1ce272 100755
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -23,6 +23,7 @@
+
+ #include "mtk_eth_soc.h"
+ #include "mtk_eth_dbg.h"
++#include "mtk_hnat/hnat.h"
+
+ #if defined(CONFIG_NET_MEDIATEK_HNAT) || defined(CONFIG_NET_MEDIATEK_HNAT_MODULE)
+ #include "mtk_hnat/nf_hnat_mtk.h"
+@@ -3590,6 +3591,12 @@ static int mtk_probe(struct platform_device *pdev)
+
+ platform_set_drvdata(pdev, eth);
+
++#if defined(CONFIG_MEDIATEK_NETSYS_V2)
++ mtk_w32(eth, 0x00000404, MTK_QTX_CFG(MTK_QDMA_GMAC2_QID));
++ mtk_w32(eth, 0x40000000, MTK_QTX_SCH(MTK_QDMA_GMAC2_QID));
++ mtk_w32(eth, 0x80008000, QDMA_TX_4SCH_BASE(0));
++#endif
++
+ return 0;
+
+ err_deinit_mdio:
diff --git a/autobuild_mac80211_release/mt7986_mac80211/target/linux/mediatek/patches-5.4/9999-flow-offload-add-net_device_path.patch b/autobuild_mac80211_release/mt7986_mac80211/target/linux/mediatek/patches-5.4/9999-flow-offload-add-net_device_path.patch
new file mode 100644
index 0000000..1fc6880
--- /dev/null
+++ b/autobuild_mac80211_release/mt7986_mac80211/target/linux/mediatek/patches-5.4/9999-flow-offload-add-net_device_path.patch
@@ -0,0 +1,98 @@
+diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
+--- a/include/linux/netdevice.h
++++ b/include/linux/netdevice.h
+@@ -829,6 +829,59 @@ typedef u16 (*select_queue_fallback_t)(s
+ struct sk_buff *skb,
+ struct net_device *sb_dev);
+
++enum net_device_path_type {
++ DEV_PATH_ETHERNET = 0,
++ DEV_PATH_VLAN,
++ DEV_PATH_BRIDGE,
++ DEV_PATH_PPPOE,
++ DEV_PATH_DSA,
++};
++
++struct net_device_path {
++ enum net_device_path_type type;
++ const struct net_device *dev;
++ union {
++ struct {
++ u16 id;
++ __be16 proto;
++ u8 h_dest[ETH_ALEN];
++ } encap;
++ struct {
++ enum {
++ DEV_PATH_BR_VLAN_KEEP,
++ DEV_PATH_BR_VLAN_TAG,
++ DEV_PATH_BR_VLAN_UNTAG,
++ DEV_PATH_BR_VLAN_UNTAG_HW,
++ } vlan_mode;
++ u16 vlan_id;
++ __be16 vlan_proto;
++ } bridge;
++ struct {
++ int port;
++ u16 proto;
++ } dsa;
++ };
++};
++
++#define NET_DEVICE_PATH_STACK_MAX 5
++#define NET_DEVICE_PATH_VLAN_MAX 2
++
++struct net_device_path_stack {
++ int num_paths;
++ struct net_device_path path[NET_DEVICE_PATH_STACK_MAX];
++};
++
++struct net_device_path_ctx {
++ const struct net_device *dev;
++ const u8 *daddr;
++
++ int num_vlans;
++ struct {
++ u16 id;
++ __be16 proto;
++ } vlan[NET_DEVICE_PATH_VLAN_MAX];
++};
++
+ enum tc_setup_type {
+ TC_SETUP_QDISC_MQPRIO,
+ TC_SETUP_CLSU32,
+@@ -844,6 +897,7 @@ enum tc_setup_type {
+ TC_SETUP_ROOT_QDISC,
+ TC_SETUP_QDISC_GRED,
+ TC_SETUP_QDISC_TAPRIO,
++ TC_SETUP_FT,
+ };
+
+ /* These structures hold the attributes of bpf state that are being passed
+@@ -1258,6 +1312,8 @@ enum flow_offload_type {
+ * Get devlink port instance associated with a given netdev.
+ * Called with a reference on the netdevice and devlink locks only,
+ * rtnl_lock is not held.
++ * int (*ndo_fill_forward_path)(struct net_device_path_ctx *ctx, struct net_device_path *path);
++ * Get the forwarding path to reach the real device from the HW destination address
+ */
+ struct net_device_ops {
+ int (*ndo_init)(struct net_device *dev);
+@@ -1460,6 +1516,8 @@ struct net_device_ops {
+ int (*ndo_xsk_wakeup)(struct net_device *dev,
+ u32 queue_id, u32 flags);
+ struct devlink_port * (*ndo_get_devlink_port)(struct net_device *dev);
++ int (*ndo_fill_forward_path)(struct net_device_path_ctx *ctx,
++ struct net_device_path *path);
+ };
+
+ /**
+@@ -2684,6 +2742,8 @@ void dev_remove_offload(struct packet_of
+
+ int dev_get_iflink(const struct net_device *dev);
+ int dev_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb);
++int dev_fill_forward_path(const struct net_device *dev, const u8 *daddr,
++ struct net_device_path_stack *stack);
+ struct net_device *__dev_get_by_flags(struct net *net, unsigned short flags,
+ unsigned short mask);
+ struct net_device *dev_get_by_name(struct net *net, const char *name);