Commit c9fa7d5d authored by Johannes Berg's avatar Johannes Berg Committed by Jeff Garzik

[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: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 5af47b2f
...@@ -363,8 +363,9 @@ enum ieee80211_reasoncode { ...@@ -363,8 +363,9 @@ enum ieee80211_reasoncode {
#define IEEE80211_OFDM_SHIFT_MASK_A 4 #define IEEE80211_OFDM_SHIFT_MASK_A 4
/* NOTE: This data is for statistical purposes; not all hardware provides this /* NOTE: This data is for statistical purposes; not all hardware provides this
* information for frames received. Not setting these will not cause * information for frames received.
* any adverse affects. */ * For ieee80211_rx_mgt, you need to set at least the 'len' parameter.
*/
struct ieee80211_rx_stats { struct ieee80211_rx_stats {
u32 mac_time; u32 mac_time;
s8 rssi; s8 rssi;
...@@ -1088,6 +1089,7 @@ extern int ieee80211_tx_frame(struct ieee80211_device *ieee, ...@@ -1088,6 +1089,7 @@ extern int ieee80211_tx_frame(struct ieee80211_device *ieee,
/* ieee80211_rx.c */ /* ieee80211_rx.c */
extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
struct ieee80211_rx_stats *rx_stats); struct ieee80211_rx_stats *rx_stats);
/* make sure to set stats->len */
extern void ieee80211_rx_mgt(struct ieee80211_device *ieee, extern void ieee80211_rx_mgt(struct ieee80211_device *ieee,
struct ieee80211_hdr_4addr *header, struct ieee80211_hdr_4addr *header,
struct ieee80211_rx_stats *stats); struct ieee80211_rx_stats *stats);
......
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