Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6683
b: refs/heads/master
c: 2a5391a
h: refs/heads/master
i:
  6681: bd957c0
  6679: cbcdcd2
v: v3
  • Loading branch information
Michael Ellerman authored and Jeff Garzik committed Sep 1, 2005
1 parent fd2f096 commit 29d487c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 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: 58c5900bdaffbf76afd7ad5e053410cb95eb3169
refs/heads/master: 2a5391a12297d1759b1c736634acb95793d43fb3
16 changes: 5 additions & 11 deletions trunk/drivers/net/iseries_veth.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ struct veth_port {

rwlock_t mcast_gate;
int promiscuous;
int all_mcast;
int num_mcast;
u64 mcast_addr[VETH_MAX_MCAST];
};
Expand Down Expand Up @@ -756,17 +755,15 @@ static void veth_set_multicast_list(struct net_device *dev)

write_lock_irqsave(&port->mcast_gate, flags);

if (dev->flags & IFF_PROMISC) { /* set promiscuous mode */
printk(KERN_INFO "%s: Promiscuous mode enabled.\n",
dev->name);
if ((dev->flags & IFF_PROMISC) || (dev->flags & IFF_ALLMULTI) ||
(dev->mc_count > VETH_MAX_MCAST)) {
port->promiscuous = 1;
} else if ( (dev->flags & IFF_ALLMULTI)
|| (dev->mc_count > VETH_MAX_MCAST) ) {
port->all_mcast = 1;
} else {
struct dev_mc_list *dmi = dev->mc_list;
int i;

port->promiscuous = 0;

/* Update table */
port->num_mcast = 0;

Expand Down Expand Up @@ -1145,12 +1142,9 @@ static inline int veth_frame_wanted(struct veth_port *port, u64 mac_addr)
if ( (mac_addr == port->mac_addr) || (mac_addr == 0xffffffffffff0000) )
return 1;

if (! (((char *) &mac_addr)[0] & 0x01))
return 0;

read_lock_irqsave(&port->mcast_gate, flags);

if (port->promiscuous || port->all_mcast) {
if (port->promiscuous) {
wanted = 1;
goto out;
}
Expand Down

0 comments on commit 29d487c

Please sign in to comment.