[Settings] Add per-netdevice settings block
Add a configuration settings block for each net device. This will provide the parent scope for settings applicable only to that network device (e.g. non-volatile options stored on the NIC, options obtained via DHCP, etc.). Expose the MAC address as a setting.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <gpxe/list.h>
|
||||
#include <gpxe/tables.h>
|
||||
#include <gpxe/refcnt.h>
|
||||
#include <gpxe/settings.h>
|
||||
|
||||
struct io_buffer;
|
||||
struct net_device;
|
||||
@@ -243,6 +244,9 @@ struct net_device {
|
||||
/** Device statistics */
|
||||
struct net_device_stats stats;
|
||||
|
||||
/** Configuration settings applicable to this device */
|
||||
struct settings settings;
|
||||
|
||||
/** Driver private data */
|
||||
void *priv;
|
||||
};
|
||||
@@ -360,6 +364,8 @@ extern int net_tx ( struct io_buffer *iobuf, struct net_device *netdev,
|
||||
extern int net_rx ( struct io_buffer *iobuf, struct net_device *netdev,
|
||||
uint16_t net_proto, const void *ll_source );
|
||||
|
||||
extern struct settings_operations netdev_settings_operations;
|
||||
|
||||
/**
|
||||
* Complete network transmission
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user