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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Apr 2018 02:20:48 +0000 (22:20 -0400)
commit60d6e6f0b9e422dd01aeda39257ee0428e5e2a3f
tree809fe704a4c24a4383ce887c0c668d33b7a5851a
parent16a1c0646e55c3345bce8e4edfc06ad119d27c04
net: bgmac: Fix endian access in bgmac_dma_tx_ring_free()

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>
drivers/net/ethernet/broadcom/bgmac.c