[PATCH 14/48] libertas: fix data packet size errors

David Woodhouse dwmw2 at infradead.org
Mon Dec 10 11:03:26 EST 2007


On Mon, 2007-12-10 at 16:49 +0100, Michael Buesch wrote:
> > +             u16 sz = cpu_to_le16(resp->size) - S_DS_GEN;
> 
> Whoops, something's wrong here.
> You are subtracting from a LE value.

It should have been le16_to_cpu(), not cpu_to_le16(). It works as it is
on all real hardware, although it makes sparse unhappy. Holger later
fixed a bunch of such things (including this one along with some _real_
errors) in patch #21.

-- 
dwmw2




More information about the libertas-dev mailing list