aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/starfire.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-12-09 12:00:54 -0500
committerJeff Garzik <jeff@garzik.org>2007-12-14 15:26:04 -0500
commit813820b9b9adb98d4ad3cd7434eb662b0fc15684 (patch)
tree21279f6910e943155de235bb416c230a4ae083e5 /drivers/net/starfire.c
parent14c9d9b03bb8ec63c77aebddea9a6f730f1b62d5 (diff)
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>
Diffstat (limited to 'drivers/net/starfire.c')
-rw-r--r--drivers/net/starfire.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
index bcc430bd9e49..6e00dc857afa 100644
--- a/drivers/net/starfire.c
+++ b/drivers/net/starfire.c
@@ -1742,7 +1742,7 @@ static void set_rx_mode(struct net_device *dev)
1742 if (vlan_group_get_device(np->vlgrp, i)) { 1742 if (vlan_group_get_device(np->vlgrp, i)) {
1743 if (vlan_count >= 32) 1743 if (vlan_count >= 32)
1744 break; 1744 break;
1745 writew(cpu_to_be16(i), filter_addr); 1745 writew(i, filter_addr);
1746 filter_addr += 16; 1746 filter_addr += 16;
1747 vlan_count++; 1747 vlan_count++;
1748 } 1748 }