diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2013-04-02 19:27:23 +0200 |
---|---|---|
committer | Johannes Berg <johannes@sipsolutions.net> | 2013-04-02 19:27:23 +0200 |
commit | 3ec07b8dc2ef11b1bfbdec3b6ed335b013be779b (patch) | |
tree | 42eaf82491e75302af703f7b8f5f048c76862da8 /backport/compat/compat-3.5.c | |
parent | 3cefcdd73225e5404b077640ece987efff04216f (diff) |
rename compat dir to backport
Then we can also move all the plumbing/ stuff into it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Diffstat (limited to 'backport/compat/compat-3.5.c')
-rw-r--r-- | backport/compat/compat-3.5.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/backport/compat/compat-3.5.c b/backport/compat/compat-3.5.c new file mode 100644 index 00000000..d7f1c275 --- /dev/null +++ b/backport/compat/compat-3.5.c @@ -0,0 +1,45 @@ +/* + * Copyright 2012-2013 Luis R. Rodriguez <mcgrof@do-not-panic.com> + * + * 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 + * published by the Free Software Foundation. + * + * Compatibility file for Linux wireless for kernels 3.5. + */ + +#include <linux/module.h> +#include <linux/highuid.h> +#include <linux/ktime.h> + +/* + * Commit 7a4e7408c5cadb240e068a662251754a562355e3 + * exported overflowuid and overflowgid for all + * kernel configurations, prior to that we only + * had it exported when CONFIG_UID16 was enabled. + * We are technically redefining it here but + * nothing seems to be changing it, except + * kernel/ code does epose it via sysctl and + * proc... if required later we can add that here. + */ +#ifndef CONFIG_UID16 +int overflowuid = DEFAULT_OVERFLOWUID; +int overflowgid = DEFAULT_OVERFLOWGID; + +EXPORT_SYMBOL_GPL(overflowuid); +EXPORT_SYMBOL_GPL(overflowgid); +#endif + +/* + * We can't access the timekeeper static variable + * on older kernels so we're shit out of luck and + * have to rely on time that might jump. Upgrade + * if you want timestamps that don't jump, this + * important for DRM vblank and page flip event + * timestamps. + */ +ktime_t ktime_get_monotonic_offset(void) +{ + return ktime_get(); +} +EXPORT_SYMBOL_GPL(ktime_get_monotonic_offset); |