diff options
| author | Michael Brown | 2023-09-13 17:29:59 +0200 |
|---|---|---|
| committer | Michael Brown | 2023-09-13 21:23:46 +0200 |
| commit | ae4e85bde97c9b216736a5087039f3309a628d24 (patch) | |
| tree | 39d706e2f330bd015d11ce38193c1baeab207cc8 /src/arch/x86/interface/pxe/pxe_call.c | |
| parent | [netdevice] Remove netdev_priv() helper function (diff) | |
| download | ipxe-ae4e85bde97c9b216736a5087039f3309a628d24.tar.gz ipxe-ae4e85bde97c9b216736a5087039f3309a628d24.tar.xz ipxe-ae4e85bde97c9b216736a5087039f3309a628d24.zip | |
[netdevice] Allocate private data for each network upper-layer driver
Allow network upper-layer drivers (such as LLDP, which attaches to
each network device in order to provide a corresponding LLDP settings
block) to specify a size for private data, which will be allocated as
part of the network device structure (as with the existing private
data allocated for the underlying device driver).
This will allow network upper-layer drivers to be simplified by
omitting memory allocation and freeing code. If the upper-layer
driver requires a reference counter (e.g. for interface
initialisation), then it may use the network device's existing
reference counter, since this is now the reference counter for the
containing block of memory.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/x86/interface/pxe/pxe_call.c')
| -rw-r--r-- | src/arch/x86/interface/pxe/pxe_call.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/arch/x86/interface/pxe/pxe_call.c b/src/arch/x86/interface/pxe/pxe_call.c index 671182991..0e8d5c5a8 100644 --- a/src/arch/x86/interface/pxe/pxe_call.c +++ b/src/arch/x86/interface/pxe/pxe_call.c @@ -375,9 +375,10 @@ int pxe_start_nbp ( void ) { * Notify BIOS of existence of network device * * @v netdev Network device + * @v priv Private data * @ret rc Return status code */ -static int pxe_notify ( struct net_device *netdev ) { +static int pxe_notify ( struct net_device *netdev, void *priv __unused ) { /* Do nothing if we already have a network device */ if ( pxe_netdev ) |
