mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 15:47:36 +00:00
net: dsa: hellcreek: Fix incorrect setting of GCL
Currently the gate control list which is programmed into the hardware is
incorrect resulting in wrong traffic schedules. The problem is the loop
variables are incremented before they are referenced. Therefore, move the
increment to the end of the loop.
Fixes: 24dfc6eb39
("net: dsa: hellcreek: Add TAPRIO offloading support")
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
43fed4d48d
commit
a7db5ed863
1 changed files with 3 additions and 3 deletions
|
@ -1472,9 +1472,6 @@ static void hellcreek_setup_gcl(struct hellcreek *hellcreek, int port,
|
|||
u16 data;
|
||||
u8 gates;
|
||||
|
||||
cur++;
|
||||
next++;
|
||||
|
||||
if (i == schedule->num_entries)
|
||||
gates = initial->gate_mask ^
|
||||
cur->gate_mask;
|
||||
|
@ -1503,6 +1500,9 @@ static void hellcreek_setup_gcl(struct hellcreek *hellcreek, int port,
|
|||
(initial->gate_mask <<
|
||||
TR_GCLCMD_INIT_GATE_STATES_SHIFT);
|
||||
hellcreek_write(hellcreek, data, TR_GCLCMD);
|
||||
|
||||
cur++;
|
||||
next++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue