summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-04-05 04:55:58 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-04-05 04:55:58 +0000
commit74a9f2e1b4d3ab45a9f72cb5b556c9f521524ab3 (patch)
tree7c4cdb103ab1b388c9852a88bd6fb1e73eba0b5c /drivers/net/bonding.c
parentee6374c8b0d333c08061c6a97bc77090d7461225 (diff)
Merge with Linux 2.4.3.
Note that mingetty does no longer work with serial console, you have to switch to another getty like getty_ps. This commit also includes a fix for a setitimer bug which did prevent getty_ps from working on older kernels.
Diffstat (limited to 'drivers/net/bonding.c')
-rw-r--r--drivers/net/bonding.c35
1 files changed, 7 insertions, 28 deletions
diff --git a/drivers/net/bonding.c b/drivers/net/bonding.c
index 5bc9797a1..2442de9dc 100644
--- a/drivers/net/bonding.c
+++ b/drivers/net/bonding.c
@@ -60,12 +60,6 @@ static struct net_device_stats *bond_get_stats(struct net_device *dev);
static struct net_device *this_bond;
-static int bond_open(struct net_device *dev)
-{
- MOD_INC_USE_COUNT;
- return 0;
-}
-
static void release_one_slave(struct net_device *master, slave_t *slave)
{
bonding_t *bond = master->priv;
@@ -81,7 +75,6 @@ static void release_one_slave(struct net_device *master, slave_t *slave)
dev_put(slave->dev);
kfree(slave);
- MOD_DEC_USE_COUNT;
}
static int bond_close(struct net_device *master)
@@ -92,21 +85,11 @@ static int bond_close(struct net_device *master)
while ((slave = bond->next) != (slave_t*)bond)
release_one_slave(master, slave);
- MOD_DEC_USE_COUNT;
return 0;
}
static void bond_set_multicast_list(struct net_device *master)
{
- bonding_t *bond = master->priv;
- slave_t *slave;
-
- for (slave = bond->next; slave != (slave_t*)bond; slave = slave->next) {
- slave->dev->mc_list = master->mc_list;
- slave->dev->mc_count = master->mc_count;
- slave->dev->flags = master->flags;
- slave->dev->set_multicast_list(slave->dev);
- }
}
static int bond_enslave(struct net_device *master, struct net_device *dev)
@@ -142,7 +125,6 @@ static int bond_enslave(struct net_device *master, struct net_device *dev)
spin_unlock_bh(&master->xmit_lock);
- MOD_INC_USE_COUNT;
return 0;
}
@@ -210,9 +192,7 @@ static int bond_event(struct notifier_block *this, unsigned long event, void *pt
}
static struct notifier_block bond_netdev_notifier={
- bond_event,
- NULL,
- 0
+ notifier_call: bond_event
};
static int __init bond_init(struct net_device *dev)
@@ -233,7 +213,6 @@ static int __init bond_init(struct net_device *dev)
/* Initialize the device structure. */
dev->hard_start_xmit = bond_xmit;
dev->get_stats = bond_get_stats;
- dev->open = bond_open;
dev->stop = bond_close;
dev->set_multicast_list = bond_set_multicast_list;
dev->do_ioctl = bond_ioctl;
@@ -289,20 +268,20 @@ static struct net_device_stats *bond_get_stats(struct net_device *dev)
return &bond->stats;
}
-static struct net_device dev_bond = {
- "",
- 0, 0, 0, 0,
- 0x0, 0,
- 0, 0, 0, NULL, bond_init };
+static struct net_device dev_bond;
static int __init bonding_init(void)
{
/* Find a name for this unit */
- int err=dev_alloc_name(&dev_bond,"bond%d");
+ int err;
+
+ dev_bond.init = bond_init;
+ err = dev_alloc_name(&dev_bond,"bond%d");
if (err<0)
return err;
+ SET_MODULE_OWNER(&dev_bond);
if (register_netdev(&dev_bond) != 0)
return -EIO;