[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>

authored by Johannes Berg and committed by Jeff Garzik c9fa7d5d 5af47b2f

+4 -2
+4 -2
include/net/ieee80211.h
··· 363 363 #define IEEE80211_OFDM_SHIFT_MASK_A 4 364 364 365 365 /* NOTE: This data is for statistical purposes; not all hardware provides this 366 - * information for frames received. Not setting these will not cause 367 - * any adverse affects. */ 366 + * information for frames received. 367 + * For ieee80211_rx_mgt, you need to set at least the 'len' parameter. 368 + */ 368 369 struct ieee80211_rx_stats { 369 370 u32 mac_time; 370 371 s8 rssi; ··· 1089 1088 /* ieee80211_rx.c */ 1090 1089 extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, 1091 1090 struct ieee80211_rx_stats *rx_stats); 1091 + /* make sure to set stats->len */ 1092 1092 extern void ieee80211_rx_mgt(struct ieee80211_device *ieee, 1093 1093 struct ieee80211_hdr_4addr *header, 1094 1094 struct ieee80211_rx_stats *stats);