From patchwork Thu Aug 10 18:29:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 800315 X-Patchwork-Delegate: agraf@suse.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QsPkIjVV"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xSxfH140dz9sNd for ; Fri, 11 Aug 2017 04:35:50 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 53C7CC21D72; Thu, 10 Aug 2017 18:33:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id ECC70C21DC1; Thu, 10 Aug 2017 18:31:22 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2E5D1C21D09; Thu, 10 Aug 2017 18:30:38 +0000 (UTC) Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) by lists.denx.de (Postfix) with ESMTPS id 42716C21DBD for ; Thu, 10 Aug 2017 18:30:34 +0000 (UTC) Received: by mail-qk0-f195.google.com with SMTP id x77so1462398qka.4 for ; Thu, 10 Aug 2017 11:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CaWWePtg9XeZDEqA9v2sEK6qTDWLnNHoRQQrde0A3h8=; b=QsPkIjVVfVG/EsOs6zDPFKSmy+3ARL9kp+xIqKEjKLof4aGlWqTVvQcvYHwrw/OV+5 T2OA/DYuZ1BURYPqKbdgptoPVy/Eu5mSmJYjtQogKDIY+VpyTPa2nLYg+I3Kx5N+Svxh gnV4My977qkwvh0N6Jd+ozvbLqgknVjkD+tkPw+Q2/jUaJt5wW5vfJP2Urt45fHZTHPd F+VLF2sZvljcz8/FfzJCPZBeh8DhVd4COqFQCa4fxU1UUwd8NpYPQksS84DIqV32NfHq sLt3zglHLSNZUOPCzh/jsTpA/SP6x9kL+fbISWjNzSwS8Mqn2/LO47xtX56xETQMBcwD xZ7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CaWWePtg9XeZDEqA9v2sEK6qTDWLnNHoRQQrde0A3h8=; b=GQV9gLRvr8n/BfHmoXXBczPWRC6ZXNl0Nw2s8g61nMhpnSTkuZXLRMMdaHUMSVJCLy zIZqps15DpYAGYH99VhOlA4hpKG6dOV+2wlxDP5JIogC4F442fEDV/NNTF96Owq9oIUd nxI9+iOHeK9t8Xe1tY7TuwM7zchUKaNCr0dq6Cie8Yd04UgW2jKoAez8bYYGAJXJp7mk I0REtxIJWVisZ1SzJnWPAQ7e6KnG8LpLCw0Uk1Jj4b2UEbZqf9gJMl9JUUuSXoKk7RVm rHB49nzXwDWdynQFU8ptmUrG/fvkCDBiVeYUTWDOWykAh+i0v/LBCyHViUhY45xDSjRL avig== X-Gm-Message-State: AHYfb5jdCm5+rEPxpTZgVLr0hj5dBuItscjBETu1bDr3071Kwvf2Focl SH5Ma531PZuKugLEbd8= X-Received: by 10.55.165.205 with SMTP id o196mr15422818qke.117.1502389833039; Thu, 10 Aug 2017 11:30:33 -0700 (PDT) Received: from localhost ([144.121.20.162]) by smtp.gmail.com with ESMTPSA id 47sm4675704qtw.26.2017.08.10.11.30.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Aug 2017 11:30:31 -0700 (PDT) From: Rob Clark To: U-Boot Mailing List Date: Thu, 10 Aug 2017 14:29:37 -0400 Message-Id: <20170810182948.27653-10-robdclark@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170810182948.27653-1-robdclark@gmail.com> References: <20170810182948.27653-1-robdclark@gmail.com> Cc: Heinrich Schuchardt , Peter Jones Subject: [U-Boot] [PATCH v1 09/15] efi_loader: use proper device-paths for net X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Signed-off-by: Rob Clark --- lib/efi_loader/efi_net.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c index 0b949d86e8..aa0618fd3a 100644 --- a/lib/efi_loader/efi_net.c +++ b/lib/efi_loader/efi_net.c @@ -26,9 +26,6 @@ struct efi_net_obj { /* EFI Interface callback struct for network */ struct efi_simple_network net; struct efi_simple_network_mode net_mode; - /* Device path to the network adapter */ - struct efi_device_path_mac_addr dp_mac; - struct efi_device_path_file_path dp_end; /* PXE struct to transmit dhcp data */ struct efi_pxe pxe; struct efi_pxe_mode pxe_mode; @@ -213,16 +210,6 @@ void efi_net_set_dhcp_ack(void *pkt, int len) int efi_net_register(void **handle) { struct efi_net_obj *netobj; - struct efi_device_path_mac_addr dp_net = { - .dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE, - .dp.sub_type = DEVICE_PATH_SUB_TYPE_MSG_MAC_ADDR, - .dp.length = sizeof(dp_net), - }; - struct efi_device_path_file_path dp_end = { - .dp.type = DEVICE_PATH_TYPE_END, - .dp.sub_type = DEVICE_PATH_SUB_TYPE_END, - .dp.length = sizeof(dp_end), - }; if (!eth_get_dev()) { /* No eth device active, don't expose any */ @@ -236,7 +223,8 @@ int efi_net_register(void **handle) netobj->parent.protocols[0].guid = &efi_net_guid; netobj->parent.protocols[0].protocol_interface = &netobj->net; netobj->parent.protocols[1].guid = &efi_guid_device_path; - netobj->parent.protocols[1].protocol_interface = &netobj->dp_mac; + netobj->parent.protocols[1].protocol_interface = + efi_dp_from_eth(); netobj->parent.protocols[2].guid = &efi_pxe_guid; netobj->parent.protocols[2].protocol_interface = &netobj->pxe; netobj->parent.handle = &netobj->net; @@ -255,9 +243,6 @@ int efi_net_register(void **handle) netobj->net.receive = efi_net_receive; netobj->net.mode = &netobj->net_mode; netobj->net_mode.state = EFI_NETWORK_STARTED; - netobj->dp_mac = dp_net; - netobj->dp_end = dp_end; - memcpy(netobj->dp_mac.mac.addr, eth_get_ethaddr(), 6); memcpy(netobj->net_mode.current_address.mac_addr, eth_get_ethaddr(), 6); netobj->net_mode.max_packet_size = PKTSIZE;