Xenomai  3.0.8
rtwlan_io.h
1 /* rtwlan_io.h
2  *
3  * Copyright (C) 2006 Daniel Gregorek <dxg@gmx.de>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  *
19  */
20 
21 #ifndef RTWLAN_IO
22 #define RTWLAN_IO
23 
24 #include <rtnet_chrdev.h>
25 
26 #define RTWLAN_TXMODE_RAW 0
27 #define RTWLAN_TXMODE_ACK 1
28 #define RTWLAN_TXMODE_MCAST 2
29 
30 #define ENORTWLANDEV 0xff08
31 
32 struct rtwlan_cmd {
33 
34  struct rtnet_ioctl_head head;
35 
36  union {
37 
38  struct {
39  unsigned int bitrate;
40  unsigned int channel;
41  unsigned int retry;
42  unsigned int txpower;
43  unsigned int mode;
44  unsigned int autoresponder;
45  unsigned int dropbcast;
46  unsigned int dropmcast;
47  unsigned int bbpsens;
48  }set;
49 
50  struct {
51  unsigned int address;
52  unsigned int value;
53  }reg;
54 
55  struct {
56  int ifindex;
57  unsigned int flags;
58  unsigned int bitrate;
59  unsigned int channel;
60  unsigned int retry;
61  unsigned int txpower;
62  unsigned int bbpsens;
63  unsigned int mode;
64  unsigned int autoresponder;
65  unsigned int dropbcast;
66  unsigned int dropmcast;
67  unsigned int rx_packets;
68  unsigned int tx_packets;
69  unsigned int tx_retry;
70  }info;
71  }args;
72 };
73 
74 #define RTNET_IOC_TYPE_RTWLAN 8
75 
76 #define IOC_RTWLAN_IFINFO _IOWR(RTNET_IOC_TYPE_RTWLAN, \
77  0 | RTNET_IOC_NODEV_PARAM, \
78  struct rtwlan_cmd)
79 
80 #define IOC_RTWLAN_BITRATE _IOWR(RTNET_IOC_TYPE_RTWLAN, 1, \
81  struct rtwlan_cmd)
82 
83 #define IOC_RTWLAN_CHANNEL _IOWR(RTNET_IOC_TYPE_RTWLAN, 2, \
84  struct rtwlan_cmd)
85 
86 #define IOC_RTWLAN_TXPOWER _IOWR(RTNET_IOC_TYPE_RTWLAN, 3, \
87  struct rtwlan_cmd)
88 
89 #define IOC_RTWLAN_RETRY _IOWR(RTNET_IOC_TYPE_RTWLAN, 4, \
90  struct rtwlan_cmd)
91 
92 #define IOC_RTWLAN_TXMODE _IOWR(RTNET_IOC_TYPE_RTWLAN, 5, \
93  struct rtwlan_cmd)
94 
95 #define IOC_RTWLAN_DROPBCAST _IOWR(RTNET_IOC_TYPE_RTWLAN, 6, \
96  struct rtwlan_cmd)
97 
98 #define IOC_RTWLAN_DROPMCAST _IOWR(RTNET_IOC_TYPE_RTWLAN, 7, \
99  struct rtwlan_cmd)
100 
101 #define IOC_RTWLAN_REGREAD _IOWR(RTNET_IOC_TYPE_RTWLAN, 8, \
102  struct rtwlan_cmd)
103 
104 #define IOC_RTWLAN_REGWRITE _IOWR(RTNET_IOC_TYPE_RTWLAN, 9, \
105  struct rtwlan_cmd)
106 
107 #define IOC_RTWLAN_BBPWRITE _IOWR(RTNET_IOC_TYPE_RTWLAN, 10, \
108  struct rtwlan_cmd)
109 
110 #define IOC_RTWLAN_BBPREAD _IOWR(RTNET_IOC_TYPE_RTWLAN, 11, \
111  struct rtwlan_cmd)
112 
113 #define IOC_RTWLAN_BBPSENS _IOWR(RTNET_IOC_TYPE_RTWLAN, 12, \
114  struct rtwlan_cmd)
115 
116 #define IOC_RTWLAN_AUTORESP _IOWR(RTNET_IOC_TYPE_RTWLAN, 13, \
117  struct rtwlan_cmd)
118 
119 
120 #endif