netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Flavio Leitner <fbl@redhat.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] team: implement carrier change
Date: Sun, 30 Dec 2012 09:50:42 +0100	[thread overview]
Message-ID: <20121230085042.GA1575@minipsycho.orion> (raw)
In-Reply-To: <1356831061-1483-1-git-send-email-fbl@redhat.com>

Sun, Dec 30, 2012 at 02:31:01AM CET, fbl@redhat.com wrote:
>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

Acked-by: Jiri Pirko <jiri@resnulli.us>
>

  reply	other threads:[~2012-12-30  8:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-30  1:31 [PATCH net-next] team: implement carrier change Flavio Leitner
2012-12-30  8:50 ` Jiri Pirko [this message]
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=20121230085042.GA1575@minipsycho.orion \
    --to=jiri@resnulli.us \
    --cc=fbl@redhat.com \
    --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).