Re: [Bug 2905] New: Aironet 340 PCMCIA card not working since 2.6.7

From: Guennadi Liakhovetski
Date: Wed Jun 23 2004 - 14:56:19 EST


On Wed, 23 Jun 2004, Russell King wrote:

On Thu, Jun 17, 2004 at 09:58:32PM +0200, Guennadi Liakhovetski wrote:
Don't think it will help for this specific problem, but this patch fixes
alignment problem (especially seen on ARM, Russell:-)). Sending as a text
attachment, as my setup is known to mangle tabs...

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>

Can you forward this to Jeff Garzik please?

Jeff, please, apply to 2.6. It should also go into 2.4, it is quite trivial and is actually a bugfix. Don't know if it will aply to 2.4, if not, and if you prefer me to do it rather than do it yourself, I could rediff it against 2.4 too.

Thanks
Guennadi
---
Guennadi Liakhovetski
diff -u a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
--- a/drivers/net/wireless/airo.c 19 May 2004 16:06:36
+++ b/drivers/net/wireless/airo.c 17 Jun 2004 19:50:56
@@ -3151,11 +3151,12 @@
} else
hdrlen = ETH_ALEN * 2;

- skb = dev_alloc_skb( len + hdrlen + 2 );
+ skb = dev_alloc_skb( len + hdrlen + 2 + 2 );
if ( !skb ) {
apriv->stats.rx_dropped++;
goto badrx;
}
+ skb_reserve(skb, 2); /* This way the IP header is aligned */
buffer = (u16*)skb_put (skb, len + hdrlen);
if (test_bit(FLAG_802_11, &apriv->flags)) {
buffer[0] = fc;