From patchwork Sun Sep 10 11:21:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 812103 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="tT1fSq/F"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xqphW4Zcbz9sDB for ; Sun, 10 Sep 2017 21:28:11 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 5D399C21DDF; Sun, 10 Sep 2017 11:25:29 +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 8B161C21EA8; Sun, 10 Sep 2017 11:23:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6501DC21EA8; Sun, 10 Sep 2017 11:23:12 +0000 (UTC) Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) by lists.denx.de (Postfix) with ESMTPS id 28D37C21E3C for ; Sun, 10 Sep 2017 11:23:06 +0000 (UTC) Received: by mail-qt0-f193.google.com with SMTP id q8so4090087qtb.1 for ; Sun, 10 Sep 2017 04:23:06 -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=q0Qolx1SkIrEQb3hYqzrxMkSkrB0yBal+ZscwQZLcmY=; b=tT1fSq/FDkqcK4ELUNEXlBhtpzTFkynWc3bL1mrvNrWLtHVtXwZK9iuvV+jdxdciAs 7I+5JuTH/jY9I3mp5F2bpa4RaCcOEndTJaXQndvj8qCS4Q1xSf0N6bhSL9gT3Bb0V609 sN1E4MYzOvqkqBOcJXGTmwVLcVvleAQVZZiSsil7MNQOgzyxAwZFpUSyahtt+EpQ57qG y2hXQIlUfSy0kY5Nc3fpaIyL+92a42i2uqVnYuFyBrJGII1yYDe3bxuWrPJ/Z5jR10Jq NsYAIzJ4/69o2k6M/srfYO6hD6YlK5w9X+3h7+0o46Fz+nVSwCWLjXvqKu15GzK4rkSa h84A== 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=q0Qolx1SkIrEQb3hYqzrxMkSkrB0yBal+ZscwQZLcmY=; b=nghfU//d5L/tS+5XFgMof1JKhuBoc0eqV9YUSmdVH5CoZGm5pkopDNDQ66YAeime5l UxnAqzhqSY9ZAWFlTLfMgFq+qR0JsF5lIgZGJohlnnqGUMhUPr0rJ7itHB/zL+zapsY4 sS0tq/jjZOmmn5wGYQOqiWxGj6ivngx2aE4mfdQM+fGBQaDOROwTLk0PQezMXmy1SPqu 3X3UMELik4uFfTm5yJX73Tzv7wkHZF/QophngXwcVvNwP3J63gC+1dQ5BFFgZpDaffIR 1Im8hstFZp0cjSX9Jlu/LA9CGDd8GRFHtwqaly6YwmwBIzFU1FmZCHeFOYjMxJI3WU3A RUzQ== X-Gm-Message-State: AHPjjUhf8dXJnfYNGWrwFHH2GpV+bfcL4QDA0uKaKBsFx3FMw1vuIvMs VZ8a7SQcjYreU+mnRYc= X-Google-Smtp-Source: AOwi7QA3lIYJLcewfedlpgddVabOXgJUnHnt8dhPstCFxNpxM7e1VjRvWQQMjInmrtLgz3+lt+mBEA== X-Received: by 10.237.36.205 with SMTP id u13mr12543745qtc.75.1505042584901; Sun, 10 Sep 2017 04:23:04 -0700 (PDT) Received: from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a]) by smtp.gmail.com with ESMTPSA id a12sm4366604qta.3.2017.09.10.04.23.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 10 Sep 2017 04:23:03 -0700 (PDT) From: Rob Clark To: U-Boot Mailing List Date: Sun, 10 Sep 2017 07:21:34 -0400 Message-Id: <20170910112149.21358-18-robdclark@gmail.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170910112149.21358-1-robdclark@gmail.com> References: <20170910112149.21358-1-robdclark@gmail.com> Cc: Heinrich Schuchardt Subject: [U-Boot] [PATCH v2 09/21] 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;