[package] base-files: add an experimental "-c" flag which tries to preserve *all...
[openwrt.git] / target / linux / rdc / patches-2.6.32 / 015-r6040_fix_multicast.patch
1 ---
2 --- a/drivers/net/r6040.c
3 +++ b/drivers/net/r6040.c
4 @@ -136,7 +136,7 @@
5 #define RX_DESC_SIZE (RX_DCNT * sizeof(struct r6040_descriptor))
6 #define TX_DESC_SIZE (TX_DCNT * sizeof(struct r6040_descriptor))
7 #define MBCR_DEFAULT 0x012A /* MAC Bus Control Register */
8 -#define MCAST_MAX 4 /* Max number multicast addresses to filter */
9 +#define MCAST_MAX 3 /* Max number multicast addresses to filter */
10
11 /* Descriptor status */
12 #define DSC_OWNER_MAC 0x8000 /* MAC is the owner of this descriptor */
13 @@ -887,9 +887,6 @@ static void r6040_multicast_list(struct
14 crc >>= 26;
15 hash_table[crc >> 4] |= 1 << (15 - (crc & 0xf));
16 }
17 - /* Write the index of the hash table */
18 - for (i = 0; i < 4; i++)
19 - iowrite16(hash_table[i] << 14, ioaddr + MCR1);
20 /* Fill the MAC hash tables with their values */
21 iowrite16(hash_table[0], ioaddr + MAR0);
22 iowrite16(hash_table[1], ioaddr + MAR1);
23 @@ -905,9 +902,9 @@ static void r6040_multicast_list(struct
24 dmi = dmi->next;
25 }
26 for (i = dev->mc_count; i < MCAST_MAX; i++) {
27 - iowrite16(0xffff, ioaddr + MID_0L + 8*i);
28 - iowrite16(0xffff, ioaddr + MID_0M + 8*i);
29 - iowrite16(0xffff, ioaddr + MID_0H + 8*i);
30 + iowrite16(0xffff, ioaddr + MID_1L + 8 * i);
31 + iowrite16(0xffff, ioaddr + MID_1M + 8 * i);
32 + iowrite16(0xffff, ioaddr + MID_1H + 8 * i);
33 }
34 }
35
This page took 0.043879 seconds and 5 git commands to generate.