X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=include%2Flinux%2Fieee80211.h;h=06749bda7600ff8d2e9da4ffd496c89c7f18f24a;hb=ef6758ef6ab9ee47064582d6a013729f47ed9ac2;hp=0f3bbee5a4659c89e121586be86f90bf936eee9a;hpb=e0778da7bcbe9128e57d683764eaaaa060618890;p=carl9170fw.git diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 0f3bbee..06749bd 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -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 */ @@ -974,7 +989,7 @@ struct ieee80211_ht_info { /* block-ack parameters */ #define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002 #define IEEE80211_ADDBA_PARAM_TID_MASK 0x003C -#define IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFA0 +#define IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFC0 #define IEEE80211_DELBA_PARAM_TID_MASK 0xF000 #define IEEE80211_DELBA_PARAM_INITIATOR_MASK 0x0800 @@ -1340,6 +1355,9 @@ enum { /* Although the spec says 8 I'm seeing 6 in practice */ #define IEEE80211_COUNTRY_IE_MIN_LEN 6 +/* The Country String field of the element shall be 3 octets in length */ +#define IEEE80211_COUNTRY_STRING_LEN 3 + /* * For regulatory extension stuff see IEEE 802.11-2007 * Annex I (page 1141) and Annex J (page 1147). Also