Blame SOURCES/0198-Revert-reopen-SNP-protocol-for-exclusive-use-by-grub.patch

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