linux/drivers/net/ethernet/broadcom/genet
Florian Fainelli ae67bf0188 net: bcmgenet: update ring producer index and buffer count in xmit
There is no need to have both bcmgenet_xmit_single() and
bcmgenet_xmit_frag() perform a free_bds decrement and a prod_index
increment by one. In case one of these functions fails to map a SKB or
fragment for transmit, we will return and exit bcmgenet_xmit() with an
error.

We can therefore safely use our local copy of nr_frags to know by how
much we should decrement the number of free buffers available, and by
how much the producer count must be incremented and do this in the tail
of bcmgenet_xmit().

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Petri Gynther <pgynther@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-13 15:52:31 -04:00
..
bcmgenet_wol.c net: bcmgenet: properly disable password matching 2015-03-05 21:15:21 -05:00
bcmgenet.c net: bcmgenet: update ring producer index and buffer count in xmit 2015-03-13 15:52:31 -04:00
bcmgenet.h net: bcmgenet: collect Rx discarded packet count 2015-03-11 17:54:55 -04:00
bcmmii.c net: bcmgenet: enable driver to work without a device tree 2014-12-08 20:26:59 -05:00
Makefile net: bcmgenet: add Wake-on-LAN support code 2014-07-21 16:04:31 -07:00