ieee80211: Introduce ieee80211_is_first_frag
authorHelmut Schaa <helmut.schaa@googlemail.com>
Thu, 8 Dec 2011 12:11:54 +0000 (13:11 +0100)
committerChristian Lamparter <chunkeey@googlemail.com>
Sat, 24 Dec 2011 15:04:52 +0000 (16:04 +0100)
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
include/linux/ieee80211.h

index 6729ad02e2398f785692c7b7450fa36ae8915ebc..9f2caa2b0da8c6cb681365f26fe05a47d33bc905 100644 (file)
@@ -557,6 +557,15 @@ static inline unsigned int ieee80211_hdrlen(__le16 fc)
         return hdrlen;
 }
 
+/**
+ * ieee80211_is_first_frag - check if IEEE80211_SCTL_FRAG is not set
+ * @seq_ctrl: frame sequence control bytes in little-endian byteorder
+ */
+static inline int ieee80211_is_first_frag(__le16 seq_ctrl)
+{
+       return (seq_ctrl & cpu_to_le16(IEEE80211_SCTL_FRAG)) == 0;
+}
+
 struct ieee80211s_hdr {
        u8 flags;
        u8 ttl;