Update mtk_eth_soc.c

This commit is contained in:
padavanonly 2024-10-14 15:18:25 +08:00 committed by GitHub
parent a58e92b6db
commit d558bcaf82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1412,17 +1412,7 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget,
0 : RX_DMA_GET_SPORT(trxd.rxd4) - 1;
}
if (mac == 4) mac = 1;
#if defined(CONFIG_MEDIATEK_NETSYS_RX_V2)
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_RX_V2))
mac = (RX_DMA_GET_CRSN(trxd.rxd5) == HIT_BIND_FORCE_TO_CPU) ? 1 : mac;
else
#endif
mac = (RX_DMA_GET_CRSN(trxd.rxd4) == HIT_BIND_FORCE_TO_CPU) ? 1 : mac;
if (mac == 4) mac = 0;
if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT ||
!eth->netdev[mac]))
goto release_desc;