]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
gianfar: Cleanup TxFCB insertion on xmit
authorClaudiu Manoil <claudiu.manoil@freescale.com>
Mon, 5 Aug 2013 14:20:10 +0000 (17:20 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Aug 2013 19:29:15 +0000 (12:29 -0700)
commit0d0cffdcc6fc4f57080b9a443401e8dad5ca77f8
treed347a4f950c7f552e25055bca28d4652b8a84f22
parent02d88fb4fb6a580b0224b3bf07bbfd9d4806f6fb
gianfar: Cleanup TxFCB insertion on xmit

Cleanup gfar_start_xmit()'s fast path by factoring out "redundant"
FCB insertion code (repeated gfar_add_fcb() calls and related)
and by reducing the number of if() clauses (i.e. if(fcb) checks).
Improve maintainability (e.g. there's less code and easier to read)
also by introducing do_csum and do_vlan to mark the other 2 Tx TOE
functionalities, following the same model as do_tstamp.
fcb_len may also be 0 now, to mark that Tx FCB insertion conditions
(do_csum, do_vlan, do_tstamp) have not been met.

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