Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c867b55e authored by Joachim Eastwood's avatar Joachim Eastwood Committed by David S. Miller
Browse files

net/ethernet: remove useless is_valid_ether_addr from drivers ndo_open



If ndo_validate_addr is set to the generic eth_validate_addr
function there is no point in calling is_valid_ether_addr
from driver ndo_open if ndo_open is not used elsewhere in
the driver.

With this change is_valid_ether_addr will be called from the
generic eth_validate_addr function. So there should be no change
in the actual behavior.

Signed-off-by: default avatarJoachim Eastwood <manabian@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ae4b46e9
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -463,12 +463,6 @@ etherh_open(struct net_device *dev)
{
	struct ei_device *ei_local = netdev_priv(dev);

	if (!is_valid_ether_addr(dev->dev_addr)) {
		printk(KERN_WARNING "%s: invalid ethernet MAC address\n",
			dev->name);
		return -EINVAL;
	}

	if (request_irq(dev->irq, __ei_interrupt, 0, dev->name, dev))
		return -EAGAIN;

+0 −3
Original line number Diff line number Diff line
@@ -97,9 +97,6 @@ static int at91ether_open(struct net_device *dev)
	u32 ctl;
	int ret;

	if (!is_valid_ether_addr(dev->dev_addr))
		return -EADDRNOTAVAIL;

	/* Clear internal statistics */
	ctl = macb_readl(lp, NCR);
	macb_writel(lp, NCR, ctl | MACB_BIT(CLRSTAT));
+0 −3
Original line number Diff line number Diff line
@@ -1215,9 +1215,6 @@ static int macb_open(struct net_device *dev)
	if (!bp->phy_dev)
		return -EAGAIN;

	if (!is_valid_ether_addr(dev->dev_addr))
		return -EADDRNOTAVAIL;

	err = macb_alloc_consistent(bp);
	if (err) {
		netdev_err(dev, "Unable to allocate DMA memory (error %d)\n",
+0 −3
Original line number Diff line number Diff line
@@ -664,9 +664,6 @@ static int dnet_open(struct net_device *dev)
	if (!bp->phy_dev)
		return -EAGAIN;

	if (!is_valid_ether_addr(dev->dev_addr))
		return -EADDRNOTAVAIL;

	napi_enable(&bp->napi);
	dnet_init_hw(bp);

+0 −6
Original line number Diff line number Diff line
@@ -638,12 +638,6 @@ ether1_txalloc (struct net_device *dev, int size)
static int
ether1_open (struct net_device *dev)
{
	if (!is_valid_ether_addr(dev->dev_addr)) {
		printk(KERN_WARNING "%s: invalid ethernet MAC address\n",
			dev->name);
		return -EINVAL;
	}

	if (request_irq(dev->irq, ether1_interrupt, 0, "ether1", dev))
		return -EAGAIN;

Loading