OSDN Git Service

be2net: Refactor be_xmit_enqueue() routine
authorSriharsha Basavapatna <sriharsha.basavapatna@emulex.com>
Mon, 16 Feb 2015 02:33:46 +0000 (08:03 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Feb 2015 19:06:57 +0000 (14:06 -0500)
commit79a0d7d8e0b2981dabc241cbeec6b99620dd7c5b
tree304adb4fe401990e5d456a5887166a5ab3fa90c9
parent804abcdbdbb68df5ca8cf7e70366522f02298029
be2net: Refactor be_xmit_enqueue() routine

- Reduce code duplication by moving WRB-frags setup into a function.
- Do not setup WRB-header before frags are setup, which is unncessary if
  there's errors while setting up frags. We should only grab an entry for
  the header, setup the frags and if everything is fine setup the header.
- The error cleanup can be moved into a small function.

Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_main.c