diff options
-rw-r--r-- | net/wireless/wext-core.c | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c index 5e1656bdf23b..dbde22b8f30f 100644 --- a/net/wireless/wext-core.c +++ b/net/wireless/wext-core.c | |||
@@ -28,226 +28,226 @@ typedef int (*wext_ioctl_func)(struct net_device *, struct iwreq *, | |||
28 | * know about. | 28 | * know about. |
29 | */ | 29 | */ |
30 | static const struct iw_ioctl_description standard_ioctl[] = { | 30 | static const struct iw_ioctl_description standard_ioctl[] = { |
31 | [SIOCSIWCOMMIT - SIOCIWFIRST] = { | 31 | [IW_IOCTL_IDX(SIOCSIWCOMMIT)] = { |
32 | .header_type = IW_HEADER_TYPE_NULL, | 32 | .header_type = IW_HEADER_TYPE_NULL, |
33 | }, | 33 | }, |
34 | [SIOCGIWNAME - SIOCIWFIRST] = { | 34 | [IW_IOCTL_IDX(SIOCGIWNAME)] = { |
35 | .header_type = IW_HEADER_TYPE_CHAR, | 35 | .header_type = IW_HEADER_TYPE_CHAR, |
36 | .flags = IW_DESCR_FLAG_DUMP, | 36 | .flags = IW_DESCR_FLAG_DUMP, |
37 | }, | 37 | }, |
38 | [SIOCSIWNWID - SIOCIWFIRST] = { | 38 | [IW_IOCTL_IDX(SIOCSIWNWID)] = { |
39 | .header_type = IW_HEADER_TYPE_PARAM, | 39 | .header_type = IW_HEADER_TYPE_PARAM, |
40 | .flags = IW_DESCR_FLAG_EVENT, | 40 | .flags = IW_DESCR_FLAG_EVENT, |
41 | }, | 41 | }, |
42 | [SIOCGIWNWID - SIOCIWFIRST] = { | 42 | [IW_IOCTL_IDX(SIOCGIWNWID)] = { |
43 | .header_type = IW_HEADER_TYPE_PARAM, | 43 | .header_type = IW_HEADER_TYPE_PARAM, |
44 | .flags = IW_DESCR_FLAG_DUMP, | 44 | .flags = IW_DESCR_FLAG_DUMP, |
45 | }, | 45 | }, |
46 | [SIOCSIWFREQ - SIOCIWFIRST] = { | 46 | [IW_IOCTL_IDX(SIOCSIWFREQ)] = { |
47 | .header_type = IW_HEADER_TYPE_FREQ, | 47 | .header_type = IW_HEADER_TYPE_FREQ, |
48 | .flags = IW_DESCR_FLAG_EVENT, | 48 | .flags = IW_DESCR_FLAG_EVENT, |
49 | }, | 49 | }, |
50 | [SIOCGIWFREQ - SIOCIWFIRST] = { | 50 | [IW_IOCTL_IDX(SIOCGIWFREQ)] = { |
51 | .header_type = IW_HEADER_TYPE_FREQ, | 51 | .header_type = IW_HEADER_TYPE_FREQ, |
52 | .flags = IW_DESCR_FLAG_DUMP, | 52 | .flags = IW_DESCR_FLAG_DUMP, |
53 | }, | 53 | }, |
54 | [SIOCSIWMODE - SIOCIWFIRST] = { | 54 | [IW_IOCTL_IDX(SIOCSIWMODE)] = { |
55 | .header_type = IW_HEADER_TYPE_UINT, | 55 | .header_type = IW_HEADER_TYPE_UINT, |
56 | .flags = IW_DESCR_FLAG_EVENT, | 56 | .flags = IW_DESCR_FLAG_EVENT, |
57 | }, | 57 | }, |
58 | [SIOCGIWMODE - SIOCIWFIRST] = { | 58 | [IW_IOCTL_IDX(SIOCGIWMODE)] = { |
59 | .header_type = IW_HEADER_TYPE_UINT, | 59 | .header_type = IW_HEADER_TYPE_UINT, |
60 | .flags = IW_DESCR_FLAG_DUMP, | 60 | .flags = IW_DESCR_FLAG_DUMP, |
61 | }, | 61 | }, |
62 | [SIOCSIWSENS - SIOCIWFIRST] = { | 62 | [IW_IOCTL_IDX(SIOCSIWSENS)] = { |
63 | .header_type = IW_HEADER_TYPE_PARAM, | 63 | .header_type = IW_HEADER_TYPE_PARAM, |
64 | }, | 64 | }, |
65 | [SIOCGIWSENS - SIOCIWFIRST] = { | 65 | [IW_IOCTL_IDX(SIOCGIWSENS)] = { |
66 | .header_type = IW_HEADER_TYPE_PARAM, | 66 | .header_type = IW_HEADER_TYPE_PARAM, |
67 | }, | 67 | }, |
68 | [SIOCSIWRANGE - SIOCIWFIRST] = { | 68 | [IW_IOCTL_IDX(SIOCSIWRANGE)] = { |
69 | .header_type = IW_HEADER_TYPE_NULL, | 69 | .header_type = IW_HEADER_TYPE_NULL, |
70 | }, | 70 | }, |
71 | [SIOCGIWRANGE - SIOCIWFIRST] = { | 71 | [IW_IOCTL_IDX(SIOCGIWRANGE)] = { |
72 | .header_type = IW_HEADER_TYPE_POINT, | 72 | .header_type = IW_HEADER_TYPE_POINT, |
73 | .token_size = 1, | 73 | .token_size = 1, |
74 | .max_tokens = sizeof(struct iw_range), | 74 | .max_tokens = sizeof(struct iw_range), |
75 | .flags = IW_DESCR_FLAG_DUMP, | 75 | .flags = IW_DESCR_FLAG_DUMP, |
76 | }, | 76 | }, |
77 | [SIOCSIWPRIV - SIOCIWFIRST] = { | 77 | [IW_IOCTL_IDX(SIOCSIWPRIV)] = { |
78 | .header_type = IW_HEADER_TYPE_NULL, | 78 | .header_type = IW_HEADER_TYPE_NULL, |
79 | }, | 79 | }, |
80 | [SIOCGIWPRIV - SIOCIWFIRST] = { /* (handled directly by us) */ | 80 | [IW_IOCTL_IDX(SIOCGIWPRIV)] = { /* (handled directly by us) */ |
81 | .header_type = IW_HEADER_TYPE_POINT, | 81 | .header_type = IW_HEADER_TYPE_POINT, |
82 | .token_size = sizeof(struct iw_priv_args), | 82 | .token_size = sizeof(struct iw_priv_args), |
83 | .max_tokens = 16, | 83 | .max_tokens = 16, |
84 | .flags = IW_DESCR_FLAG_NOMAX, | 84 | .flags = IW_DESCR_FLAG_NOMAX, |
85 | }, | 85 | }, |
86 | [SIOCSIWSTATS - SIOCIWFIRST] = { | 86 | [IW_IOCTL_IDX(SIOCSIWSTATS)] = { |
87 | .header_type = IW_HEADER_TYPE_NULL, | 87 | .header_type = IW_HEADER_TYPE_NULL, |
88 | }, | 88 | }, |
89 | [SIOCGIWSTATS - SIOCIWFIRST] = { /* (handled directly by us) */ | 89 | [IW_IOCTL_IDX(SIOCGIWSTATS)] = { /* (handled directly by us) */ |
90 | .header_type = IW_HEADER_TYPE_POINT, | 90 | .header_type = IW_HEADER_TYPE_POINT, |
91 | .token_size = 1, | 91 | .token_size = 1, |
92 | .max_tokens = sizeof(struct iw_statistics), | 92 | .max_tokens = sizeof(struct iw_statistics), |
93 | .flags = IW_DESCR_FLAG_DUMP, | 93 | .flags = IW_DESCR_FLAG_DUMP, |
94 | }, | 94 | }, |
95 | [SIOCSIWSPY - SIOCIWFIRST] = { | 95 | [IW_IOCTL_IDX(SIOCSIWSPY)] = { |
96 | .header_type = IW_HEADER_TYPE_POINT, | 96 | .header_type = IW_HEADER_TYPE_POINT, |
97 | .token_size = sizeof(struct sockaddr), | 97 | .token_size = sizeof(struct sockaddr), |
98 | .max_tokens = IW_MAX_SPY, | 98 | .max_tokens = IW_MAX_SPY, |
99 | }, | 99 | }, |
100 | [SIOCGIWSPY - SIOCIWFIRST] = { | 100 | [IW_IOCTL_IDX(SIOCGIWSPY)] = { |
101 | .header_type = IW_HEADER_TYPE_POINT, | 101 | .header_type = IW_HEADER_TYPE_POINT, |
102 | .token_size = sizeof(struct sockaddr) + | 102 | .token_size = sizeof(struct sockaddr) + |
103 | sizeof(struct iw_quality), | 103 | sizeof(struct iw_quality), |
104 | .max_tokens = IW_MAX_SPY, | 104 | .max_tokens = IW_MAX_SPY, |
105 | }, | 105 | }, |
106 | [SIOCSIWTHRSPY - SIOCIWFIRST] = { | 106 | [IW_IOCTL_IDX(SIOCSIWTHRSPY)] = { |
107 | .header_type = IW_HEADER_TYPE_POINT, | 107 | .header_type = IW_HEADER_TYPE_POINT, |
108 | .token_size = sizeof(struct iw_thrspy), | 108 | .token_size = sizeof(struct iw_thrspy), |
109 | .min_tokens = 1, | 109 | .min_tokens = 1, |
110 | .max_tokens = 1, | 110 | .max_tokens = 1, |
111 | }, | 111 | }, |
112 | [SIOCGIWTHRSPY - SIOCIWFIRST] = { | 112 | [IW_IOCTL_IDX(SIOCGIWTHRSPY)] = { |
113 | .header_type = IW_HEADER_TYPE_POINT, | 113 | .header_type = IW_HEADER_TYPE_POINT, |
114 | .token_size = sizeof(struct iw_thrspy), | 114 | .token_size = sizeof(struct iw_thrspy), |
115 | .min_tokens = 1, | 115 | .min_tokens = 1, |
116 | .max_tokens = 1, | 116 | .max_tokens = 1, |
117 | }, | 117 | }, |
118 | [SIOCSIWAP - SIOCIWFIRST] = { | 118 | [IW_IOCTL_IDX(SIOCSIWAP)] = { |
119 | .header_type = IW_HEADER_TYPE_ADDR, | 119 | .header_type = IW_HEADER_TYPE_ADDR, |
120 | }, | 120 | }, |
121 | [SIOCGIWAP - SIOCIWFIRST] = { | 121 | [IW_IOCTL_IDX(SIOCGIWAP)] = { |
122 | .header_type = IW_HEADER_TYPE_ADDR, | 122 | .header_type = IW_HEADER_TYPE_ADDR, |
123 | .flags = IW_DESCR_FLAG_DUMP, | 123 | .flags = IW_DESCR_FLAG_DUMP, |
124 | }, | 124 | }, |
125 | [SIOCSIWMLME - SIOCIWFIRST] = { | 125 | [IW_IOCTL_IDX(SIOCSIWMLME)] = { |
126 | .header_type = IW_HEADER_TYPE_POINT, | 126 | .header_type = IW_HEADER_TYPE_POINT, |
127 | .token_size = 1, | 127 | .token_size = 1, |
128 | .min_tokens = sizeof(struct iw_mlme), | 128 | .min_tokens = sizeof(struct iw_mlme), |
129 | .max_tokens = sizeof(struct iw_mlme), | 129 | .max_tokens = sizeof(struct iw_mlme), |
130 | }, | 130 | }, |
131 | [SIOCGIWAPLIST - SIOCIWFIRST] = { | 131 | [IW_IOCTL_IDX(SIOCGIWAPLIST)] = { |
132 | .header_type = IW_HEADER_TYPE_POINT, | 132 | .header_type = IW_HEADER_TYPE_POINT, |
133 | .token_size = sizeof(struct sockaddr) + | 133 | .token_size = sizeof(struct sockaddr) + |
134 | sizeof(struct iw_quality), | 134 | sizeof(struct iw_quality), |
135 | .max_tokens = IW_MAX_AP, | 135 | .max_tokens = IW_MAX_AP, |
136 | .flags = IW_DESCR_FLAG_NOMAX, | 136 | .flags = IW_DESCR_FLAG_NOMAX, |
137 | }, | 137 | }, |
138 | [SIOCSIWSCAN - SIOCIWFIRST] = { | 138 | [IW_IOCTL_IDX(SIOCSIWSCAN)] = { |
139 | .header_type = IW_HEADER_TYPE_POINT, | 139 | .header_type = IW_HEADER_TYPE_POINT, |
140 | .token_size = 1, | 140 | .token_size = 1, |
141 | .min_tokens = 0, | 141 | .min_tokens = 0, |
142 | .max_tokens = sizeof(struct iw_scan_req), | 142 | .max_tokens = sizeof(struct iw_scan_req), |
143 | }, | 143 | }, |
144 | [SIOCGIWSCAN - SIOCIWFIRST] = { | 144 | [IW_IOCTL_IDX(SIOCGIWSCAN)] = { |
145 | .header_type = IW_HEADER_TYPE_POINT, | 145 | .header_type = IW_HEADER_TYPE_POINT, |
146 | .token_size = 1, | 146 | .token_size = 1, |
147 | .max_tokens = IW_SCAN_MAX_DATA, | 147 | .max_tokens = IW_SCAN_MAX_DATA, |
148 | .flags = IW_DESCR_FLAG_NOMAX, | 148 | .flags = IW_DESCR_FLAG_NOMAX, |
149 | }, | 149 | }, |
150 | [SIOCSIWESSID - SIOCIWFIRST] = { | 150 | [IW_IOCTL_IDX(SIOCSIWESSID)] = { |
151 | .header_type = IW_HEADER_TYPE_POINT, | 151 | .header_type = IW_HEADER_TYPE_POINT, |
152 | .token_size = 1, | 152 | .token_size = 1, |
153 | .max_tokens = IW_ESSID_MAX_SIZE, | 153 | .max_tokens = IW_ESSID_MAX_SIZE, |
154 | .flags = IW_DESCR_FLAG_EVENT, | 154 | .flags = IW_DESCR_FLAG_EVENT, |
155 | }, | 155 | }, |
156 | [SIOCGIWESSID - SIOCIWFIRST] = { | 156 | [IW_IOCTL_IDX(SIOCGIWESSID)] = { |
157 | .header_type = IW_HEADER_TYPE_POINT, | 157 | .header_type = IW_HEADER_TYPE_POINT, |
158 | .token_size = 1, | 158 | .token_size = 1, |
159 | .max_tokens = IW_ESSID_MAX_SIZE, | 159 | .max_tokens = IW_ESSID_MAX_SIZE, |
160 | .flags = IW_DESCR_FLAG_DUMP, | 160 | .flags = IW_DESCR_FLAG_DUMP, |
161 | }, | 161 | }, |
162 | [SIOCSIWNICKN - SIOCIWFIRST] = { | 162 | [IW_IOCTL_IDX(SIOCSIWNICKN)] = { |
163 | .header_type = IW_HEADER_TYPE_POINT, | 163 | .header_type = IW_HEADER_TYPE_POINT, |
164 | .token_size = 1, | 164 | .token_size = 1, |
165 | .max_tokens = IW_ESSID_MAX_SIZE, | 165 | .max_tokens = IW_ESSID_MAX_SIZE, |
166 | }, | 166 | }, |
167 | [SIOCGIWNICKN - SIOCIWFIRST] = { | 167 | [IW_IOCTL_IDX(SIOCGIWNICKN)] = { |
168 | .header_type = IW_HEADER_TYPE_POINT, | 168 | .header_type = IW_HEADER_TYPE_POINT, |
169 | .token_size = 1, | 169 | .token_size = 1, |
170 | .max_tokens = IW_ESSID_MAX_SIZE, | 170 | .max_tokens = IW_ESSID_MAX_SIZE, |
171 | }, | 171 | }, |
172 | [SIOCSIWRATE - SIOCIWFIRST] = { | 172 | [IW_IOCTL_IDX(SIOCSIWRATE)] = { |
173 | .header_type = IW_HEADER_TYPE_PARAM, | 173 | .header_type = IW_HEADER_TYPE_PARAM, |
174 | }, | 174 | }, |
175 | [SIOCGIWRATE - SIOCIWFIRST] = { | 175 | [IW_IOCTL_IDX(SIOCGIWRATE)] = { |
176 | .header_type = IW_HEADER_TYPE_PARAM, | 176 | .header_type = IW_HEADER_TYPE_PARAM, |
177 | }, | 177 | }, |
178 | [SIOCSIWRTS - SIOCIWFIRST] = { | 178 | [IW_IOCTL_IDX(SIOCSIWRTS)] = { |
179 | .header_type = IW_HEADER_TYPE_PARAM, | 179 | .header_type = IW_HEADER_TYPE_PARAM, |
180 | }, | 180 | }, |
181 | [SIOCGIWRTS - SIOCIWFIRST] = { | 181 | [IW_IOCTL_IDX(SIOCGIWRTS)] = { |
182 | .header_type = IW_HEADER_TYPE_PARAM, | 182 | .header_type = IW_HEADER_TYPE_PARAM, |
183 | }, | 183 | }, |
184 | [SIOCSIWFRAG - SIOCIWFIRST] = { | 184 | [IW_IOCTL_IDX(SIOCSIWFRAG)] = { |
185 | .header_type = IW_HEADER_TYPE_PARAM, | 185 | .header_type = IW_HEADER_TYPE_PARAM, |
186 | }, | 186 | }, |
187 | [SIOCGIWFRAG - SIOCIWFIRST] = { | 187 | [IW_IOCTL_IDX(SIOCGIWFRAG)] = { |
188 | .header_type = IW_HEADER_TYPE_PARAM, | 188 | .header_type = IW_HEADER_TYPE_PARAM, |
189 | }, | 189 | }, |
190 | [SIOCSIWTXPOW - SIOCIWFIRST] = { | 190 | [IW_IOCTL_IDX(SIOCSIWTXPOW)] = { |
191 | .header_type = IW_HEADER_TYPE_PARAM, | 191 | .header_type = IW_HEADER_TYPE_PARAM, |
192 | }, | 192 | }, |
193 | [SIOCGIWTXPOW - SIOCIWFIRST] = { | 193 | [IW_IOCTL_IDX(SIOCGIWTXPOW)] = { |
194 | .header_type = IW_HEADER_TYPE_PARAM, | 194 | .header_type = IW_HEADER_TYPE_PARAM, |
195 | }, | 195 | }, |
196 | [SIOCSIWRETRY - SIOCIWFIRST] = { | 196 | [IW_IOCTL_IDX(SIOCSIWRETRY)] = { |
197 | .header_type = IW_HEADER_TYPE_PARAM, | 197 | .header_type = IW_HEADER_TYPE_PARAM, |
198 | }, | 198 | }, |
199 | [SIOCGIWRETRY - SIOCIWFIRST] = { | 199 | [IW_IOCTL_IDX(SIOCGIWRETRY)] = { |
200 | .header_type = IW_HEADER_TYPE_PARAM, | 200 | .header_type = IW_HEADER_TYPE_PARAM, |
201 | }, | 201 | }, |
202 | [SIOCSIWENCODE - SIOCIWFIRST] = { | 202 | [IW_IOCTL_IDX(SIOCSIWENCODE)] = { |
203 | .header_type = IW_HEADER_TYPE_POINT, | 203 | .header_type = IW_HEADER_TYPE_POINT, |
204 | .token_size = 1, | 204 | .token_size = 1, |
205 | .max_tokens = IW_ENCODING_TOKEN_MAX, | 205 | .max_tokens = IW_ENCODING_TOKEN_MAX, |
206 | .flags = IW_DESCR_FLAG_EVENT | IW_DESCR_FLAG_RESTRICT, | 206 | .flags = IW_DESCR_FLAG_EVENT | IW_DESCR_FLAG_RESTRICT, |
207 | }, | 207 | }, |
208 | [SIOCGIWENCODE - SIOCIWFIRST] = { | 208 | [IW_IOCTL_IDX(SIOCGIWENCODE)] = { |
209 | .header_type = IW_HEADER_TYPE_POINT, | 209 | .header_type = IW_HEADER_TYPE_POINT, |
210 | .token_size = 1, | 210 | .token_size = 1, |
211 | .max_tokens = IW_ENCODING_TOKEN_MAX, | 211 | .max_tokens = IW_ENCODING_TOKEN_MAX, |
212 | .flags = IW_DESCR_FLAG_DUMP | IW_DESCR_FLAG_RESTRICT, | 212 | .flags = IW_DESCR_FLAG_DUMP | IW_DESCR_FLAG_RESTRICT, |
213 | }, | 213 | }, |
214 | [SIOCSIWPOWER - SIOCIWFIRST] = { | 214 | [IW_IOCTL_IDX(SIOCSIWPOWER)] = { |
215 | .header_type = IW_HEADER_TYPE_PARAM, | 215 | .header_type = IW_HEADER_TYPE_PARAM, |
216 | }, | 216 | }, |
217 | [SIOCGIWPOWER - SIOCIWFIRST] = { | 217 | [IW_IOCTL_IDX(SIOCGIWPOWER)] = { |
218 | .header_type = IW_HEADER_TYPE_PARAM, | 218 | .header_type = IW_HEADER_TYPE_PARAM, |
219 | }, | 219 | }, |
220 | [SIOCSIWGENIE - SIOCIWFIRST] = { | 220 | [IW_IOCTL_IDX(SIOCSIWGENIE)] = { |
221 | .header_type = IW_HEADER_TYPE_POINT, | 221 | .header_type = IW_HEADER_TYPE_POINT, |
222 | .token_size = 1, | 222 | .token_size = 1, |
223 | .max_tokens = IW_GENERIC_IE_MAX, | 223 | .max_tokens = IW_GENERIC_IE_MAX, |
224 | }, | 224 | }, |
225 | [SIOCGIWGENIE - SIOCIWFIRST] = { | 225 | [IW_IOCTL_IDX(SIOCGIWGENIE)] = { |
226 | .header_type = IW_HEADER_TYPE_POINT, | 226 | .header_type = IW_HEADER_TYPE_POINT, |
227 | .token_size = 1, | 227 | .token_size = 1, |
228 | .max_tokens = IW_GENERIC_IE_MAX, | 228 | .max_tokens = IW_GENERIC_IE_MAX, |
229 | }, | 229 | }, |
230 | [SIOCSIWAUTH - SIOCIWFIRST] = { | 230 | [IW_IOCTL_IDX(SIOCSIWAUTH)] = { |
231 | .header_type = IW_HEADER_TYPE_PARAM, | 231 | .header_type = IW_HEADER_TYPE_PARAM, |
232 | }, | 232 | }, |
233 | [SIOCGIWAUTH - SIOCIWFIRST] = { | 233 | [IW_IOCTL_IDX(SIOCGIWAUTH)] = { |
234 | .header_type = IW_HEADER_TYPE_PARAM, | 234 | .header_type = IW_HEADER_TYPE_PARAM, |
235 | }, | 235 | }, |
236 | [SIOCSIWENCODEEXT - SIOCIWFIRST] = { | 236 | [IW_IOCTL_IDX(SIOCSIWENCODEEXT)] = { |
237 | .header_type = IW_HEADER_TYPE_POINT, | 237 | .header_type = IW_HEADER_TYPE_POINT, |
238 | .token_size = 1, | 238 | .token_size = 1, |
239 | .min_tokens = sizeof(struct iw_encode_ext), | 239 | .min_tokens = sizeof(struct iw_encode_ext), |
240 | .max_tokens = sizeof(struct iw_encode_ext) + | 240 | .max_tokens = sizeof(struct iw_encode_ext) + |
241 | IW_ENCODING_TOKEN_MAX, | 241 | IW_ENCODING_TOKEN_MAX, |
242 | }, | 242 | }, |
243 | [SIOCGIWENCODEEXT - SIOCIWFIRST] = { | 243 | [IW_IOCTL_IDX(SIOCGIWENCODEEXT)] = { |
244 | .header_type = IW_HEADER_TYPE_POINT, | 244 | .header_type = IW_HEADER_TYPE_POINT, |
245 | .token_size = 1, | 245 | .token_size = 1, |
246 | .min_tokens = sizeof(struct iw_encode_ext), | 246 | .min_tokens = sizeof(struct iw_encode_ext), |
247 | .max_tokens = sizeof(struct iw_encode_ext) + | 247 | .max_tokens = sizeof(struct iw_encode_ext) + |
248 | IW_ENCODING_TOKEN_MAX, | 248 | IW_ENCODING_TOKEN_MAX, |
249 | }, | 249 | }, |
250 | [SIOCSIWPMKSA - SIOCIWFIRST] = { | 250 | [IW_IOCTL_IDX(SIOCSIWPMKSA)] = { |
251 | .header_type = IW_HEADER_TYPE_POINT, | 251 | .header_type = IW_HEADER_TYPE_POINT, |
252 | .token_size = 1, | 252 | .token_size = 1, |
253 | .min_tokens = sizeof(struct iw_pmksa), | 253 | .min_tokens = sizeof(struct iw_pmksa), |
@@ -449,7 +449,7 @@ void wireless_send_event(struct net_device * dev, | |||
449 | 449 | ||
450 | /* Get the description of the Event */ | 450 | /* Get the description of the Event */ |
451 | if (cmd <= SIOCIWLAST) { | 451 | if (cmd <= SIOCIWLAST) { |
452 | cmd_index = cmd - SIOCIWFIRST; | 452 | cmd_index = IW_IOCTL_IDX(cmd); |
453 | if (cmd_index < standard_ioctl_num) | 453 | if (cmd_index < standard_ioctl_num) |
454 | descr = &(standard_ioctl[cmd_index]); | 454 | descr = &(standard_ioctl[cmd_index]); |
455 | } else { | 455 | } else { |
@@ -662,7 +662,7 @@ static iw_handler get_handler(struct net_device *dev, unsigned int cmd) | |||
662 | return NULL; | 662 | return NULL; |
663 | 663 | ||
664 | /* Try as a standard command */ | 664 | /* Try as a standard command */ |
665 | index = cmd - SIOCIWFIRST; | 665 | index = IW_IOCTL_IDX(cmd); |
666 | if (index < handlers->num_standard) | 666 | if (index < handlers->num_standard) |
667 | return handlers->standard[index]; | 667 | return handlers->standard[index]; |
668 | 668 | ||
@@ -954,9 +954,9 @@ static int ioctl_standard_call(struct net_device * dev, | |||
954 | int ret = -EINVAL; | 954 | int ret = -EINVAL; |
955 | 955 | ||
956 | /* Get the description of the IOCTL */ | 956 | /* Get the description of the IOCTL */ |
957 | if ((cmd - SIOCIWFIRST) >= standard_ioctl_num) | 957 | if (IW_IOCTL_IDX(cmd) >= standard_ioctl_num) |
958 | return -EOPNOTSUPP; | 958 | return -EOPNOTSUPP; |
959 | descr = &(standard_ioctl[cmd - SIOCIWFIRST]); | 959 | descr = &(standard_ioctl[IW_IOCTL_IDX(cmd)]); |
960 | 960 | ||
961 | /* Check if we have a pointer to user space data or not */ | 961 | /* Check if we have a pointer to user space data or not */ |
962 | if (descr->header_type != IW_HEADER_TYPE_POINT) { | 962 | if (descr->header_type != IW_HEADER_TYPE_POINT) { |
@@ -1012,7 +1012,7 @@ static int compat_standard_call(struct net_device *dev, | |||
1012 | struct iw_point iwp; | 1012 | struct iw_point iwp; |
1013 | int err; | 1013 | int err; |
1014 | 1014 | ||
1015 | descr = standard_ioctl + (cmd - SIOCIWFIRST); | 1015 | descr = standard_ioctl + IW_IOCTL_IDX(cmd); |
1016 | 1016 | ||
1017 | if (descr->header_type != IW_HEADER_TYPE_POINT) | 1017 | if (descr->header_type != IW_HEADER_TYPE_POINT) |
1018 | return ioctl_standard_call(dev, iwr, cmd, info, handler); | 1018 | return ioctl_standard_call(dev, iwr, cmd, info, handler); |