[PATCH] Marvell Libertas 8388 802.11b/g USB driver
[linux-2.6.git] / drivers / net / wireless / libertas / wext.h
1 /**
2   * This file contains definition for IOCTL call.
3   */
4 #ifndef _WLAN_WEXT_H_
5 #define _WLAN_WEXT_H_
6
7 #define SUBCMD_OFFSET                   4
8 #define SUBCMD_DATA(x)                  *((int *)(x->u.name + SUBCMD_OFFSET))
9
10 /** PRIVATE CMD ID */
11 #define WLANIOCTL                       SIOCIWFIRSTPRIV
12
13 #define WLANSETWPAIE                    (WLANIOCTL + 0)
14
15 #define WLAN_SETINT_GETINT              (WLANIOCTL + 7)
16 #define WLANNF                                  1
17 #define WLANRSSI                                2
18 #define WLANENABLE11D                           5
19 #define WLANADHOCGRATE                          6
20 #define WLAN_SUBCMD_SET_PRESCAN                 11
21
22 #define WLAN_SETNONE_GETNONE            (WLANIOCTL + 8)
23 #define WLANDEAUTH                              1
24 #define WLANRADIOON                             2
25 #define WLANRADIOOFF                            3
26 #define WLANREMOVEADHOCAES                      4
27 #define WLANADHOCSTOP                           5
28 #define WLANCIPHERTEST                          6
29 #define WLANCRYPTOTEST                          7
30
31 #define WLANWLANIDLEON                          10
32 #define WLANWLANIDLEOFF                         11
33 #define WLAN_SUBCMD_BT_RESET                    13
34 #define WLAN_SUBCMD_FWT_RESET                   14
35
36 #define WLANGETLOG                      (WLANIOCTL + 9)
37 #define GETLOG_BUFSIZE  300
38
39 #define WLANSCAN_TYPE                   (WLANIOCTL + 11)
40
41 #define WLAN_SETNONE_GETONEINT          (WLANIOCTL + 15)
42 #define WLANGETREGION                           1
43 #define WLAN_GET_LISTEN_INTERVAL                2
44 #define WLAN_GET_MULTIPLE_DTIM                  3
45 #define WLAN_GET_TX_RATE                        4
46 #define WLANGETBCNAVG                           5
47
48 #define WLAN_GET_LINKMODE                       6
49 #define WLAN_GET_RADIOMODE                      7
50 #define WLAN_GET_DEBUGMODE                      8
51 #define WLAN_SUBCMD_FWT_CLEANUP                 15
52 #define WLAN_SUBCMD_FWT_TIME                    16
53 #define WLAN_SUBCMD_MESH_GET_TTL                17
54
55 #define WLANREGCFRDWR                   (WLANIOCTL + 18)
56
57 #define WLAN_SETNONE_GETTWELVE_CHAR (WLANIOCTL + 19)
58 #define WLAN_SUBCMD_GETRXANTENNA    1
59 #define WLAN_SUBCMD_GETTXANTENNA    2
60 #define WLAN_GET_TSF                3
61
62 #define WLAN_SETNONE_GETWORDCHAR        (WLANIOCTL + 21)
63 #define WLANGETADHOCAES                         1
64
65 #define WLAN_SETONEINT_GETONEINT        (WLANIOCTL + 23)
66 #define WLAN_BEACON_INTERVAL                    1
67 #define WLAN_LISTENINTRVL                       4
68
69 #define WLAN_TXCONTROL                          6
70 #define WLAN_NULLPKTINTERVAL                    7
71
72 #define WLAN_SETONEINT_GETNONE          (WLANIOCTL + 24)
73 #define WLAN_SUBCMD_SETRXANTENNA                1
74 #define WLAN_SUBCMD_SETTXANTENNA                2
75 #define WLANSETAUTHALG                          5
76 #define WLANSET8021XAUTHALG                     6
77 #define WLANSETENCRYPTIONMODE                   7
78 #define WLANSETREGION                           8
79 #define WLAN_SET_LISTEN_INTERVAL                9
80
81 #define WLAN_SET_MULTIPLE_DTIM                  10
82 #define WLAN_SET_ATIM_WINDOW                    11
83 #define WLANSETBCNAVG                           13
84 #define WLANSETDATAAVG                          14
85 #define WLAN_SET_LINKMODE                       15
86 #define WLAN_SET_RADIOMODE                      16
87 #define WLAN_SET_DEBUGMODE                      17
88 #define WLAN_SUBCMD_MESH_SET_TTL                18
89
90 #define WLAN_SET128CHAR_GET128CHAR      (WLANIOCTL + 25)
91 #define WLANSCAN_MODE                           6
92
93 #define WLAN_GET_ADHOC_STATUS                   9
94
95 #define WLAN_SUBCMD_BT_ADD                      18
96 #define WLAN_SUBCMD_BT_DEL                      19
97 #define WLAN_SUBCMD_BT_LIST                     20
98 #define WLAN_SUBCMD_FWT_ADD                             21
99 #define WLAN_SUBCMD_FWT_DEL             22
100 #define WLAN_SUBCMD_FWT_LOOKUP          23
101 #define WLAN_SUBCMD_FWT_LIST_NEIGHBOR                   24
102 #define WLAN_SUBCMD_FWT_LIST                    25
103 #define WLAN_SUBCMD_FWT_LIST_ROUTE                      26
104
105 #define WLAN_SET_GET_SIXTEEN_INT       (WLANIOCTL + 29)
106 #define WLAN_TPCCFG                             1
107 #define WLAN_POWERCFG                           2
108
109 #define WLAN_AUTO_FREQ_SET                      3
110 #define WLAN_AUTO_FREQ_GET                      4
111 #define WLAN_LED_GPIO_CTRL                      5
112 #define WLAN_SCANPROBES                         6
113 #define WLAN_ADAPT_RATESET                      8
114 #define WLAN_INACTIVITY_TIMEOUT                 9
115 #define WLANSNR                                 10
116 #define WLAN_GET_RATE                           11
117 #define WLAN_GET_RXINFO                         12
118
119 #define WLANCMD52RDWR                   (WLANIOCTL + 30)
120 #define WLANCMD53RDWR                   (WLANIOCTL + 31)
121 #define CMD53BUFLEN                             32
122
123 #define REG_MAC                                 0x19
124 #define REG_BBP                                 0x1a
125 #define REG_RF                                  0x1b
126 #define REG_EEPROM                              0x59
127 #define WLAN_LINKMODE_802_3                     0
128 #define WLAN_LINKMODE_802_11                    2
129 #define WLAN_RADIOMODE_NONE                     0
130 #define WLAN_RADIOMODE_RADIOTAP                 2
131
132 /** wlan_ioctl_regrdwr */
133 struct wlan_ioctl_regrdwr {
134         /** Which register to access */
135         u16 whichreg;
136         /** Read or Write */
137         u16 action;
138         u32 offset;
139         u16 NOB;
140         u32 value;
141 };
142
143 extern struct iw_handler_def libertas_handler_def;
144 int libertas_do_ioctl(struct net_device *dev, struct ifreq *req, int i);
145 int wlan_radio_ioctl(wlan_private * priv, u8 option);
146
147 #endif                          /* _WLAN_WEXT_H_ */