Commit fe5f8e2a authored by Zhu Yi's avatar Zhu Yi Committed by John W. Linville

[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: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3eb54605
...@@ -2664,7 +2664,7 @@ static void __ipw2100_rx_process(struct ipw2100_priv *priv) ...@@ -2664,7 +2664,7 @@ static void __ipw2100_rx_process(struct ipw2100_priv *priv)
break; break;
} }
#endif #endif
if (stats.len < sizeof(u->rx_data.header)) if (stats.len < sizeof(struct ieee80211_hdr_3addr))
break; break;
switch (WLAN_FC_GET_TYPE(u->rx_data.header.frame_ctl)) { switch (WLAN_FC_GET_TYPE(u->rx_data.header.frame_ctl)) {
case IEEE80211_FTYPE_MGMT: case IEEE80211_FTYPE_MGMT:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment