Skip to content

Commit

Permalink
Merge branch 'ndo_set_config'
Browse files Browse the repository at this point in the history
Florian Fainelli says:

====================
net: ndo_set_config/ifmap cleanups

This patch series removes a bunch of useless ndo_set_config in non
PCMCIA Ethernet drivers.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Apr 21, 2014
2 parents 5b54dac + 2d7f2f9 commit 5a9d19a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 77 deletions.
6 changes: 0 additions & 6 deletions drivers/net/ethernet/ethoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,11 +769,6 @@ static int ethoc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return phy_mii_ioctl(phy, ifr, cmd);
}

static int ethoc_config(struct net_device *dev, struct ifmap *map)
{
return -ENOSYS;
}

static void ethoc_do_set_mac_address(struct net_device *dev)
{
struct ethoc *priv = netdev_priv(dev);
Expand Down Expand Up @@ -995,7 +990,6 @@ static const struct net_device_ops ethoc_netdev_ops = {
.ndo_open = ethoc_open,
.ndo_stop = ethoc_stop,
.ndo_do_ioctl = ethoc_ioctl,
.ndo_set_config = ethoc_config,
.ndo_set_mac_address = ethoc_set_mac_address,
.ndo_set_rx_mode = ethoc_set_multicast_list,
.ndo_change_mtu = ethoc_change_mtu,
Expand Down
35 changes: 0 additions & 35 deletions drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1909,40 +1909,6 @@ static void sxgbe_set_rx_mode(struct net_device *dev)
readl(ioaddr + SXGBE_HASH_LOW));
}

/**
* sxgbe_config - entry point for changing configuration mode passed on by
* ifconfig
* @dev : pointer to the device structure
* @map : pointer to the device mapping structure
* Description:
* This function is a driver entry point which gets called by the kernel
* whenever some device configuration is changed.
* Return value:
* This function returns 0 if success and appropriate error otherwise.
*/
static int sxgbe_config(struct net_device *dev, struct ifmap *map)
{
struct sxgbe_priv_data *priv = netdev_priv(dev);

/* Can't act on a running interface */
if (dev->flags & IFF_UP)
return -EBUSY;

/* Don't allow changing the I/O address */
if (map->base_addr != (unsigned long)priv->ioaddr) {
netdev_warn(dev, "can't change I/O address\n");
return -EOPNOTSUPP;
}

/* Don't allow changing the IRQ */
if (map->irq != priv->irq) {
netdev_warn(dev, "not change IRQ number %d\n", priv->irq);
return -EOPNOTSUPP;
}

return 0;
}

#ifdef CONFIG_NET_POLL_CONTROLLER
/**
* sxgbe_poll_controller - entry point for polling receive by device
Expand Down Expand Up @@ -2004,7 +1970,6 @@ static const struct net_device_ops sxgbe_netdev_ops = {
.ndo_set_rx_mode = sxgbe_set_rx_mode,
.ndo_tx_timeout = sxgbe_tx_timeout,
.ndo_do_ioctl = sxgbe_ioctl,
.ndo_set_config = sxgbe_config,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = sxgbe_poll_controller,
#endif
Expand Down
22 changes: 0 additions & 22 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2214,27 +2214,6 @@ static void stmmac_tx_timeout(struct net_device *dev)
stmmac_tx_err(priv);
}

/* Configuration changes (passed on by ifconfig) */
static int stmmac_config(struct net_device *dev, struct ifmap *map)
{
if (dev->flags & IFF_UP) /* can't act on a running interface */
return -EBUSY;

/* Don't allow changing the I/O address */
if (map->base_addr != dev->base_addr) {
pr_warn("%s: can't change I/O address\n", dev->name);
return -EOPNOTSUPP;
}

/* Don't allow changing the IRQ */
if (map->irq != dev->irq) {
pr_warn("%s: not change IRQ number %d\n", dev->name, dev->irq);
return -EOPNOTSUPP;
}

return 0;
}

/**
* stmmac_set_rx_mode - entry point for multicast addressing
* @dev : pointer to the device structure
Expand Down Expand Up @@ -2600,7 +2579,6 @@ static const struct net_device_ops stmmac_netdev_ops = {
.ndo_set_rx_mode = stmmac_set_rx_mode,
.ndo_tx_timeout = stmmac_tx_timeout,
.ndo_do_ioctl = stmmac_ioctl,
.ndo_set_config = stmmac_config,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = stmmac_poll_controller,
#endif
Expand Down
14 changes: 0 additions & 14 deletions drivers/net/ethernet/ti/cpmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,19 +313,6 @@ static int mii_irqs[PHY_MAX_ADDR] = { PHY_POLL, };

static struct mii_bus *cpmac_mii;

static int cpmac_config(struct net_device *dev, struct ifmap *map)
{
if (dev->flags & IFF_UP)
return -EBUSY;

/* Don't allow changing the I/O address */
if (map->base_addr != dev->base_addr)
return -EOPNOTSUPP;

/* ignore other fields */
return 0;
}

static void cpmac_set_multicast_list(struct net_device *dev)
{
struct netdev_hw_addr *ha;
Expand Down Expand Up @@ -1100,7 +1087,6 @@ static const struct net_device_ops cpmac_netdev_ops = {
.ndo_tx_timeout = cpmac_tx_timeout,
.ndo_set_rx_mode = cpmac_set_multicast_list,
.ndo_do_ioctl = cpmac_ioctl,
.ndo_set_config = cpmac_config,
.ndo_change_mtu = eth_change_mtu,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
Expand Down

0 comments on commit 5a9d19a

Please sign in to comment.