On Sunday 10 June 2007 11:54:11 Michael Buesch wrote:
> > +int netxen_nic_set_mcast_addr(struct netxen_adapter *adapter, int index, 
> > +                           u8 *addr)
> > +{
> > +   u32 hi = 0;
> > +   u32 lo = 0;
> > +   u16 port = physical_port[adapter->portnum];
> > +
> > +   hi = (u32) addr[0] | 
> > +           ((u32) addr[1] << 8) |
> > +           ((u32) addr[2] << 16);
> > +   lo = (u32) addr[3] |
> > +           ((u32) addr[4] << 8) |
> > +           ((u32) addr[5] << 16);
> 
> That is the correct solution. Do that above, too.
> 
> > +   netxen_crb_writelit_adapter(adapter, NETXEN_MCAST_ADDR(port,index), hi);
> > +   netxen_crb_writelit_adapter(adapter, NETXEN_MCAST_ADDR(port,index) + 4,
> > +                                   hi);
> > +   return 0;
> > +}

Well, actually no. It is broken, too. You write hi twice. And I would
swap the variable names, as "low" is addr[0] in my understanding.



-- 
Greetings Michael.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to