3 * Types and macros to aid in portability
5 * Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
6 * --------------------------------------------------------------------
10 * The contents of this file are subject to the Mozilla Public
11 * License Version 1.1 (the "License"); you may not use this file
12 * except in compliance with the License. You may obtain a copy of
13 * the License at http://www.mozilla.org/MPL/
15 * Software distributed under the License is distributed on an "AS
16 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
17 * implied. See the License for the specific language governing
18 * rights and limitations under the License.
20 * Alternatively, the contents of this file may be used under the
21 * terms of the GNU Public License version 2 (the "GPL"), in which
22 * case the provisions of the GPL are applicable instead of the
23 * above. If you wish to allow the use of your version of this file
24 * only under the terms of the GPL and not to allow others to use
25 * your version of this file under the MPL, indicate your decision
26 * by deleting the provisions above and replace them with the notice
27 * and other provisions required by the GPL. If you do not delete
28 * the provisions above, a recipient may use your version of this
29 * file under either the MPL or the GPL.
31 * --------------------------------------------------------------------
33 * Inquiries regarding the linux-wlan Open Source project can be
36 * AbsoluteValue Systems Inc.
38 * http://www.linux-wlan.com
40 * --------------------------------------------------------------------
42 * Portions of the development of this software were funded by
43 * Intersil Corporation as part of PRISM(R) chipset product development.
45 * --------------------------------------------------------------------
48 #ifndef _WLAN_COMPAT_H
49 #define _WLAN_COMPAT_H
51 /*=============================================================*/
52 /*------ Establish Platform Identity --------------------------*/
53 /*=============================================================*/
65 #define WLAN_x86_64 10
74 #define WLAN_ALPHAARCH 7
75 #define WLAN_MIPSARCH 9
76 #define WLAN_HPPAARCH 10
77 #define WLAN_SPARCARCH 11
78 #define WLAN_SHARCH 12
80 /* Note: the PLX HOSTIF above refers to some vendors implementations for */
81 /* PCI. It's a PLX chip that is a PCI to PCMCIA adapter, but it */
82 /* isn't a real PCMCIA host interface adapter providing all the */
83 /* card&socket services. */
85 #if (defined(CONFIG_PPC) || defined(CONFIG_8xx) || defined(__powerpc__))
91 #if defined(__KERNEL__)
93 #ifndef AUTOCONF_INCLUDED
94 #include <linux/config.h>
97 #if defined(__x86_64__)
98 #define WLAN_CPU_FAMILY WLAN_x86_64
99 #define WLAN_SYSARCH WLAN_PCAT
100 #elif defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__)
101 #define WLAN_CPU_FAMILY WLAN_Ix86
102 #define WLAN_SYSARCH WLAN_PCAT
103 #elif defined(__ppc__)
104 #define WLAN_CPU_FAMILY WLAN_PPC
105 #if defined(CONFIG_MBX)
106 #define WLAN_SYSARCH WLAN_MBX
107 #elif defined(CONFIG_RPXLITE)
108 #define WLAN_SYSARCH WLAN_RPX
109 #elif defined(CONFIG_RPXCLASSIC)
110 #define WLAN_SYSARCH WLAN_RPX
112 #define WLAN_SYSARCH WLAN_PMAC
114 #elif defined(__arm__)
115 #define WLAN_CPU_FAMILY WLAN_ARM
116 #define WLAN_SYSARCH WLAN_SKIFF
117 #elif defined(__alpha__)
118 #define WLAN_CPU_FAMILY WLAN_ALPHA
119 #define WLAN_SYSARCH WLAN_ALPHAARCH
120 #elif defined(__mips__)
121 #define WLAN_CPU_FAMILY WLAN_MIPS
122 #define WLAN_SYSARCH WLAN_MIPSARCH
123 #elif defined(__hppa__)
124 #define WLAN_CPU_FAMILY WLAN_HPPA
125 #define WLAN_SYSARCH WLAN_HPPAARCH
126 #elif defined(__sparc__)
127 #define WLAN_CPU_FAMILY WLAN_SPARC
128 #define WLAN_SYSARCH WLAN_SPARC
129 #elif defined(__sh__)
130 #define WLAN_CPU_FAMILY WLAN_SH
131 #define WLAN_SYSARCH WLAN_SHARCH
132 #ifndef __LITTLE_ENDIAN__
133 #define __LITTLE_ENDIAN__
136 #error "No CPU identified!"
138 #endif /* __KERNEL__ */
141 Some big endian machines implicitly do all I/O in little endian mode.
144 Linux/PPC on PowerMacs (PCI)
145 Arm/Intel Xscale (PCI)
147 This may also affect PLX boards and other BE &| PPC platforms;
148 as new ones are discovered, add them below.
151 #if defined(WLAN_HOSTIF)
152 #if ((WLAN_HOSTIF == WLAN_PCI) || (WLAN_HOSTIF == WLAN_PLX))
153 #if ((WLAN_SYSARCH == WLAN_SKIFF) || (WLAN_SYSARCH == WLAN_PMAC) || (WLAN_SYSARCH == WLAN_SPARC))
154 #define REVERSE_ENDIAN
159 /*=============================================================*/
160 /*------ Bit settings -----------------------------------------*/
161 /*=============================================================*/
163 #define BIT0 0x00000001
164 #define BIT1 0x00000002
165 #define BIT2 0x00000004
166 #define BIT3 0x00000008
167 #define BIT4 0x00000010
168 #define BIT5 0x00000020
169 #define BIT6 0x00000040
170 #define BIT7 0x00000080
171 #define BIT8 0x00000100
172 #define BIT9 0x00000200
173 #define BIT10 0x00000400
174 #define BIT11 0x00000800
175 #define BIT12 0x00001000
176 #define BIT13 0x00002000
177 #define BIT14 0x00004000
178 #define BIT15 0x00008000
179 #define BIT16 0x00010000
180 #define BIT17 0x00020000
181 #define BIT18 0x00040000
182 #define BIT19 0x00080000
183 #define BIT20 0x00100000
184 #define BIT21 0x00200000
185 #define BIT22 0x00400000
186 #define BIT23 0x00800000
187 #define BIT24 0x01000000
188 #define BIT25 0x02000000
189 #define BIT26 0x04000000
190 #define BIT27 0x08000000
191 #define BIT28 0x10000000
192 #define BIT29 0x20000000
193 #define BIT30 0x40000000
194 #define BIT31 0x80000000
196 #include <linux/types.h>
198 typedef u_int8_t UINT8;
199 typedef u_int16_t UINT16;
200 typedef u_int32_t UINT32;
203 typedef int16_t INT16;
204 typedef int32_t INT32;
206 typedef unsigned int UINT;
207 typedef signed int INT;
209 typedef u_int64_t UINT64;
210 typedef int64_t INT64;
212 #define UINT8_MAX (0xffUL)
213 #define UINT16_MAX (0xffffUL)
214 #define UINT32_MAX (0xffffffffUL)
216 #define INT8_MAX (0x7fL)
217 #define INT16_MAX (0x7fffL)
218 #define INT32_MAX (0x7fffffffL)
220 /*=============================================================*/
221 /*------ Compiler Portability Macros --------------------------*/
222 /*=============================================================*/
223 #define __WLAN_ATTRIB_PACK__ __attribute__ ((packed))
225 /*=============================================================*/
226 /*------ OS Portability Macros --------------------------------*/
227 /*=============================================================*/
230 #define WLAN_DBVAR wlan_debug
233 #ifndef KERNEL_VERSION
234 #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
237 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
238 # if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8))
239 # include <linux/hardirq.h>
241 # include <asm/hardirq.h>
243 #elif defined(__KERNEL__)
244 # define PREEMPT_MASK (0x000000FFUL)
245 # define preempt_count() (0UL)
248 #define WLAN_LOG_ERROR(x,args...) printk(KERN_ERR "%s: " x , __func__ , ##args);
250 #define WLAN_LOG_WARNING(x,args...) printk(KERN_WARNING "%s: " x , __func__ , ##args);
252 #define WLAN_LOG_NOTICE(x,args...) printk(KERN_NOTICE "%s: " x , __func__ , ##args);
254 #define WLAN_LOG_INFO(args... ) printk(KERN_INFO args)
256 #if defined(WLAN_INCLUDE_DEBUG)
257 #define WLAN_ASSERT(c) if ((!(c)) && WLAN_DBVAR >= 1) { \
258 WLAN_LOG_DEBUG(1, "Assertion failure!\n"); }
259 #define WLAN_HEX_DUMP( l, x, p, n) if( WLAN_DBVAR >= (l) ){ \
261 printk(KERN_DEBUG x ":"); \
262 for( __i__=0; __i__ < (n); __i__++) \
263 printk( " %02x", ((UINT8*)(p))[__i__]); \
265 #define DBFENTER { if ( WLAN_DBVAR >= 5 ){ WLAN_LOG_DEBUG(3,"---->\n"); } }
266 #define DBFEXIT { if ( WLAN_DBVAR >= 5 ){ WLAN_LOG_DEBUG(3,"<----\n"); } }
268 #define WLAN_LOG_DEBUG(l,x,args...) if ( WLAN_DBVAR >= (l)) printk(KERN_DEBUG "%s(%lu): " x , __func__, (preempt_count() & PREEMPT_MASK), ##args );
270 #define WLAN_ASSERT(c)
271 #define WLAN_HEX_DUMP( l, s, p, n)
275 #define WLAN_LOG_DEBUG(l, s, args...)
282 #if defined(__KERNEL__)
284 #if ((LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)))
285 #define URB_ONLY_CALLBACK
288 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
289 #define PT_REGS , struct pt_regs *regs
294 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7))
295 # define del_singleshot_timer_sync(a) del_timer_sync(a)
298 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,17))
299 #define CONFIG_NETLINK 1
302 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0))
303 #define kfree_s(a, b) kfree((a))
306 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18))
307 #ifndef init_waitqueue_head
308 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,0,16))
309 #define init_waitqueue_head(p) (*(p) = NULL)
311 #define init_waitqueue_head(p) init_waitqueue(p)
313 typedef struct wait_queue *wait_queue_head_t;
314 typedef struct wait_queue wait_queue_t;
315 #define set_current_state(b) { current->state = (b); mb(); }
316 #define init_waitqueue_entry(a, b) { (a)->task = current; }
320 #ifndef wait_event_interruptible_timeout
321 // retval == 0; signal met; we're good.
322 // retval < 0; interrupted by signal.
323 // retval > 0; timed out.
325 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)) // fixme?
327 #define __wait_event_interruptible_timeout(wq, condition, ret) \
329 wait_queue_t __wait; \
330 init_waitqueue_entry(&__wait, current); \
332 add_wait_queue(&wq, &__wait); \
334 set_current_state(TASK_INTERRUPTIBLE); \
337 if (!signal_pending(current)) { \
338 ret = schedule_timeout(ret) ; \
343 ret = -ERESTARTSYS; \
346 set_current_state(TASK_RUNNING); \
347 remove_wait_queue(&wq, &__wait); \
353 #define __wait_event_interruptible_timeout(wq, condition, ret) \
355 struct wait_queue __wait; \
357 __wait.task = current; \
358 add_wait_queue(&wq, &__wait); \
360 current->state = TASK_INTERRUPTIBLE; \
363 if (!signal_pending(current)) { \
364 ret = schedule_timeout(ret); \
369 ret = -ERESTARTSYS; \
372 current->state = TASK_RUNNING; \
373 remove_wait_queue(&wq, &__wait); \
376 #endif // version >= 2.4
378 #define wait_event_interruptible_timeout(wq, condition, timeout) \
380 long __ret = timeout; \
382 __wait_event_interruptible_timeout(wq, condition, __ret); \
388 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20))
391 static inline void list_move_tail(struct list_head *list,
392 struct list_head *head)
394 __list_del(list->prev, list->next);
395 list_add_tail(list, head);
398 static inline void __list_splice(struct list_head *list,
399 struct list_head *head)
401 struct list_head *first = list->next;
402 struct list_head *last = list->prev;
403 struct list_head *at = head->next;
412 static inline void list_move(struct list_head *list, struct list_head *head)
414 __list_del(list->prev, list->next);
415 list_add(list, head);
418 static inline void list_splice_init(struct list_head *list,
419 struct list_head *head)
421 if (!list_empty(list)) {
422 __list_splice(list, head);
423 INIT_LIST_HEAD(list);
431 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,90))
432 #define spin_lock(l) do { } while (0)
433 #define spin_unlock(l) do { } while (0)
434 #define spin_lock_irqsave(l,f) do { save_flags(f); cli(); } while (0)
435 #define spin_unlock_irqrestore(l,f) do { restore_flags(f); } while (0)
436 #define spin_lock_init(s) do { } while (0)
437 #define spin_trylock(l) (1)
438 typedef int spinlock_t;
441 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) // XXX ???
442 #define spin_lock_bh spin_lock
445 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
447 #define spin_is_locked(x) (*(volatile char *)(&(x)->lock) <= 0)
449 #define spin_is_locked(l) (0)
453 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,28))
458 #ifdef _LINUX_PROC_FS_H
459 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,25))
461 extern inline struct proc_dir_entry *
462 create_proc_read_entry(const char *name, mode_t mode,
463 struct proc_dir_entry *base,
464 read_proc_t *read_proc, void *data)
466 struct proc_dir_entry *res = create_proc_entry(name, mode, base);
468 res->read_proc = read_proc;
475 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29))
477 #define proc_mkdir(name, root) create_proc_entry(name, S_IFDIR, root)
480 #endif /* _LINUX_PROC_FS_H */
482 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
484 #define PREPARE_TQUEUE(_tq, _routine, _data) \
486 (_tq)->routine = _routine; \
487 (_tq)->data = _data; \
489 #define INIT_TQUEUE(_tq, _routine, _data) \
491 INIT_LIST_HEAD(&(_tq)->list); \
493 PREPARE_TQUEUE((_tq), (_routine), (_data)); \
498 #define container_of(ptr, type, member) ({ \
499 const typeof( ((type *)0)->member ) *__mptr = (ptr); \
500 (type *)( (char *)__mptr - offsetof(type,member) );})
504 #define work_struct tq_struct
506 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
507 #define schedule_work(a) queue_task(a, &tq_scheduler)
509 #define schedule_work(a) schedule_task(a)
512 #define flush_scheduled_work flush_scheduled_tasks
513 #define INIT_WORK2(_wq, _routine) INIT_TQUEUE(_wq, (void (*)(void *))_routine, _wq)
516 #else // >= 2.5 kernel
518 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
519 #define INIT_WORK2(_wq, _routine) INIT_WORK(_wq, (void (*)(void *))_routine, _wq)
521 #define INIT_WORK2(_wq, _routine) INIT_WORK(_wq, _routine)
524 #endif // >= 2.5 kernel
526 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38))
527 typedef struct device netdevice_t;
528 #elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,4))
529 typedef struct net_device netdevice_t;
532 typedef struct net_device netdevice_t;
536 #if (WIRELESS_EXT < 13)
537 struct iw_request_info
539 __u16 cmd; /* Wireless Extension command */
540 __u16 flags; /* More to come ;-) */
546 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,18))
547 #define MODULE_PARM(a,b) extern int __bogus_decl
548 #define MODULE_AUTHOR(a) extern int __bogus_decl
549 #define MODULE_DESCRIPTION(a) extern int __bogus_decl
550 #define MODULE_SUPPORTED_DEVICE(a) extern int __bogus_decl
552 #define GET_USE_COUNT(m) mod_use_count_
556 #define MODULE_OWNER(a) extern int __bogus_decl
557 #define ANCIENT_MODULE_CODE
560 #ifndef MODULE_LICENSE
561 #define MODULE_LICENSE(m) extern int __bogus_decl
564 /* TODO: Do we care about this? */
565 #ifndef MODULE_DEVICE_TABLE
566 #define MODULE_DEVICE_TABLE(foo,bar)
569 #define wlan_minutes2ticks(a) ((a)*(wlan_ticks_per_sec * 60))
570 #define wlan_seconds2ticks(a) ((a)*(wlan_ticks_per_sec))
572 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,47))
573 #define NEW_MODULE_CODE
574 #ifdef ANCIENT_MODULE_CODE
575 #undef ANCIENT_MODULE_CODE
577 #elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,25))
578 #define module_param(name, type, perm) \
579 static inline void *__check_existence_##name(void) { return &name; } \
580 MODULE_PARM(name, _MODULE_PARM_STRING_ ## type)
582 #define _MODULE_PARM_STRING_byte "b"
583 #define _MODULE_PARM_STRING_short "h"
584 #define _MODULE_PARM_STRING_ushort "h"
585 #define _MODULE_PARM_STRING_int "i"
586 #define _MODULE_PARM_STRING_uint "i"
587 #define _MODULE_PARM_STRING_long "l"
588 #define _MODULE_PARM_STRING_ulong "l"
589 #define _MODULE_PARM_STRING_bool "i"
594 typedef void irqreturn_t;
597 #define IRQ_RETVAL(x)
601 #define in_atomic() 0
604 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13))
605 #define URB_ASYNC_UNLINK 0
608 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7))
609 #define URB_ASYNC_UNLINK USB_ASYNC_UNLINK
610 #define usb_fill_bulk_urb FILL_BULK_URB
611 #define usb_kill_urb usb_unlink_urb
613 #define USB_QUEUE_BULK 0
616 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11))
617 typedef u32 pm_message_t;
620 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9))
621 #define hotplug_path "/etc/hotplug/wlan.agent"
624 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
625 #define free_netdev(x) kfree(x)
628 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
629 #define eth_hdr(x) (x)->mac.ethernet
632 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
633 #define del_timer_sync(a) del_timer(a)
637 #define might_sleep(a) do { } while (0)
640 /* Apparently 2.4.2 ethtool is quite different, maybe newer too? */
641 #if (defined(SIOETHTOOL) && !defined(ETHTOOL_GDRVINFO))
646 #if ((LINUX_VERSION_CODE < KERNEL_VERSION(2,5,68)) && \
647 !defined(pcmcia_access_configuration_register))
648 #define pcmcia_access_configuration_register(handle, reg) \
649 CardServices(AccessConfigurationRegister, handle, reg)
650 #define pcmcia_register_client(handle, reg) \
651 CardServices(RegisterClient, handle, reg)
652 #define pcmcia_deregister_client(handle) \
653 CardServices(DeregisterClient, handle)
654 #define pcmcia_get_first_tuple(handle, tuple) \
655 CardServices(GetFirstTuple, handle, tuple)
656 #define pcmcia_get_next_tuple(handle, tuple) \
657 CardServices(GetNextTuple, handle, tuple)
658 #define pcmcia_get_tuple_data(handle, tuple) \
659 CardServices(GetTupleData, handle, tuple)
660 #define pcmcia_parse_tuple(handle, tuple, parse) \
661 CardServices(ParseTuple, handle, tuple, parse)
662 #define pcmcia_get_configuration_info(handle, config) \
663 CardServices(GetConfigurationInfo, handle, config)
664 #define pcmcia_request_io(handle, req) \
665 CardServices(RequestIO, handle, req)
666 #define pcmcia_request_irq(handle, req) \
667 CardServices(RequestIRQ, handle, req)
668 #define pcmcia_request_configuration(handle, req) \
669 CardServices(RequestConfiguration, handle, req)
670 #define pcmcia_release_configuration(handle) \
671 CardServices(ReleaseConfiguration, handle)
672 #define pcmcia_release_io(handle, req) \
673 CardServices(ReleaseIO, handle, req)
674 #define pcmcia_release_irq(handle, req) \
675 CardServices(ReleaseIRQ, handle, req)
676 #define pcmcia_release_window(win) \
677 CardServices(ReleaseWindow, win)
678 #define pcmcia_get_card_services_info(info) \
679 CardServices(GetCardServicesInfo, info)
680 #define pcmcia_report_error(handle, err) \
681 CardServices(ReportError, handle, err)
684 #endif /* __KERNEL__ */
686 /*=============================================================*/
687 /*------ Hardware Portability Macros --------------------------*/
688 /*=============================================================*/
690 #define ieee2host16(n) __le16_to_cpu(n)
691 #define ieee2host32(n) __le32_to_cpu(n)
692 #define host2ieee16(n) __cpu_to_le16(n)
693 #define host2ieee32(n) __cpu_to_le32(n)
695 #if (WLAN_CPU_FAMILY != WLAN_MIPS)
696 typedef UINT32 phys_t;
699 #if (WLAN_CPU_FAMILY == WLAN_PPC)
700 #define wlan_inw(a) in_be16((unsigned short *)((a)+_IO_BASE))
701 #define wlan_inw_le16_to_cpu(a) inw((a))
702 #define wlan_outw(v,a) out_be16((unsigned short *)((a)+_IO_BASE), (v))
703 #define wlan_outw_cpu_to_le16(v,a) outw((v),(a))
705 #define wlan_inw(a) inw((a))
706 #define wlan_inw_le16_to_cpu(a) __cpu_to_le16(inw((a)))
707 #define wlan_outw(v,a) outw((v),(a))
708 #define wlan_outw_cpu_to_le16(v,a) outw(__cpu_to_le16((v)),(a))
711 /*=============================================================*/
712 /*--- General Macros ------------------------------------------*/
713 /*=============================================================*/
715 #define wlan_max(a, b) (((a) > (b)) ? (a) : (b))
716 #define wlan_min(a, b) (((a) < (b)) ? (a) : (b))
718 #define wlan_isprint(c) (((c) > (0x19)) && ((c) < (0x7f)))
720 #define wlan_hexchar(x) (((x) < 0x0a) ? ('0' + (x)) : ('a' + ((x) - 0x0a)))
722 /* Create a string of printable chars from something that might not be */
723 /* It's recommended that the str be 4*len + 1 bytes long */
724 #define wlan_mkprintstr(buf, buflen, str, strlen) \
728 memset(str, 0, (strlen)); \
729 for (i = 0; i < (buflen); i++) { \
730 if ( wlan_isprint((buf)[i]) ) { \
731 (str)[j] = (buf)[i]; \
736 (str)[j+2] = wlan_hexchar(((buf)[i] & 0xf0) >> 4); \
737 (str)[j+3] = wlan_hexchar(((buf)[i] & 0x0f)); \
743 /*=============================================================*/
744 /*--- Variables -----------------------------------------------*/
745 /*=============================================================*/
747 #ifdef WLAN_INCLUDE_DEBUG
748 extern int wlan_debug;
751 extern int wlan_ethconv; /* What's the default ethconv? */
753 /*=============================================================*/
754 /*--- Functions -----------------------------------------------*/
755 /*=============================================================*/
756 #endif /* _WLAN_COMPAT_H */