Danny Kukawka
2012-Feb-21 12:07 UTC
[Bridge] [PATCH 0/4] Part 1: unify return value of .ndo_set_mac_address if address is invalid
Here a series of patches to unifiy the return value of .ndo_set_mac_address if the given address isn't valid. Return -EADDRNOTAVAIL as eth_mac_addr() and other .ndo_set_mac_address functions already do if is_valid_ether_addr() fails. Other patches will follow if this set gets accepted. The patches are against the net-next git tree. Danny Kukawka (4): ethernet: unify return value of .ndo_set_mac_address if address is invalid mcs7830: unify return value of .ndo_set_mac_address if address is invalid Staging: et131x: unify return value of .ndo_set_mac_address if address is invalid br_device: unify return value of .ndo_set_mac_address if address is invalid drivers/net/ethernet/aeroflex/greth.c | 2 +- drivers/net/ethernet/broadcom/bnx2.c | 2 +- drivers/net/ethernet/broadcom/tg3.c | 2 +- drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +- .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 2 +- drivers/net/ethernet/dlink/sundance.c | 2 +- drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +- drivers/net/ethernet/marvell/pxa168_eth.c | 2 +- drivers/net/ethernet/neterion/s2io.c | 2 +- drivers/net/ethernet/pasemi/pasemi_mac.c | 2 +- .../net/ethernet/qlogic/netxen/netxen_nic_main.c | 2 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 +- drivers/net/ethernet/sfc/efx.c | 2 +- drivers/net/ethernet/sun/niu.c | 2 +- drivers/net/ethernet/ti/davinci_emac.c | 2 +- drivers/net/ethernet/tile/tilepro.c | 2 +- drivers/net/ethernet/tundra/tsi108_eth.c | 2 +- drivers/net/usb/mcs7830.c | 2 +- drivers/staging/et131x/et131x.c | 2 +- net/bridge/br_device.c | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) -- 1.7.8.3
Danny Kukawka
2012-Feb-21 12:07 UTC
[Bridge] [PATCH 4/4] br_device: unify return value of .ndo_set_mac_address if address is invalid
Unify return value of .ndo_set_mac_address if the given address isn't valid. Return -EADDRNOTAVAIL as eth_mac_addr() already does if is_valid_ether_addr() fails. Signed-off-by: Danny Kukawka <danny.kukawka at bisect.de> --- net/bridge/br_device.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index a157bf8..ba829de 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c @@ -167,7 +167,7 @@ static int br_set_mac_address(struct net_device *dev, void *p) struct sockaddr *addr = p; if (!is_valid_ether_addr(addr->sa_data)) - return -EINVAL; + return -EADDRNOTAVAIL; spin_lock_bh(&br->lock); if (compare_ether_addr(dev->dev_addr, addr->sa_data)) { -- 1.7.8.3
David Miller
2012-Feb-23 22:12 UTC
[Bridge] [PATCH 0/4] Part 1: unify return value of .ndo_set_mac_address if address is invalid
From: Danny Kukawka <danny.kukawka at bisect.de> Date: Tue, 21 Feb 2012 13:07:48 +0100> Here a series of patches to unifiy the return value of > .ndo_set_mac_address if the given address isn't valid. > Return -EADDRNOTAVAIL as eth_mac_addr() and other > .ndo_set_mac_address functions already do if is_valid_ether_addr() > fails. > > Other patches will follow if this set gets accepted.All applied to net-next, thanks.