mediatek:add more depends

This commit is contained in:
padavanonly 2025-04-20 14:28:53 +08:00
parent a477d9dc86
commit 9f71cc4aa5
5 changed files with 14 additions and 25 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for Easy QoS
LUCI_DEPENDS:=+tc +kmod-sched-core +kmod-ifb +ebtables-legacy-utils +ebtables-legacy @!PACKAGE_luci-app-eqos
LUCI_DEPENDS:=+wget-ssl +tc +kmod-sched-core +kmod-ifb +ebtables-legacy-utils +ebtables-legacy @!PACKAGE_luci-app-eqos
PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
PKG_NAME:=luci-app-eqos-mtk

View File

@ -75,18 +75,11 @@
};
gmac1: mac@1 {
compatible = "mediatek,eth-mac";
reg = <1>;
nvmem-cells = <&macaddr_factory_4 3>;
nvmem-cell-names = "mac-address";
phy-mode = "gmii";
fixed-link {
speed = <1000>;
phy-handle = <&phy0>;
full-duplex;
pause;
};
};
compatible = "mediatek,eth-mac";
reg = <1>;
phy-mode = "gmii";
phy-handle = <&phy0>;
};
mdio: mdio-bus {
#address-cells = <1>;
@ -180,4 +173,4 @@
phys = <&u2port0 PHY_TYPE_USB2>,
<&u3port0 PHY_TYPE_USB3>;
status = "okay";
};
};

View File

@ -1416,12 +1416,9 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget,
0 : RX_DMA_GET_SPORT(trxd.rxd4) - 1;
}
if (mac == 4){
if (mac == 4)
mac = atomic_read(&eth1_in_br);
// printk_ratelimited(KERN_WARNING "mac is %d",mac);
}
if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT ||
!eth->netdev[mac]))
goto release_desc;
@ -2749,7 +2746,7 @@ static int mtk_stop(struct net_device *dev)
int i;
u32 val = 0;
struct device_node *phy_node;
mtk_gdm_config(eth, mac->id, MTK_GDMA_DROP_ALL);
netif_tx_disable(dev);

View File

@ -383,7 +383,7 @@ static int hnat_hw_init(u32 ppe_id)
cr_set_field(hnat_priv->ppe_base[ppe_id] + PPE_MIB_CAH_CTRL, MIB_CAH_EN, 1);
}
hnat_priv->g_wandev = dev_get_by_name(&init_net, hnat_priv->wan);
hnat_priv->g_wandev = __dev_get_by_name(&init_net, hnat_priv->wan);
dev_info(hnat_priv->dev, "PPE%d hwnat start\n", ppe_id);
@ -698,7 +698,7 @@ static int hnat_probe(struct platform_device *pdev)
if (err < 0)
return -EINVAL;
strncpy(hnat_priv->lan, "wan", IFNAMSIZ);
strncpy(hnat_priv->wan, "eth0", IFNAMSIZ);
dev_info(&pdev->dev, "wan = %s\n", hnat_priv->wan);
err = of_property_read_string(np, "mtketh-lan", &name);

View File

@ -37,7 +37,6 @@ extern atomic_t eth1_in_br;
struct net_device *br_dev;
struct net_device *eth1_dev;
#define do_ge2ext_fast(dev, skb) \
((IS_LAN(dev) || IS_WAN(dev) || IS_PPD(dev)) && \
skb_hnat_is_hashed(skb) && \
@ -120,7 +119,7 @@ static inline struct net_device *get_dev_from_index(int index)
static inline struct net_device *get_wandev_from_index(int index)
{
if (!hnat_priv->g_wandev)
hnat_priv->g_wandev = dev_get_by_name(&init_net, hnat_priv->wan);
hnat_priv->g_wandev = __dev_get_by_name(&init_net, hnat_priv->wan);
if (hnat_priv->g_wandev && hnat_priv->g_wandev->ifindex == index)
return hnat_priv->g_wandev;
@ -414,7 +413,7 @@ int nf_hnat_netdevice_event(struct notifier_block *unused, unsigned long event,
case NETDEV_REGISTER:
ppd_dev_setting();
if (IS_WAN(dev) && !hnat_priv->g_wandev)
hnat_priv->g_wandev = dev_get_by_name(&init_net, hnat_priv->wan);
hnat_priv->g_wandev = __dev_get_by_name(&init_net, hnat_priv->wan);
break;
case MTK_FE_RESET_NAT_DONE: