]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: bgmac: Fix endian access in bgmac_dma_tx_ring_free()
authorFlorian Fainelli <f.fainelli@gmail.com>
Sun, 1 Apr 2018 17:26:30 +0000 (10:26 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 27 Aug 2018 14:40:05 +0000 (16:40 +0200)
commit6f41a34ec9040b6404358ff4a2eb8ee65a974d35
tree49c349cef305d1a98fb0de29fbc08e32a15f58e3
parent26be66d5f35e3a049f6082eb77c2fdd00229bb41
net: bgmac: Fix endian access in bgmac_dma_tx_ring_free()

BugLink: http://bugs.launchpad.net/bugs/1786352
[ Upstream commit 60d6e6f0b9e422dd01aeda39257ee0428e5e2a3f ]

bgmac_dma_tx_ring_free() assigns the ctl1 word which is a litle endian
32-bit word without using proper accessors, fix this, and because a
length cannot be negative, use unsigned int while at it.

Fixes: 9cde94506eac ("bgmac: implement scatter/gather support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/broadcom/bgmac.c