[SCTP]: Fix couple of races between sctp_peeloff() and sctp_rcv().
[powerpc.git] / include / net / ieee80211.h
index 5e38dca..df05f46 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/kernel.h>      /* ARRAY_SIZE */
 #include <linux/wireless.h>
 
-#define IEEE80211_VERSION "git-1.1.6"
+#define IEEE80211_VERSION "git-1.1.7"
 
 #define IEEE80211_DATA_LEN             2304
 /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
@@ -363,8 +363,9 @@ enum ieee80211_reasoncode {
 #define IEEE80211_OFDM_SHIFT_MASK_A         4
 
 /* NOTE: This data is for statistical purposes; not all hardware provides this
- *       information for frames received.  Not setting these will not cause
- *       any adverse affects. */
+ *       information for frames received.
+ *       For ieee80211_rx_mgt, you need to set at least the 'len' parameter.
+ */
 struct ieee80211_rx_stats {
        u32 mac_time;
        s8 rssi;
@@ -1042,7 +1043,7 @@ static inline u8 *ieee80211_get_payload(struct ieee80211_hdr *hdr)
        case IEEE80211_4ADDR_LEN:
                return ((struct ieee80211_hdr_4addr *)hdr)->payload;
        }
-
+       return NULL;
 }
 
 static inline int ieee80211_is_ofdm_rate(u8 rate)
@@ -1088,6 +1089,7 @@ extern int ieee80211_tx_frame(struct ieee80211_device *ieee,
 /* ieee80211_rx.c */
 extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
                        struct ieee80211_rx_stats *rx_stats);
+/* make sure to set stats->len */
 extern void ieee80211_rx_mgt(struct ieee80211_device *ieee,
                             struct ieee80211_hdr_4addr *header,
                             struct ieee80211_rx_stats *stats);