From: Flavio Leitner <fbl@redhat.com>
To: netdev <netdev@vger.kernel.org>
Cc: Jiri Pirko <jiri@resnulli.us>, Flavio Leitner <fbl@redhat.com>
Subject: [PATCH net-next] team: implement carrier change
Date: Sat, 29 Dec 2012 23:31:01 -0200 [thread overview]
Message-ID: <1356831061-1483-1-git-send-email-fbl@redhat.com> (raw)
The user space teamd daemon may need to control the
master's carrier state depending on the selected mode.
Signed-off-by: Flavio Leitner <fbl@redhat.com>
---
drivers/net/team/team.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index f711039..14cb843 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1708,6 +1708,15 @@ static netdev_features_t team_fix_features(struct net_device *dev,
return features;
}
+static int team_change_carrier(struct net_device *dev, bool new_carrier)
+{
+ if (new_carrier)
+ netif_carrier_on(dev);
+ else
+ netif_carrier_off(dev);
+ return 0;
+}
+
static const struct net_device_ops team_netdev_ops = {
.ndo_init = team_init,
.ndo_uninit = team_uninit,
@@ -1730,6 +1739,7 @@ static const struct net_device_ops team_netdev_ops = {
.ndo_add_slave = team_add_slave,
.ndo_del_slave = team_del_slave,
.ndo_fix_features = team_fix_features,
+ .ndo_change_carrier = team_change_carrier,
};
/***********************
--
1.8.0.1
next reply other threads:[~2012-12-30 1:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-30 1:31 Flavio Leitner [this message]
2012-12-30 8:50 ` [PATCH net-next] team: implement carrier change Jiri Pirko
2012-12-30 10:32 ` David Miller
2012-12-30 13:03 ` Michał Mirosław
2012-12-30 13:06 ` Jiri Pirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1356831061-1483-1-git-send-email-fbl@redhat.com \
--to=fbl@redhat.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).