2 * Copyright 2010 Kshitij Kulshreshtha <kkhere.geo@gmail.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * Compatibility file for Linux wireless for kernels 2.6.35.
11 #include <linux/compat.h>
13 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)
14 #include <linux/ctype.h>
17 * hex_to_bin - convert a hex digit to its real value
18 * @ch: ascii character represents hex digit
20 * hex_to_bin() converts one hex digit to its actual value or -1 in case of bad
23 int hex_to_bin(char ch)
25 if ((ch >= '0') && (ch <= '9'))
28 if ((ch >= 'a') && (ch <= 'f'))
32 EXPORT_SYMBOL(hex_to_bin);
34 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35) */