X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=include%2Flinux%2Fieee80211.h;h=6729ad02e2398f785692c7b7450fa36ae8915ebc;hb=3d744935c5ad5735c5a5ea0486e0c6389aa2c94f;hp=7f2cd8cb356f1f59b2d7e4b9eac1c9b4e4f1856e;hpb=64bc2546cb67ab5a8d64da79632c10bd0f79a709;p=carl9170fw.git diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 7f2cd8c..6729ad0 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -125,6 +125,7 @@ #define IEEE80211_QOS_CTL_ACK_POLICY_NOACK 0x0020 #define IEEE80211_QOS_CTL_ACK_POLICY_NO_EXPL 0x0040 #define IEEE80211_QOS_CTL_ACK_POLICY_BLOCKACK 0x0060 +#define IEEE80211_QOS_CTL_ACK_POLICY_MASK 0x0060 /* A-MSDU 802.11n */ #define IEEE80211_QOS_CTL_A_MSDU_PRESENT 0x0080 /* Mesh Control 802.11s */ @@ -1723,6 +1724,23 @@ static inline bool ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr) return false; } +/** + * ieee80211_is_public_action - check if frame is a public action frame + * @hdr: the frame + * @len: length of the frame + */ +static inline bool ieee80211_is_public_action(struct ieee80211_hdr *hdr, + size_t len) +{ + struct ieee80211_mgmt *mgmt = (void *)hdr; + + if (len < IEEE80211_MIN_ACTION_SIZE) + return false; + if (!ieee80211_is_action(hdr->frame_control)) + return false; + return mgmt->u.action.category == WLAN_CATEGORY_PUBLIC; +} + /** * ieee80211_fhss_chan_to_freq - get channel frequency * @channel: the FHSS channel