Keep TX and RX buffers on EFI rather than always allocate new ones.
* include/grub/net.h (grub_net_card_driver): Allow driver to modify card. All users updated. (grub_net_card): New members txbuf, rcvbuf, rcvbufsize and txbusy. * grub-core/net/drivers/efi/efinet.c (send_card_buffer): Reuse buffer. (get_card_packet): Likewise. (grub_efinet_findcards): Init new fields.
This commit is contained in:
parent
f695e99a75
commit
3e74723951
6 changed files with 96 additions and 60 deletions
|
@ -167,7 +167,7 @@ grub_pxe_scan (void)
|
|||
}
|
||||
|
||||
static struct grub_net_buff *
|
||||
grub_pxe_recv (const struct grub_net_card *dev __attribute__ ((unused)))
|
||||
grub_pxe_recv (struct grub_net_card *dev __attribute__ ((unused)))
|
||||
{
|
||||
struct grub_pxe_undi_isr *isr;
|
||||
static int in_progress = 0;
|
||||
|
@ -250,7 +250,7 @@ grub_pxe_recv (const struct grub_net_card *dev __attribute__ ((unused)))
|
|||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_pxe_send (const struct grub_net_card *dev __attribute__ ((unused)),
|
||||
grub_pxe_send (struct grub_net_card *dev __attribute__ ((unused)),
|
||||
struct grub_net_buff *pack)
|
||||
{
|
||||
struct grub_pxe_undi_transmit *trans;
|
||||
|
@ -276,7 +276,7 @@ grub_pxe_send (const struct grub_net_card *dev __attribute__ ((unused)),
|
|||
}
|
||||
|
||||
static void
|
||||
grub_pxe_close (const struct grub_net_card *dev __attribute__ ((unused)))
|
||||
grub_pxe_close (struct grub_net_card *dev __attribute__ ((unused)))
|
||||
{
|
||||
if (pxe_rm_entry)
|
||||
grub_pxe_call (GRUB_PXENV_UNDI_CLOSE,
|
||||
|
@ -285,7 +285,7 @@ grub_pxe_close (const struct grub_net_card *dev __attribute__ ((unused)))
|
|||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_pxe_open (const struct grub_net_card *dev __attribute__ ((unused)))
|
||||
grub_pxe_open (struct grub_net_card *dev __attribute__ ((unused)))
|
||||
{
|
||||
struct grub_pxe_undi_open *ou;
|
||||
ou = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue