diff options
author | Nikolay Aleksandrov <nikolay@redhat.com> | 2014-01-22 14:53:17 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-22 15:38:41 -0800 |
commit | 2b3798d5e1377ce6c67993bb271754c9c5ab4833 (patch) | |
tree | 29e37d916f2312c62d9e2f46a6cbe54125e1f3bb /drivers/net/bonding/bond_options.h | |
parent | 0911736245df19b423a3b156f6709e7bba48b18a (diff) | |
download | lwn-2b3798d5e1377ce6c67993bb271754c9c5ab4833.tar.gz lwn-2b3798d5e1377ce6c67993bb271754c9c5ab4833.zip |
bonding: convert mode setting to use the new option API
This patch makes the bond's mode setting use the new option API and
adds support for dependency printing which relies on having an entry for
the mode option in the bond_opts[] array.
Also add the ability to print the mode name when mode dependency fails
and fix some trivial/style errors.
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_options.h')
-rw-r--r-- | drivers/net/bonding/bond_options.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_options.h b/drivers/net/bonding/bond_options.h index e20f2ebaf5c3..11e6c0697aed 100644 --- a/drivers/net/bonding/bond_options.h +++ b/drivers/net/bonding/bond_options.h @@ -38,6 +38,7 @@ enum { /* Option IDs, their bit positions correspond to their IDs */ enum { + BOND_OPT_MODE, BOND_OPT_LAST }; @@ -97,4 +98,6 @@ static inline void __bond_opt_init(struct bond_opt_value *optval, } #define bond_opt_initval(optval, value) __bond_opt_init(optval, NULL, value) #define bond_opt_initstr(optval, str) __bond_opt_init(optval, str, ULLONG_MAX) + +int bond_option_mode_set(struct bonding *bond, struct bond_opt_value *newval); #endif /* _BOND_OPTIONS_H */ |