From: Helmut Schaa Date: Thu, 8 Dec 2011 12:11:54 +0000 (+0100) Subject: ieee80211: Introduce ieee80211_is_first_frag X-Git-Tag: 1.9.5~4 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=9f184dae9214e7acd7e8df12a26b0e27a41eafa3;p=carl9170fw.git ieee80211: Introduce ieee80211_is_first_frag Signed-off-by: Helmut Schaa Signed-off-by: John W. Linville Signed-off-by: Christian Lamparter --- diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 6729ad0..9f2caa2 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -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;