public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* SiS900 driver multicast problems and patch.
@ 2003-10-28  8:40 Lars Knudsen
  2003-10-28  9:17 ` Måns Rullgård
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Knudsen @ 2003-10-28  8:40 UTC (permalink / raw)
  To: linux-kernel, mufasa

After upgrading to kernel 2.4.22 we discovered that multicast was no 
longer handled properly by the SiS900. Examining the changes between 
2.4.19 and 2.4.22 it is clear that the handling of multicast was changed 
but a bug was introduced.

A simple set_bit call from 2.4.19 was changed to the following:

u16 mc_filter[16] = {0};

unsigned int bit_nr =
         sis900_mcast_bitnr(mclist->dmi_addr, revision);
          mc_filter[bit_nr >> 4] |= (1 << bit_nr);

This will not work for bit_nr larger than 16 and hence the failure. 
Reverting to use set_bit causes multicast to be handled properly.

\Lars Knudsen

--- sis900.c    Mon Oct 27 17:49:36 2003
+++ sis900.c.orig       Mon Oct 27 17:48:52 2003
@@ -2101,8 +2101,9 @@
                rx_mode = RFAAB;
                for (i = 0, mclist = net_dev->mc_list; mclist && i < 
net_dev->mc_count;
                     i++, mclist = mclist->next) {
-                       set_bit(sis900_mcast_bitnr(mclist->dmi_addr, 
revision),
-                               mc_filter);
+                       unsigned int bit_nr =
+                               sis900_mcast_bitnr(mclist->dmi_addr, 
revision);
+                       mc_filter[bit_nr >> 4] |= (1 << bit_nr);
                }
        }



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-28  9:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-28  8:40 SiS900 driver multicast problems and patch Lars Knudsen
2003-10-28  9:17 ` Måns Rullgård
2003-10-28  9:35   ` Lars Knudsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox