git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
net
/
eql.c
diff --git
a/drivers/net/eql.c
b/drivers/net/eql.c
index
aa15691
..
a93700e
100644
(file)
--- a/
drivers/net/eql.c
+++ b/
drivers/net/eql.c
@@
-8,7
+8,7
@@
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
- *
+ *
* The author may be reached as simon@ncm.com, or C/O
* NCM
* Attn: Simon Janes
* The author may be reached as simon@ncm.com, or C/O
* NCM
* Attn: Simon Janes
@@
-23,7
+23,7
@@
* Inspirations:
* The Harried and Overworked Alan Cox
* Conspiracies:
* Inspirations:
* The Harried and Overworked Alan Cox
* Conspiracies:
- * The Alan Cox and Mike McLagan plot to get someone else to do the code,
+ * The Alan Cox and Mike McLagan plot to get someone else to do the code,
* which turned out to be me.
*/
* which turned out to be me.
*/
@@
-138,7
+138,7
@@
static void eql_timer(unsigned long param)
{
equalizer_t *eql = (equalizer_t *) param;
struct list_head *this, *tmp, *head;
{
equalizer_t *eql = (equalizer_t *) param;
struct list_head *this, *tmp, *head;
-
+
spin_lock_bh(&eql->queue.lock);
head = &eql->queue.all_slaves;
list_for_each_safe(this, tmp, head) {
spin_lock_bh(&eql->queue.lock);
head = &eql->queue.all_slaves;
list_for_each_safe(this, tmp, head) {
@@
-159,7
+159,7
@@
static void eql_timer(unsigned long param)
add_timer(&eql->timer);
}
add_timer(&eql->timer);
}
-static char version[] __initdata =
+static char version[] __initdata =
"Equalizer2002: Simon Janes (simon@ncm.com) and David S. Miller (davem@redhat.com)\n";
static void __init eql_setup(struct net_device *dev)
"Equalizer2002: Simon Janes (simon@ncm.com) and David S. Miller (davem@redhat.com)\n";
static void __init eql_setup(struct net_device *dev)
@@
-182,12
+182,12
@@
static void __init eql_setup(struct net_device *dev)
dev->do_ioctl = eql_ioctl;
dev->hard_start_xmit = eql_slave_xmit;
dev->get_stats = eql_get_stats;
dev->do_ioctl = eql_ioctl;
dev->hard_start_xmit = eql_slave_xmit;
dev->get_stats = eql_get_stats;
-
+
/*
* Now we undo some of the things that eth_setup does
/*
* Now we undo some of the things that eth_setup does
- * that we don't like
+ * that we don't like
*/
*/
-
+
dev->mtu = EQL_DEFAULT_MTU; /* set to 576 in if_eql.h */
dev->flags = IFF_MASTER;
dev->mtu = EQL_DEFAULT_MTU; /* set to 576 in if_eql.h */
dev->flags = IFF_MASTER;
@@
-203,8
+203,7
@@
static int eql_open(struct net_device *dev)
printk(KERN_INFO "%s: remember to turn off Van-Jacobson compression on "
"your slave devices.\n", dev->name);
printk(KERN_INFO "%s: remember to turn off Van-Jacobson compression on "
"your slave devices.\n", dev->name);
- if (!list_empty(&eql->queue.all_slaves))
- BUG();
+ BUG_ON(!list_empty(&eql->queue.all_slaves));
eql->min_slaves = 1;
eql->max_slaves = EQL_DEFAULT_MAX_SLAVES; /* 4 usually... */
eql->min_slaves = 1;
eql->max_slaves = EQL_DEFAULT_MAX_SLAVES; /* 4 usually... */
@@
-224,7
+223,7
@@
static void eql_kill_one_slave(slave_queue_t *queue, slave_t *slave)
}
static void eql_kill_slave_queue(slave_queue_t *queue)
}
static void eql_kill_slave_queue(slave_queue_t *queue)
-{
+{
struct list_head *head, *tmp, *this;
spin_lock_bh(&queue->lock);
struct list_head *head, *tmp, *this;
spin_lock_bh(&queue->lock);
@@
-245,7
+244,7
@@
static int eql_close(struct net_device *dev)
/*
* The timer has to be stopped first before we start hacking away
/*
* The timer has to be stopped first before we start hacking away
- * at the data structure it scans every so often...
+ * at the data structure it scans every so often...
*/
del_timer_sync(&eql->timer);
*/
del_timer_sync(&eql->timer);
@@
-265,7
+264,7
@@
static int eql_g_master_cfg(struct net_device *dev, master_config_t __user *mc);
static int eql_s_master_cfg(struct net_device *dev, master_config_t __user *mc);
static int eql_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
static int eql_s_master_cfg(struct net_device *dev, master_config_t __user *mc);
static int eql_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
-{
+{
if (cmd != EQL_GETMASTRCFG && cmd != EQL_GETSLAVECFG &&
!capable(CAP_NET_ADMIN))
return -EPERM;
if (cmd != EQL_GETMASTRCFG && cmd != EQL_GETSLAVECFG &&
!capable(CAP_NET_ADMIN))
return -EPERM;
@@
-301,15
+300,15
@@
static slave_t *__eql_schedule_slaves(slave_queue_t *queue)
head = &queue->all_slaves;
list_for_each_safe(this, tmp, head) {
slave_t *slave = list_entry(this, slave_t, list);
head = &queue->all_slaves;
list_for_each_safe(this, tmp, head) {
slave_t *slave = list_entry(this, slave_t, list);
- unsigned long slave_load, bytes_queued, priority_Bps;
+ unsigned long slave_load, bytes_queued, priority_Bps;
/* Go through the slave list once, updating best_slave
* whenever a new best_load is found.
*/
bytes_queued = slave->bytes_queued;
/* Go through the slave list once, updating best_slave
* whenever a new best_load is found.
*/
bytes_queued = slave->bytes_queued;
- priority_Bps = slave->priority_Bps;
+ priority_Bps = slave->priority_Bps;
if ((slave->dev->flags & IFF_UP) == IFF_UP) {
if ((slave->dev->flags & IFF_UP) == IFF_UP) {
- slave_load = (~0UL - (~0UL / 2)) -
+ slave_load = (~0UL - (~0UL / 2)) -
(priority_Bps) + bytes_queued * 8;
if (slave_load < best_load) {
(priority_Bps) + bytes_queued * 8;
if (slave_load < best_load) {
@@
-337,13
+336,13
@@
static int eql_slave_xmit(struct sk_buff *skb, struct net_device *dev)
skb->dev = slave_dev;
skb->priority = 1;
skb->dev = slave_dev;
skb->priority = 1;
- slave->bytes_queued += skb->len;
+ slave->bytes_queued += skb->len;
dev_queue_xmit(skb);
eql->stats.tx_packets++;
} else {
eql->stats.tx_dropped++;
dev_kfree_skb(skb);
dev_queue_xmit(skb);
eql->stats.tx_packets++;
} else {
eql->stats.tx_dropped++;
dev_kfree_skb(skb);
- }
+ }
spin_unlock(&eql->queue.lock);
spin_unlock(&eql->queue.lock);
@@
-597,7
+596,7
@@
static int __init eql_init_module(void)
return -ENOMEM;
err = register_netdev(dev_eql);
return -ENOMEM;
err = register_netdev(dev_eql);
- if (err)
+ if (err)
free_netdev(dev_eql);
return err;
}
free_netdev(dev_eql);
return err;
}