From patchwork Wed Sep 13 22:05:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 813640 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="ejDYyx6i"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xswmD1BZPz9ryQ for ; Thu, 14 Sep 2017 08:08:44 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E657FC2259B; Wed, 13 Sep 2017 22:07:14 +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 AD68EC22531; Wed, 13 Sep 2017 22:06:57 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1BD12C222F6; Wed, 13 Sep 2017 22:06:22 +0000 (UTC) Received: from mail-qt0-f194.google.com (mail-qt0-f194.google.com [209.85.216.194]) by lists.denx.de (Postfix) with ESMTPS id 6CA43C22544 for ; Wed, 13 Sep 2017 22:06:19 +0000 (UTC) Received: by mail-qt0-f194.google.com with SMTP id u48so943441qtc.4 for ; Wed, 13 Sep 2017 15:06:19 -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=ejDYyx6icK+ZX9iomj1i0vjj49bOO10slYzzBR7UNJPfPW1g1scM7ZRtG0ocMs/8rv 1g5nUM7jsjAeJ7ys7CsaDqPkTK811vmJpuaf50bg4YlHiohLtyb5kaj/0KhDbkv9MYNy q3WQFNfM8Mqgel0xEMj1qhLsiqoCKn45VSvP8fiy75ms5iO16UhI+iKyzU6QPYPBJ0U8 Ly5UbsFrKQ8OC0Ekd3JozbeRiT98u/6O4Ragnmyayn1xP1lAmwDZBB7DIDJp9vDreRwa +qtxOcUNii2BO3anXw76xvHCKD8Fdcp65YBTouz5YUZ9oTGMX/aJ4Jo0C6EWY5TsCgmZ 3N4w== 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=ESmYO6amTnQkGiIyRqWxQQzoUWBo2Mj1xDSkHpqosip9z816UH9rWE7mNlYFZPrVH1 53MiUL7QYaUV/venV514rFEWb6ouFQICQJNbZJILFqM4Zl5jAOTEUBkiJwCN7AS6LyrI IFYhcXyul/IBtQgdRtwfSbcyK9SQ/Dmsn1VVklHDpRzIVOuvYoTgUts6fWCe4mXmUpVu c84Li1veXIwZb6+xcv1rwnukL1sRCw3LPcXjcY8zzT7ZofIxWDQjMLPcaZsTFy0FVT6T 0ZOvJlWjMQALAuhoRabQRJcMHZgjaO5SzJwNOg3OSQsGAracwKqKqBC2lIZXIhw/3wZ8 IKlA== X-Gm-Message-State: AHPjjUgzx+QD2SLI3XGpXc/vjswrVcsmwqbV86jQypVkJfStCltEc40F nTZPU4BM9jGU6X6kqTw= X-Google-Smtp-Source: AOwi7QAFRNOFjdgXltM678dWxVZH8BBgY7mZQE9Zxo+OhWbPmVeeO/NtKC+rb1voZ1gnI6sH+nL/vw== X-Received: by 10.237.35.35 with SMTP id h32mr26656612qtc.47.1505340378153; Wed, 13 Sep 2017 15:06:18 -0700 (PDT) Received: from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a]) by smtp.gmail.com with ESMTPSA id w46sm4597135qta.84.2017.09.13.15.06.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Sep 2017 15:06:17 -0700 (PDT) From: Rob Clark To: U-Boot Mailing List Date: Wed, 13 Sep 2017 18:05:32 -0400 Message-Id: <20170913220546.19560-10-robdclark@gmail.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170913220546.19560-1-robdclark@gmail.com> References: <20170913220546.19560-1-robdclark@gmail.com> Cc: Heinrich Schuchardt Subject: [U-Boot] [PATCH v3 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;