mac80211: fix bufferable MMPDU RX handling
[carl9170fw.git] / include / linux / ieee80211.h
index cdf4ffe405efea908eb10bbe1584bef6632c59ab..5f581b525f19b1a7958d2e306c0c3abcfe4cfc5a 100644 (file)
@@ -603,6 +603,20 @@ static inline unsigned int ieee80211_hdrlen(__le16 fc)
         return hdrlen;
 }
 
+/**
+ * ieee80211_is_bufferable_mmpdu - check if frame is bufferable MMPDU
+ * @fc: frame control field in little-endian byteorder
+ */
+static inline bool ieee80211_is_bufferable_mmpdu(__le16 fc)
+{
+       /* IEEE 802.11-2012, definition of "bufferable management frame";
+        * note that this ignores the IBSS special case. */
+       return ieee80211_is_mgmt(fc) &&
+              (ieee80211_is_action(fc) ||
+               ieee80211_is_disassoc(fc) ||
+               ieee80211_is_deauth(fc));
+}
+
 /**
  * ieee80211_is_first_frag - check if IEEE80211_SCTL_FRAG is not set
  * @seq_ctrl: frame sequence control bytes in little-endian byteorder