summaryrefslogtreecommitdiffstats
path: root/src/net/netdev_settings.c
diff options
context:
space:
mode:
authorMichael Brown2013-05-01 18:20:39 +0200
committerMichael Brown2013-05-01 20:52:12 +0200
commit15d2f947f51a0ea72e9938f5648fd5133950ecdb (patch)
treef53d0e87063b2c2972c3602ad8962332b3756a72 /src/net/netdev_settings.c
parent[realtek] Defer packets when no transmit descriptors are available (diff)
downloadipxe-15d2f947f51a0ea72e9938f5648fd5133950ecdb.tar.gz
ipxe-15d2f947f51a0ea72e9938f5648fd5133950ecdb.tar.xz
ipxe-15d2f947f51a0ea72e9938f5648fd5133950ecdb.zip
[settings] Eliminate settings "tag magic"
Create an explicit concept of "settings scope" and eliminate the magic values used for numerical setting tags. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/netdev_settings.c')
-rw-r--r--src/net/netdev_settings.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/net/netdev_settings.c b/src/net/netdev_settings.c
index 9efe6811..8758e980 100644
--- a/src/net/netdev_settings.c
+++ b/src/net/netdev_settings.c
@@ -39,30 +39,14 @@ struct setting mac_setting __setting ( SETTING_NETDEV ) = {
.name = "mac",
.description = "MAC address",
.type = &setting_type_hex,
- .tag = NETDEV_SETTING_TAG_MAC,
};
struct setting busid_setting __setting ( SETTING_NETDEV ) = {
.name = "busid",
.description = "Bus ID",
.type = &setting_type_hex,
- .tag = NETDEV_SETTING_TAG_BUS_ID,
};
/**
- * Check applicability of network device setting
- *
- * @v settings Settings block
- * @v setting Setting
- * @ret applies Setting applies within this settings block
- */
-static int netdev_applies ( struct settings *settings __unused,
- struct setting *setting ) {
-
- return ( IS_NETDEV_SETTING_TAG ( setting->tag ) ||
- dhcpopt_applies ( setting->tag ) );
-}
-
-/**
* Store value of network device setting
*
* @v settings Settings block
@@ -134,7 +118,6 @@ static void netdev_clear ( struct settings *settings ) {
/** Network device configuration settings operations */
struct settings_operations netdev_settings_operations = {
- .applies = netdev_applies,
.store = netdev_store,
.fetch = netdev_fetch,
.clear = netdev_clear,