Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89827
b: refs/heads/master
c: 95a3635
h: refs/heads/master
i:
  89825: 4609b4b
  89823: 8efb693
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Feb 29, 2008
1 parent cc8980b commit 2e162b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd80eb942ad9761f241c9b287b3b9a342b20690d
refs/heads/master: 95a363582b69bec53bc73ff2100dfc344bd23098
37 changes: 6 additions & 31 deletions trunk/net/core/dev_mcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,39 +156,14 @@ void dev_mc_unsync(struct net_device *to, struct net_device *from)
EXPORT_SYMBOL(dev_mc_unsync);

#ifdef CONFIG_PROC_FS
static void *dev_mc_seq_start(struct seq_file *seq, loff_t *pos)
__acquires(dev_base_lock)
{
struct net *net = seq_file_net(seq);
struct net_device *dev;
loff_t off = 0;

read_lock(&dev_base_lock);
for_each_netdev(net, dev) {
if (off++ == *pos)
return dev;
}
return NULL;
}

static void *dev_mc_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
++*pos;
return next_net_device((struct net_device *)v);
}

static void dev_mc_seq_stop(struct seq_file *seq, void *v)
__releases(dev_base_lock)
{
read_unlock(&dev_base_lock);
}


static int dev_mc_seq_show(struct seq_file *seq, void *v)
{
struct dev_addr_list *m;
struct net_device *dev = v;

if (v == SEQ_START_TOKEN)
return 0;

netif_tx_lock_bh(dev);
for (m = dev->mc_list; m; m = m->next) {
int i;
Expand All @@ -206,9 +181,9 @@ static int dev_mc_seq_show(struct seq_file *seq, void *v)
}

static const struct seq_operations dev_mc_seq_ops = {
.start = dev_mc_seq_start,
.next = dev_mc_seq_next,
.stop = dev_mc_seq_stop,
.start = dev_seq_start,
.next = dev_seq_next,
.stop = dev_seq_stop,
.show = dev_mc_seq_show,
};

Expand Down

0 comments on commit 2e162b5

Please sign in to comment.