ray_cs fixes
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 29 Dec 2007 09:55:50 +0000 (04:55 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:08:55 +0000 (15:08 -0800)
commit7698d6977a62bbc6ed3b9d0d0230f2213a3b2f9d
treee7ea75cdb6ec548e3c31a71f26410e9d1892d512
parent1edd3a555304a266e76bbc6cbe04f446fdd7940b
ray_cs fixes

bugs galore:
* 0xf380 instead of htons(ETH_P_AARP), etc.  Works only on l-e.
* back in 2.3.20 driver got readb() and friends instead of
direct dereferencing of iomem.  Somebody got too enthusiatic and replaced
ntohs(p->mrx_overflow)
with
ntohs(read(&p->mrx_overflow)
without noticing that (a) the sucker is 16bit and (b) that expression can't possibly
be portable anyway (hell, on l-e it's always less than 256, on b-e it's always a
multiple of 256).  Proper fix is
swab16(readw(&p->mrx_overflow)
taking into account the conversion done by readw() itself.  That crap happened
in several places; the same fix applies.
* untranslate() assumes little-endian almost everywhere, except for
the code checking for IPX/AARP packets; there we forgot ntohs(), so that part
only works on big-endian.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ray_cs.c
This page took 0.025576 seconds and 5 git commands to generate.