carl9170 firmware: per-vif tx sequence counter
[carl9170fw.git] / include / linux / ieee80211.h
index 0f3bbee5a4659c89e121586be86f90bf936eee9a..e60b271203ee10cfcc27f035d3ed492e3cf1d943 100644 (file)
@@ -527,13 +527,28 @@ static inline int ieee80211_is_qos_nullfunc(__le16 fc)
               cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
 }
 
+static inline unsigned int ieee80211_hdrlen(__le16 fc)
+{
+       unsigned int hdrlen = 24;
+
+       if (ieee80211_has_a4(fc))
+               hdrlen = 30;
+
+       if (ieee80211_is_data_qos(fc)) {
+               hdrlen += IEEE80211_QOS_CTL_LEN;
+               if (ieee80211_has_order(fc))
+                       hdrlen += IEEE80211_HT_CTL_LEN;
+       }
+
+        return hdrlen;
+}
+
 struct ieee80211s_hdr {
        u8 flags;
        u8 ttl;
        __le32 seqnum;
        u8 eaddr1[6];
        u8 eaddr2[6];
-       u8 eaddr3[6];
 } __attribute__ ((packed));
 
 /* Mesh flags */