* include/grub/net.h (grub_net_card): New member txbufsize.
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New enum values GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX and GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN. * grub-core/net/drivers/efi/efinet.c (grub_efinet_findcards): Use txbufsize. * grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Use compatible property to check for macs. Set GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX and GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN on macs. * grub-core/net/drivers/ieee1275/ofnet.c (card_open): Don't add suffix if GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX is set. (send_card_buffer): Use txbuf. (grub_ofnet_findcards): Allocate txbuf. Simplify code flow and move nested function out of the parent while on it.
This commit is contained in:
parent
cc35fe8f31
commit
0494408e7e
6 changed files with 164 additions and 81 deletions
|
@ -181,7 +181,8 @@ grub_efinet_findcards (void)
|
|||
}
|
||||
|
||||
card->mtu = net->mode->max_packet_size;
|
||||
card->txbuf = grub_zalloc (ALIGN_UP (card->mtu, 64) + 256);
|
||||
card->txbufsize = ALIGN_UP (card->mtu, 64) + 256;
|
||||
card->txbuf = grub_zalloc (card->txbufsize);
|
||||
if (!card->txbuf)
|
||||
{
|
||||
grub_print_error ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue