331d9e4
From 29a2a50d54efc3dbc79031e9188aa5694f2fcfc1 Mon Sep 17 00:00:00 2001
bc092b9
From: Peter Jones <pjones@redhat.com>
bc092b9
Date: Thu, 7 Apr 2016 10:58:06 -0400
bbc6a89
Subject: [PATCH 144/192] Revert "reopen SNP protocol for exclusive use by
bc092b9
 grub"
bc092b9
bc092b9
I *think* this should have been replaced by upstream's
bc092b9
49426e9fd2e562c73a4f1206f32eff9e424a1a73, so I'm reverting for now.
bc092b9
bc092b9
May resolve rhbz#1273974.
bc092b9
bc092b9
This reverts commit 147daeab22db793978f952b6f0d832919a1b0081.
bc092b9
---
bc092b9
 grub-core/net/drivers/efi/efinet.c | 39 --------------------------------------
bc092b9
 1 file changed, 39 deletions(-)
bc092b9
bc092b9
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
bc092b9
index b870d3f19..a3ce4c67c 100644
bc092b9
--- a/grub-core/net/drivers/efi/efinet.c
bc092b9
+++ b/grub-core/net/drivers/efi/efinet.c
bc092b9
@@ -465,45 +465,6 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
bc092b9
 				    &pxe_mode->dhcp_ack,
bc092b9
 				    sizeof (pxe_mode->dhcp_ack),
bc092b9
 				    1, device, path);
bc092b9
-    net = grub_efi_open_protocol (card->efi_handle, &net_io_guid,
bc092b9
-				  GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE);
bc092b9
-    if (net) {
bc092b9
-      if (net->mode->state == GRUB_EFI_NETWORK_STOPPED
bc092b9
-	  && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS)
bc092b9
-	continue;
bc092b9
-
bc092b9
-      if (net->mode->state == GRUB_EFI_NETWORK_STOPPED)
bc092b9
-	continue;
bc092b9
-
bc092b9
-      if (net->mode->state == GRUB_EFI_NETWORK_STARTED
bc092b9
-	  && efi_call_3 (net->initialize, net, 0, 0) != GRUB_EFI_SUCCESS)
bc092b9
-	continue;
bc092b9
-
bc092b9
-      /* Enable hardware receive filters if driver declares support for it.
bc092b9
-	 We need unicast and broadcast and additionaly all nodes and
bc092b9
-	 solicited multicast for IPv6. Solicited multicast is per-IPv6
bc092b9
-	 address and we currently do not have API to do it so simply
bc092b9
-	 try to enable receive of all multicast packets or evertyhing in
bc092b9
-	 the worst case (i386 PXE driver always enables promiscuous too).
bc092b9
-
bc092b9
-	 This does trust firmware to do what it claims to do.
bc092b9
-       */
bc092b9
-      if (net->mode->receive_filter_mask)
bc092b9
-	{
bc092b9
-	  grub_uint32_t filters = GRUB_EFI_SIMPLE_NETWORK_RECEIVE_UNICAST   |
bc092b9
-				  GRUB_EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST |
bc092b9
-				  GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST;
bc092b9
-
bc092b9
-	  filters &= net->mode->receive_filter_mask;
bc092b9
-	  if (!(filters & GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST))
bc092b9
-	    filters |= (net->mode->receive_filter_mask &
bc092b9
-			GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS);
bc092b9
-
bc092b9
-	  efi_call_6 (net->receive_filters, net, filters, 0, 0, 0, NULL);
bc092b9
-	}
bc092b9
-
bc092b9
-      card->efi_net = net;
bc092b9
-    }
bc092b9
     return;
bc092b9
   }
bc092b9
 }
bc092b9
-- 
bbc6a89
2.13.4
bc092b9