gianfar: Factor out gfar_init_bds() from gfar_alloc_skb_resources()
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Mon, 12 Oct 2009 06:00:39 +0000 (06:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Oct 2009 06:54:05 +0000 (23:54 -0700)
commit8728327e7a7a7f21f3a7109e65503f4cc3305e78
treeb06e9fa0da9176043652be8096c6d672b53a971b
parent8a102fe001cc016dabcc392247a2b008e37ffe6a
gianfar: Factor out gfar_init_bds() from gfar_alloc_skb_resources()

After hibernation we want to just reinitialize BDs, no need to allocate
anything. So, factor out BDs initialization code from
gfar_alloc_skb_resourses().

Also, teach gfar_init_bds() to reuse already allocated RX SKBs, i.e.
just call gfar_init_rxbdp() if a SKB was already allocated and mapped.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/gianfar.c