]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
net: bootme: re-add eth_init() call when eth not active
authorLothar Waßmann <LW@KARO-electronics.de>
Wed, 20 Nov 2013 15:16:44 +0000 (16:16 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 21 Nov 2013 10:37:18 +0000 (11:37 +0100)
net/bootme.c

index af2ab9f57ec4a021cddf506ba171bfd9d8c13d8c..13749802d717278588a7744f82a800ca77477b2f 100644 (file)
@@ -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);