From: Zhu Yi Date: Wed, 20 Dec 2006 08:11:58 +0000 (+0800) Subject: [PATCH] ipw2100: Fix dropping fragmented small packet problem X-Git-Tag: v2.6.20-rc5~34^2~9^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe5f8e2a1c5c040209c598a28e19c55f30e1040d;p=linux-2.6 [PATCH] ipw2100: Fix dropping fragmented small packet problem The rx_data.header struct is ieee80211_hdr_4addr. If a wireless frame uses ieee80211_hdr_3addr header and is less than 6 bytes, it will be discarded. This is not likely going to happen for normal packets (since there is TCP, IP headers). But if fragmentation is used, there will be such small trailing packets. And they will be lost for ever. Signed-off-by: Zhu Yi Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 0e94fbbf7a..b85857a848 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c @@ -2664,7 +2664,7 @@ static void __ipw2100_rx_process(struct ipw2100_priv *priv) break; } #endif - if (stats.len < sizeof(u->rx_data.header)) + if (stats.len < sizeof(struct ieee80211_hdr_3addr)) break; switch (WLAN_FC_GET_TYPE(u->rx_data.header.frame_ctl)) { case IEEE80211_FTYPE_MGMT: