2N/A * GRUB -- GRand Unified Bootloader 2N/A * Copyright (C) 2010,2011 Free Software Foundation, Inc. 2N/A * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * GRUB is free software: you can redistribute it and/or modify 2N/A * it under the terms of the GNU General Public License as published by 2N/A * the Free Software Foundation, either version 3 of the License, or 2N/A * (at your option) any later version. 2N/A * GRUB is distributed in the hope that it will be useful, 2N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of 2N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2N/A * GNU General Public License for more details. 2N/A * You should have received a copy of the GNU General Public License 2N/A /* Reserve 2 bytes so that 2 + 14/18 bytes of ethernet header is divisible 2N/A by 4. So that IP header is aligned on 4 bytes. */ 2N/A /* Reserve 2 bytes so that 2 + 14/18 bytes of ethernet header is divisible 2N/A by 4. So that IP header is aligned on 4 bytes. */ 2N/A /* First we call shutdown(), then stop() */ 2N/A /* If the current set of filters on the NIC doesn't match what we 2N/A want (constained by the set of supported filters, of course), 2N/A /* If we're not exclusive, OR-in the required filters, just 2N/A in case we're sharing the interface. Of course, this is 2N/A no guarantee that these will be respected when the other 2N/A consumer changes the flags, but this is the best we can 2N/A 1,
/* Reset multicast filters */ 2N/A 0,
/* No multicast filters included */ 2N/A /* Check if setting the filters failed */ 2N/A /* Find handles which support the disk io interface. */ 2N/A /* We cannot ask for the exclusive handle here, otherwise we'd 2N/A blow away pxe, who may be holding our cached ack that we'll 2N/A /* This should not happen... Why? */ 2N/A /* Set up receive filters here */ 2N/A /* We only support one active NIC at a time */ 2N/A * This function assumes that card->efi_net was already initialized to 2N/A * a protocol handle for SNP. 2N/A /* Open the SNP exclusively, otherwise upper layer drivers such as MNP may 2N/A steal our packets before we've had a chance to see them. */ 2N/A /* If we cannot get exclusive use of the NIC, print a warning, but 2N/A grub_printf(
"WARNING: Could not open efinet exclusively. Packet loss\n");
2N/A /* Once we gain exclusive access, the SNP will probably be shut down. 2N/A reinitialize it here. */ 2N/A /* Fully initialize SNP by gaining exclusive access, if possible, 2N/A and setting up the receive filters properly. */