dect
/
linux-2.6
Archived
13
0
Fork 0

starfire VLAN fix

Recognized VLAN ids are set via writew(), should go in host-endian.
That's a long-standing bug, BTW - see http://lkml.org/lkml/2004/2/27/180
for example.  What happens is that card gets VLAN id table populated by
byteswapped values on little-endian boxen (so 257 works as expected, 256
and 258 do not, etc.).  Bug is easily reproduced, patch fixes it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Al Viro 2007-12-09 17:00:54 +00:00 committed by Jeff Garzik
parent 14c9d9b03b
commit 813820b9b9
1 changed files with 1 additions and 1 deletions

View File

@ -1742,7 +1742,7 @@ static void set_rx_mode(struct net_device *dev)
if (vlan_group_get_device(np->vlgrp, i)) {
if (vlan_count >= 32)
break;
writew(cpu_to_be16(i), filter_addr);
writew(i, filter_addr);
filter_addr += 16;
vlan_count++;
}