Reintroduce open/close of net cards. Clean up ofnet.
This commit is contained in:
parent
382077365b
commit
0bc2cd0f82
12 changed files with 313 additions and 285 deletions
|
@ -25,7 +25,15 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf,
|
|||
grub_memcpy (eth->src, inf->hwaddress.mac, 6);
|
||||
|
||||
eth->type = grub_cpu_to_be16 (ethertype);
|
||||
|
||||
if (!inf->card->opened)
|
||||
{
|
||||
err = GRUB_ERR_NONE;
|
||||
if (inf->card->driver->open)
|
||||
err = inf->card->driver->open (inf->card);
|
||||
if (err)
|
||||
return err;
|
||||
inf->card->opened = 1;
|
||||
}
|
||||
return inf->card->driver->send (inf->card, nb);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue