From: Lothar Waßmann Date: Wed, 20 Nov 2013 15:16:44 +0000 (+0100) Subject: net: bootme: re-add eth_init() call when eth not active X-Git-Tag: KARO-TX6-2013-11-21~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=475d5e64f0c79d164f5c4f93284a94d549605df5;p=karo-tx-uboot.git net: bootme: re-add eth_init() call when eth not active --- diff --git a/net/bootme.c b/net/bootme.c index af2ab9f57e..13749802d7 100644 --- a/net/bootme.c +++ b/net/bootme.c @@ -304,6 +304,17 @@ int bootme_send_frame(const void *buf, size_t len) return 0; } + if (eth->state != ETH_STATE_ACTIVE) { + if (eth_is_on_demand_init()) { + ret = eth_init(gd->bd); + if (ret < 0) + return ret; + eth_set_last_protocol(BOOTME); + } else { + eth_init_state_only(gd->bd); + } + } + assert(NetTxPacket != NULL); pkt = (uchar *)NetTxPacket + NetEthHdrSize() + IP_UDP_HDR_SIZE; memcpy(pkt, buf, len);