]> 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)
commitc46ef37e680a27e9045c5922def5511ae585933c
tree304adb4fe401990e5d456a5887166a5ab3fa90c9
parent2fce6e0c7df41105002af13bcda8cbd5fc5601ca
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