diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2005-12-26 20:14:13 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-12 16:39:45 -0500 |
commit | c9fa7d5d6cec7a45f9dc6c2f23500af50d5617c9 (patch) | |
tree | 26706030d54ca3211cf0afa73ab92763cd888a9a /include/net/ieee80211.h | |
parent | 5af47b2ff124fdad9ba84baeb9f7eeebeb227b43 (diff) |
[PATCH] fix wrong comments in ieee80211.h
The comments in ieee80211.h claim that one doesn't need to set the len
parameter of the stats struct. But if one doesn't, the management frames
are read far over the memory they actually occupy causing badness.
Signed-Off-By: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'include/net/ieee80211.h')
-rw-r--r-- | include/net/ieee80211.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index cde2f4f4f501..df05f468fa5c 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -363,8 +363,9 @@ enum ieee80211_reasoncode { | |||
363 | #define IEEE80211_OFDM_SHIFT_MASK_A 4 | 363 | #define IEEE80211_OFDM_SHIFT_MASK_A 4 |
364 | 364 | ||
365 | /* NOTE: This data is for statistical purposes; not all hardware provides this | 365 | /* NOTE: This data is for statistical purposes; not all hardware provides this |
366 | * information for frames received. Not setting these will not cause | 366 | * information for frames received. |
367 | * any adverse affects. */ | 367 | * For ieee80211_rx_mgt, you need to set at least the 'len' parameter. |
368 | */ | ||
368 | struct ieee80211_rx_stats { | 369 | struct ieee80211_rx_stats { |
369 | u32 mac_time; | 370 | u32 mac_time; |
370 | s8 rssi; | 371 | s8 rssi; |
@@ -1088,6 +1089,7 @@ extern int ieee80211_tx_frame(struct ieee80211_device *ieee, | |||
1088 | /* ieee80211_rx.c */ | 1089 | /* ieee80211_rx.c */ |
1089 | extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | 1090 | extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, |
1090 | struct ieee80211_rx_stats *rx_stats); | 1091 | struct ieee80211_rx_stats *rx_stats); |
1092 | /* make sure to set stats->len */ | ||
1091 | extern void ieee80211_rx_mgt(struct ieee80211_device *ieee, | 1093 | extern void ieee80211_rx_mgt(struct ieee80211_device *ieee, |
1092 | struct ieee80211_hdr_4addr *header, | 1094 | struct ieee80211_hdr_4addr *header, |
1093 | struct ieee80211_rx_stats *stats); | 1095 | struct ieee80211_rx_stats *stats); |