mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 16:25:42 -04:00
net: stmmac: Get the TC number of net_device by netdev_get_num_tc()
netdev_get_num_tc() is the right method, we should not access net_device.num_tc directly. Signed-off-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/6298463f4655a76faf94e4273a4205c13ca17c77.1730449003.git.0x1207@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
c9cd9a5a83
commit
2558fe30ae
@@ -304,7 +304,7 @@ int dwmac5_fpe_map_preemption_class(struct net_device *ndev,
|
||||
{
|
||||
u32 val, offset, count, queue_weight, preemptible_txqs = 0;
|
||||
struct stmmac_priv *priv = netdev_priv(ndev);
|
||||
u32 num_tc = ndev->num_tc;
|
||||
int num_tc = netdev_get_num_tc(ndev);
|
||||
|
||||
if (!pclass)
|
||||
goto update_mapping;
|
||||
|
||||
Reference in New Issue
Block a user