Commit d546320d authored by Roger Luethi's avatar Roger Luethi Committed by Jeff Garzik

[PATCH] mc_filter on big-endian arch

On Sat, 19 Jun 2004 17:37:37 -0400, Jeff Garzik wrote:
> you would be kind enough to resend the non-via-rhine patches WRT mc_filter?

Sure. Patch is for 2.6 (not rediffed, yell if it doesn't apply
anymore). Btw, did you pick up the mc_filter patch for 2.4 via-rhine?

This untested patch fixes hardware mc filters for tulip_core, winbond,
and atp. Hopefully :-).

Please review and test.
Signed-off-by: default avatarRoger Luethi <rl@hellgate.ch>
parent e7f10a52
...@@ -909,7 +909,7 @@ static void set_rx_mode_8012(struct net_device *dev) ...@@ -909,7 +909,7 @@ static void set_rx_mode_8012(struct net_device *dev)
i++, mclist = mclist->next) i++, mclist = mclist->next)
{ {
int filterbit = ether_crc_le(ETH_ALEN, mclist->dmi_addr) & 0x3f; int filterbit = ether_crc_le(ETH_ALEN, mclist->dmi_addr) & 0x3f;
mc_filter[filterbit >> 5] |= cpu_to_le32(1 << (filterbit & 31)); mc_filter[filterbit >> 5] |= 1 << (filterbit & 31);
} }
new_mode = CMR2h_Normal; new_mode = CMR2h_Normal;
} }
......
...@@ -1059,7 +1059,7 @@ static void set_rx_mode(struct net_device *dev) ...@@ -1059,7 +1059,7 @@ static void set_rx_mode(struct net_device *dev)
else else
filterbit = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26; filterbit = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;
filterbit &= 0x3f; filterbit &= 0x3f;
mc_filter[filterbit >> 5] |= cpu_to_le32(1 << (filterbit & 31)); mc_filter[filterbit >> 5] |= 1 << (filterbit & 31);
if (tulip_debug > 2) { if (tulip_debug > 2) {
printk(KERN_INFO "%s: Added filter for %2.2x:%2.2x:%2.2x:" printk(KERN_INFO "%s: Added filter for %2.2x:%2.2x:%2.2x:"
"%2.2x:%2.2x:%2.2x %8.8x bit %d.\n", dev->name, "%2.2x:%2.2x:%2.2x %8.8x bit %d.\n", dev->name,
......
...@@ -1424,7 +1424,7 @@ static u32 __set_rx_mode(struct net_device *dev) ...@@ -1424,7 +1424,7 @@ static u32 __set_rx_mode(struct net_device *dev)
i++, mclist = mclist->next) { i++, mclist = mclist->next) {
int filterbit = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26) ^ 0x3F; int filterbit = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26) ^ 0x3F;
filterbit &= 0x3f; filterbit &= 0x3f;
mc_filter[filterbit >> 5] |= cpu_to_le32(1 << (filterbit & 31)); mc_filter[filterbit >> 5] |= 1 << (filterbit & 31);
} }
rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment