Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * This file define a set of standard wireless extensions
0004  *
0005  * Version :    22  16.3.07
0006  *
0007  * Authors :    Jean Tourrilhes - HPL - <jt@hpl.hp.com>
0008  * Copyright (c) 1997-2007 Jean Tourrilhes, All Rights Reserved.
0009  */
0010 #ifndef _LINUX_WIRELESS_H
0011 #define _LINUX_WIRELESS_H
0012 
0013 #include <uapi/linux/wireless.h>
0014 
0015 #ifdef CONFIG_COMPAT
0016 
0017 #include <linux/compat.h>
0018 
0019 struct compat_iw_point {
0020     compat_caddr_t pointer;
0021     __u16 length;
0022     __u16 flags;
0023 };
0024 #endif
0025 #ifdef CONFIG_COMPAT
0026 struct __compat_iw_event {
0027     __u16       len;            /* Real length of this stuff */
0028     __u16       cmd;            /* Wireless IOCTL */
0029     compat_caddr_t  pointer;
0030 };
0031 #define IW_EV_COMPAT_LCP_LEN offsetof(struct __compat_iw_event, pointer)
0032 #define IW_EV_COMPAT_POINT_OFF offsetof(struct compat_iw_point, length)
0033 
0034 /* Size of the various events for compat */
0035 #define IW_EV_COMPAT_CHAR_LEN   (IW_EV_COMPAT_LCP_LEN + IFNAMSIZ)
0036 #define IW_EV_COMPAT_UINT_LEN   (IW_EV_COMPAT_LCP_LEN + sizeof(__u32))
0037 #define IW_EV_COMPAT_FREQ_LEN   (IW_EV_COMPAT_LCP_LEN + sizeof(struct iw_freq))
0038 #define IW_EV_COMPAT_PARAM_LEN  (IW_EV_COMPAT_LCP_LEN + sizeof(struct iw_param))
0039 #define IW_EV_COMPAT_ADDR_LEN   (IW_EV_COMPAT_LCP_LEN + sizeof(struct sockaddr))
0040 #define IW_EV_COMPAT_QUAL_LEN   (IW_EV_COMPAT_LCP_LEN + sizeof(struct iw_quality))
0041 #define IW_EV_COMPAT_POINT_LEN  \
0042     (IW_EV_COMPAT_LCP_LEN + sizeof(struct compat_iw_point) - \
0043      IW_EV_COMPAT_POINT_OFF)
0044 #endif
0045 #endif  /* _LINUX_WIRELESS_H */