summaryrefslogtreecommitdiff
path: root/include/linux/ieee80211.h
diff options
context:
space:
mode:
authorSara Sharon <sara.sharon@intel.com>2018-02-19 14:48:40 +0200
committerJohannes Berg <johannes.berg@intel.com>2018-02-22 21:13:03 +0100
commita1f2ba04cc92414b6b933289365eab878b0b2bf4 (patch)
treeab2e4b79651071f5214a1632d5d72be6a2156428 /include/linux/ieee80211.h
parent7299d6f7bfd1921c0cfb5e202155f1a5cfdb57d0 (diff)
downloadlwn-a1f2ba04cc92414b6b933289365eab878b0b2bf4.tar.gz
lwn-a1f2ba04cc92414b6b933289365eab878b0b2bf4.zip
mac80211: add get TID helper
Extracting the TID from the QOS header is common enough to justify helper. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/linux/ieee80211.h')
-rw-r--r--include/linux/ieee80211.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index e4cba332b705..8fe7e4306816 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -8,6 +8,7 @@
* Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>
* Copyright (c) 2013 - 2014 Intel Mobile Communications GmbH
* Copyright (c) 2016 - 2017 Intel Deutschland GmbH
+ * Copyright (c) 2018 Intel Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -2502,6 +2503,17 @@ static inline u8 *ieee80211_get_qos_ctl(struct ieee80211_hdr *hdr)
}
/**
+ * ieee80211_get_tid - get qos TID
+ * @hdr: the frame
+ */
+static inline u8 ieee80211_get_tid(struct ieee80211_hdr *hdr)
+{
+ u8 *qc = ieee80211_get_qos_ctl(hdr);
+
+ return qc[0] & IEEE80211_QOS_CTL_TID_MASK;
+}
+
+/**
* ieee80211_get_SA - get pointer to SA
* @hdr: the frame
*