diff options
author | Roopa Prabhu <roopa@cumulusnetworks.com> | 2014-12-08 14:04:20 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-09 18:24:47 -0500 |
commit | 1d460b988d97c5283e85c5bd00a7aafd5f1304b7 (patch) | |
tree | 8e61f1d98fffb4f95364966bcb97a4bc051d91f0 /net | |
parent | fc0bdbbc67c9f7307d41f415abb1165778fe803f (diff) |
rocker: remove swdev mode
Remove use of 'swdev' mode in rocker. rocker dev offloads
can use the BRIDGE_FLAGS_SELF to indicate offload to hardware.
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/rtnetlink.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index a9be2c161702..eaa057f14bcd 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -2751,11 +2751,17 @@ int ndo_dflt_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, if (!br_afspec) goto nla_put_failure; - if (nla_put_u16(skb, IFLA_BRIDGE_FLAGS, BRIDGE_FLAGS_SELF) || - nla_put_u16(skb, IFLA_BRIDGE_MODE, mode)) { + if (nla_put_u16(skb, IFLA_BRIDGE_FLAGS, BRIDGE_FLAGS_SELF)) { nla_nest_cancel(skb, br_afspec); goto nla_put_failure; } + + if (mode != BRIDGE_MODE_UNDEF) { + if (nla_put_u16(skb, IFLA_BRIDGE_MODE, mode)) { + nla_nest_cancel(skb, br_afspec); + goto nla_put_failure; + } + } nla_nest_end(skb, br_afspec); protinfo = nla_nest_start(skb, IFLA_PROTINFO | NLA_F_NESTED); |