enetc: Clean up Rx BD iteration
authorClaudiu Manoil <claudiu.manoil@nxp.com>
Tue, 10 Mar 2020 12:51:23 +0000 (14:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Mar 2020 22:48:54 +0000 (15:48 -0700)
commit714239ac630a85919839f200d4499b7f811c7003
tree89de5514a4db08aa3a1baf2e1954faa959374a85
parenta784c92ee272ed075b2134736d32321535fc778a
enetc: Clean up Rx BD iteration

Improve maintainability of the code iterating the Rx buffer
descriptors to prepare it to support iterating extended Rx BD
descriptors as well.
Don't increment by one the h/w descriptor pointers explicitly,
provide an iterator that takes care of the h/w details.

Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/enetc/enetc.c
drivers/net/ethernet/freescale/enetc/enetc.h