]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: xgmac: Fix RSS writing wrong keys
authorJose Abreu <Jose.Abreu@synopsys.com>
Mon, 30 Sep 2019 08:19:13 +0000 (10:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Oct 2019 17:12:38 +0000 (10:12 -0700)
commit8c350652674af2d08f11fef0004be27d57127606
treeb42bc08191dc5a2ec5dd126ad76d0a90fd3e0158
parent3a0929888bd195dbe74cebbac70b7b4475efc9ed
net: stmmac: xgmac: Fix RSS writing wrong keys

Commit 496772e7ff18, changed the call to dwxgmac2_rss_write_reg()
passing it the variable cfg->key[i].

As key is an u8 but we write 32 bits at a time we need to cast it into
an u32 so that the correct key values are written. Notice that the for
loop already takes this into account so we don't try to write past the
keys size.

Fixes: 496772e7ff18 ("net: stmmac: selftest: avoid large stack usage")
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c