Subject: b44: regression in 2.6.22

From: Stephen Hemminger <[email-masked]>
Date: Fri, 25 May 2007 17:24:31 -0700

Something is broken with the b44 driver in 2.6.22-rc1 or later. Now bisecting.
The performance (with iperf) for receiving is normally 94Mbits or more.
But something happened that dropped performance to less than 1Mbit,
probably corrupted packets.

There is nothing obvious in the commit log for drivers/net/b44.c, so it
probably is something more general.

Looking at the code in b44_rx(), I see a couple unrelated of bugs:
1. In the small packet case it recycles the skb before copying data out... 
   Not good if new data arrives overwriting existing data.

2. Macros like RX_PKT_BUF_SZ that depend on local variables are evil!!

-- 
Stephen Hemminger <[email-masked]>