summaryrefslogtreecommitdiff
path: root/net/ethernet
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2012-06-29 05:10:05 +0000
committerDavid S. Miller <davem@davemloft.net>2012-06-30 01:08:00 -0700
commitbb35f67195fcdbe79faa7a15ce148a67c9ab923d (patch)
treed02ca3cb76bec3d9f0c86b0a44c49478e5e9c0d1 /net/ethernet
parent03292745b02d1166e2a215504407e096b8427be5 (diff)
downloadlwn-bb35f67195fcdbe79faa7a15ce148a67c9ab923d.tar.gz
lwn-bb35f67195fcdbe79faa7a15ce148a67c9ab923d.zip
net: introduce new priv_flag indicating iface capable of change mac when running
Introduce IFF_LIVE_ADDR_CHANGE priv_flag and use it to disable netif_running() check in eth_mac_addr() Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethernet')
-rw-r--r--net/ethernet/eth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 36e58800a9e3..db6a6c17d790 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -283,7 +283,7 @@ int eth_mac_addr(struct net_device *dev, void *p)
{
struct sockaddr *addr = p;
- if (netif_running(dev))
+ if (!(dev->priv_flags & IFF_LIVE_ADDR_CHANGE) && netif_running(dev))
return -EBUSY;
if (!is_valid_ether_addr(addr->sa_data))
return -EADDRNOTAVAIL;