aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2014-10-22 08:22:49 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-10-23 14:39:43 -0400
commita7f3a768289858f03f5c1866639c8b476c1b8ebc (patch)
tree1d1d7bb3a79486744d152804605735a7e951c0dc /include/net/mac80211.h
parent8ec7886b1cd59c6e76a6d8fa413f9d338cfedc96 (diff)
mac80211: export IE splitting function
Export ieee80211_ie_split function, so it can be reused by drivers which need to insert additional elements. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 9dc5e7606322..96d224357c8c 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -4906,4 +4906,32 @@ void ieee80211_update_p2p_noa(struct ieee80211_noa_data *data, u32 tsf);
4906void ieee80211_tdls_oper_request(struct ieee80211_vif *vif, const u8 *peer, 4906void ieee80211_tdls_oper_request(struct ieee80211_vif *vif, const u8 *peer,
4907 enum nl80211_tdls_operation oper, 4907 enum nl80211_tdls_operation oper,
4908 u16 reason_code, gfp_t gfp); 4908 u16 reason_code, gfp_t gfp);
4909
4910/**
4911 * ieee80211_ie_split - split an IE buffer according to ordering
4912 *
4913 * @ies: the IE buffer
4914 * @ielen: the length of the IE buffer
4915 * @ids: an array with element IDs that are allowed before
4916 * the split
4917 * @n_ids: the size of the element ID array
4918 * @offset: offset where to start splitting in the buffer
4919 *
4920 * This function splits an IE buffer by updating the @offset
4921 * variable to point to the location where the buffer should be
4922 * split.
4923 *
4924 * It assumes that the given IE buffer is well-formed, this
4925 * has to be guaranteed by the caller!
4926 *
4927 * It also assumes that the IEs in the buffer are ordered
4928 * correctly, if not the result of using this function will not
4929 * be ordered correctly either, i.e. it does no reordering.
4930 *
4931 * The function returns the offset where the next part of the
4932 * buffer starts, which may be @ielen if the entire (remainder)
4933 * of the buffer should be used.
4934 */
4935size_t ieee80211_ie_split(const u8 *ies, size_t ielen,
4936 const u8 *ids, int n_ids, size_t offset);
4909#endif /* MAC80211_H */ 4937#endif /* MAC80211_H */