]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4be8efbd4a3d48543421fba22127e8d2a8eedc93
tree304adb4fe401990e5d456a5887166a5ab3fa90c9
parent5a016b8c3feb4293eba4b002bc34ca90a9c4154d
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