summaryrefslogtreecommitdiff
path: root/backport-include/net/iw_handler.h
diff options
context:
space:
mode:
authorDominik Sliwa <dominik.sliwa@toradex.com>2017-11-21 12:59:41 +0000
committerDominik Sliwa <dominik.sliwa@toradex.com>2017-12-22 09:40:23 +0000
commite34cb44ac7c08783b98a16eec70125e205e6eb12 (patch)
tree1101d23f1a73e5627ae187b07c7a0cf8826e10d1 /backport-include/net/iw_handler.h
initial commit
Generated againts 4.14 kernel source with git backports 1d8cc151d365582b42be00af776270b834a7a37d
Diffstat (limited to 'backport-include/net/iw_handler.h')
-rw-r--r--backport-include/net/iw_handler.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/backport-include/net/iw_handler.h b/backport-include/net/iw_handler.h
new file mode 100644
index 0000000..84d63b3
--- /dev/null
+++ b/backport-include/net/iw_handler.h
@@ -0,0 +1,40 @@
+#ifndef __BACKPORT_IW_HANDLER_H
+#define __BACKPORT_IW_HANDLER_H
+#include_next <net/iw_handler.h>
+
+#if LINUX_VERSION_IS_LESS(4,1,0)
+static inline char *
+iwe_stream_add_event_check(struct iw_request_info *info, char *stream,
+ char *ends, struct iw_event *iwe, int event_len)
+{
+ char *res = iwe_stream_add_event(info, stream, ends, iwe, event_len);
+
+ if (res == stream)
+ return ERR_PTR(-E2BIG);
+ return res;
+}
+
+static inline char *
+iwe_stream_add_point_check(struct iw_request_info *info, char *stream,
+ char *ends, struct iw_event *iwe, char *extra)
+{
+ char *res = iwe_stream_add_point(info, stream, ends, iwe, extra);
+
+ if (res == stream)
+ return ERR_PTR(-E2BIG);
+ return res;
+}
+#endif /* LINUX_VERSION_IS_LESS(4,1,0) */
+
+/* this was added in v3.2.79, v3.18.30, v4.1.21, v4.4.6 and 4.5 */
+#if !(LINUX_VERSION_IS_GEQ(4,4,6) || \
+ (LINUX_VERSION_IS_GEQ(4,1,21) && \
+ LINUX_VERSION_IS_LESS(4,2,0)) || \
+ (LINUX_VERSION_IS_GEQ(3,18,30) && \
+ LINUX_VERSION_IS_LESS(3,19,0)) || \
+ (LINUX_VERSION_IS_GEQ(3,2,79) && \
+ LINUX_VERSION_IS_LESS(3,3,0)))
+#define wireless_nlevent_flush LINUX_BACKPORT(wireless_nlevent_flush)
+static inline void wireless_nlevent_flush(void) {}
+#endif
+#endif /* __BACKPORT_IW_HANDLER_H */