[PATCH] libertas: revert CAPINFO_MASK to its original value

Dan Williams dcbw at redhat.com
Tue Jul 17 13:42:53 EDT 2007


On Tue, 2007-07-17 at 10:31 -0700, Luis Carlos Cobo wrote:
> On 7/17/07, David Woodhouse <dwmw2 at infradead.org> wrote:
> > Is this going to work correctly on big-endian machines too?
> 
> We save the capability vector from the scan with
> 
> bss->capability = le16_to_cpup((void *) pos);
> 
> and then after ANDing it with CAPINFO_MASK we convert it again from
> cpu to le16 before passing it to the firmware, so I would say we need
> to adapt the mask for big endian. It would be great If you have some
> big endian box around and can test it

I don't think we do need to do anything endian for it, but I could be
wrong.  In the driver, we will always store capability as CPU byte
order.  And the constant will always be in CPU byte order too, so
AND-ing the two should work.

The problem was that in the absence of information about what
CAPINFO_MASK actually was masking out, I made the wrong choice about
which of the constants to keep around.  I think it'll be OK if we just
take your patch, though I'm not 100% sure.

Dan





More information about the libertas-dev mailing list