aboutsummaryrefslogtreecommitdiffstats
path: root/package/d80211/src/include/compat_hacks.h
diff options
context:
space:
mode:
Diffstat (limited to 'package/d80211/src/include/compat_hacks.h')
-rw-r--r--package/d80211/src/include/compat_hacks.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/package/d80211/src/include/compat_hacks.h b/package/d80211/src/include/compat_hacks.h
new file mode 100644
index 0000000000..07f46cbcba
--- /dev/null
+++ b/package/d80211/src/include/compat_hacks.h
@@ -0,0 +1,28 @@
+#ifndef __COMPAT_HACKS
+#define __COMPAT_HACKS
+
+#include <linux/types.h>
+#include <linux/workqueue.h>
+#include <net/sch_generic.h>
+
+struct delayed_work {
+ struct work_struct work;
+};
+
+#define INIT_DELAYED_WORK(_work, _func) \
+ INIT_WORK(&(_work)->work, _func, NULL)
+
+#define INIT_WORK_NEW(_work, _func) INIT_WORK(_work, _func, NULL)
+
+#define schedule_delayed_work(_work, interval) schedule_delayed_work(&(_work)->work, interval)
+#define cancel_delayed_work(_work) cancel_delayed_work(&(_work)->work)
+
+static inline struct Qdisc *_qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops)
+{
+ return qdisc_create_dflt(dev, ops);
+}
+
+#define qdisc_create_dflt(_dev, _ops, _handle) \
+ _qdisc_create_dflt(_dev, _ops)
+
+#endif