netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jpirko@redhat.com>
To: netdev@vger.kernel.org
Cc: mst@redhat.com, shimoda.hiroaki@gmail.com,
	virtualization@lists.linux-foundation.org,
	danny.kukawka@bisect.de, edumazet@google.com,
	davem@davemloft.net
Subject: [patch net-next 3/4] team: use IFF_LIFE_ADDR_CHANGE priv_flag
Date: Thu, 28 Jun 2012 16:10:38 +0200	[thread overview]
Message-ID: <1340892639-1111-4-git-send-email-jpirko@redhat.com> (raw)
In-Reply-To: <1340892639-1111-1-git-send-email-jpirko@redhat.com>

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
 drivers/net/team/team.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 5350eea..019d658 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1188,10 +1188,11 @@ static int team_set_mac_address(struct net_device *dev, void *p)
 {
 	struct team *team = netdev_priv(dev);
 	struct team_port *port;
-	struct sockaddr *addr = p;
+	int err;
 
-	dev->addr_assign_type &= ~NET_ADDR_RANDOM;
-	memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
+	err = eth_mac_addr(dev, p);
+	if (err)
+		return err;
 	rcu_read_lock();
 	list_for_each_entry_rcu(port, &team->port_list, list)
 		if (team->ops.port_change_mac)
@@ -1393,7 +1394,7 @@ static void team_setup(struct net_device *dev)
 	 * bring us to promisc mode in case a unicast addr is added.
 	 * Let this up to underlay drivers.
 	 */
-	dev->priv_flags |= IFF_UNICAST_FLT;
+	dev->priv_flags |= IFF_UNICAST_FLT | IFF_LIFE_ADDR_CHANGE;
 
 	dev->features |= NETIF_F_LLTX;
 	dev->features |= NETIF_F_GRO;
-- 
1.7.10.4

  parent reply	other threads:[~2012-06-28 14:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-28 14:10 [patch net-next 0/4] net: introduce and use IFF_LIFE_ADDR_CHANGE Jiri Pirko
2012-06-28 14:10 ` [patch net-next 1/4] net: introduce new priv_flag indicating iface capable of change mac when running Jiri Pirko
2012-06-28 15:24   ` Eric Dumazet
2012-06-28 20:32     ` Michael S. Tsirkin
2012-06-28 22:17   ` Ben Hutchings
2012-06-29  6:41     ` Jiri Pirko
2012-06-28 14:10 ` [patch net-next 2/4] virtio_net: use IFF_LIFE_ADDR_CHANGE priv_flag Jiri Pirko
2012-06-28 19:21   ` Michael S. Tsirkin
2012-06-28 14:10 ` Jiri Pirko [this message]
2012-06-28 14:10 ` [patch net-next 4/4] dummy: " Jiri Pirko
2012-06-28 15:15 ` [patch net-next 0/4] net: introduce and use IFF_LIFE_ADDR_CHANGE Richard Cochran
2012-06-28 15:41   ` 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=1340892639-1111-4-git-send-email-jpirko@redhat.com \
    --to=jpirko@redhat.com \
    --cc=danny.kukawka@bisect.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=shimoda.hiroaki@gmail.com \
    --cc=virtualization@lists.linux-foundation.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).