net: dsa: hellcreek: Fix incorrect setting of GCL
authorKurt Kanzenbach <kurt@linutronix.de>
Wed, 25 Aug 2021 13:58:12 +0000 (15:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Aug 2021 09:26:05 +0000 (10:26 +0100)
commita7db5ed8632c88c029254d5d74765d52614af3fd
treede7ff101121b0e1b5f42b833fb5d98b7e1885545
parent43fed4d48d325e0a61dc2638a84da972fbb1087b
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: 24dfc6eb39b2 ("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>
drivers/net/dsa/hirschmann/hellcreek.c