Commit | Line | Data |
---|---|---|
f0706e82 JB |
1 | /* |
2 | * mac80211 configuration hooks for cfg80211 | |
3 | * | |
62da92fb | 4 | * Copyright 2006, 2007 Johannes Berg <johannes@sipsolutions.net> |
f0706e82 JB |
5 | * |
6 | * This file is GPLv2 as found in COPYING. | |
7 | */ | |
8 | ||
e8cbb4cb | 9 | #include <linux/ieee80211.h> |
f0706e82 JB |
10 | #include <linux/nl80211.h> |
11 | #include <linux/rtnetlink.h> | |
881d966b | 12 | #include <net/net_namespace.h> |
5dfdaf58 | 13 | #include <linux/rcupdate.h> |
f0706e82 JB |
14 | #include <net/cfg80211.h> |
15 | #include "ieee80211_i.h" | |
e0eb6859 | 16 | #include "cfg.h" |
2c8dccc7 | 17 | #include "rate.h" |
c5dd9c2b | 18 | #include "mesh.h" |
c5dd9c2b | 19 | |
42613db7 JB |
20 | static enum ieee80211_if_types |
21 | nl80211_type_to_mac80211_type(enum nl80211_iftype type) | |
22 | { | |
23 | switch (type) { | |
24 | case NL80211_IFTYPE_UNSPECIFIED: | |
25 | return IEEE80211_IF_TYPE_STA; | |
26 | case NL80211_IFTYPE_ADHOC: | |
27 | return IEEE80211_IF_TYPE_IBSS; | |
28 | case NL80211_IFTYPE_STATION: | |
29 | return IEEE80211_IF_TYPE_STA; | |
30 | case NL80211_IFTYPE_MONITOR: | |
31 | return IEEE80211_IF_TYPE_MNTR; | |
c5dd9c2b LCC |
32 | #ifdef CONFIG_MAC80211_MESH |
33 | case NL80211_IFTYPE_MESH_POINT: | |
34 | return IEEE80211_IF_TYPE_MESH_POINT; | |
35 | #endif | |
b454048c JB |
36 | case NL80211_IFTYPE_WDS: |
37 | return IEEE80211_IF_TYPE_WDS; | |
42613db7 JB |
38 | default: |
39 | return IEEE80211_IF_TYPE_INVALID; | |
40 | } | |
41 | } | |
42 | ||
f0706e82 | 43 | static int ieee80211_add_iface(struct wiphy *wiphy, char *name, |
2ec600d6 LCC |
44 | enum nl80211_iftype type, u32 *flags, |
45 | struct vif_params *params) | |
f0706e82 JB |
46 | { |
47 | struct ieee80211_local *local = wiphy_priv(wiphy); | |
42613db7 | 48 | enum ieee80211_if_types itype; |
8cc9a739 MW |
49 | struct net_device *dev; |
50 | struct ieee80211_sub_if_data *sdata; | |
51 | int err; | |
f0706e82 | 52 | |
42613db7 JB |
53 | itype = nl80211_type_to_mac80211_type(type); |
54 | if (itype == IEEE80211_IF_TYPE_INVALID) | |
f0706e82 | 55 | return -EINVAL; |
f0706e82 | 56 | |
3e122be0 | 57 | err = ieee80211_if_add(local, name, &dev, itype, params); |
8cc9a739 MW |
58 | if (err || itype != IEEE80211_IF_TYPE_MNTR || !flags) |
59 | return err; | |
60 | ||
61 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | |
62 | sdata->u.mntr_flags = *flags; | |
63 | return 0; | |
f0706e82 JB |
64 | } |
65 | ||
66 | static int ieee80211_del_iface(struct wiphy *wiphy, int ifindex) | |
67 | { | |
f0706e82 | 68 | struct net_device *dev; |
f698d856 | 69 | struct ieee80211_sub_if_data *sdata; |
f0706e82 | 70 | |
42613db7 JB |
71 | /* we're under RTNL */ |
72 | dev = __dev_get_by_index(&init_net, ifindex); | |
f0706e82 | 73 | if (!dev) |
75636525 | 74 | return -ENODEV; |
f0706e82 | 75 | |
f698d856 JBG |
76 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
77 | ||
78 | ieee80211_if_remove(sdata); | |
f0706e82 | 79 | |
75636525 | 80 | return 0; |
f0706e82 JB |
81 | } |
82 | ||
42613db7 | 83 | static int ieee80211_change_iface(struct wiphy *wiphy, int ifindex, |
2ec600d6 LCC |
84 | enum nl80211_iftype type, u32 *flags, |
85 | struct vif_params *params) | |
42613db7 | 86 | { |
14db74bc | 87 | struct ieee80211_local *local = wiphy_priv(wiphy); |
42613db7 JB |
88 | struct net_device *dev; |
89 | enum ieee80211_if_types itype; | |
90 | struct ieee80211_sub_if_data *sdata; | |
f3947e2d | 91 | int ret; |
42613db7 | 92 | |
42613db7 JB |
93 | /* we're under RTNL */ |
94 | dev = __dev_get_by_index(&init_net, ifindex); | |
95 | if (!dev) | |
96 | return -ENODEV; | |
97 | ||
42613db7 JB |
98 | itype = nl80211_type_to_mac80211_type(type); |
99 | if (itype == IEEE80211_IF_TYPE_INVALID) | |
100 | return -EINVAL; | |
101 | ||
14db74bc JB |
102 | if (dev == local->mdev) |
103 | return -EOPNOTSUPP; | |
104 | ||
42613db7 JB |
105 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
106 | ||
f3947e2d JB |
107 | ret = ieee80211_if_change_type(sdata, itype); |
108 | if (ret) | |
109 | return ret; | |
42613db7 | 110 | |
902acc78 JB |
111 | if (ieee80211_vif_is_mesh(&sdata->vif) && params->mesh_id_len) |
112 | ieee80211_if_sta_set_mesh_id(&sdata->u.sta, | |
113 | params->mesh_id_len, | |
114 | params->mesh_id); | |
c5dd9c2b | 115 | |
8cc9a739 MW |
116 | if (sdata->vif.type != IEEE80211_IF_TYPE_MNTR || !flags) |
117 | return 0; | |
118 | ||
119 | sdata->u.mntr_flags = *flags; | |
42613db7 JB |
120 | return 0; |
121 | } | |
122 | ||
e8cbb4cb JB |
123 | static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev, |
124 | u8 key_idx, u8 *mac_addr, | |
125 | struct key_params *params) | |
126 | { | |
14db74bc | 127 | struct ieee80211_local *local = wiphy_priv(wiphy); |
e8cbb4cb JB |
128 | struct ieee80211_sub_if_data *sdata; |
129 | struct sta_info *sta = NULL; | |
130 | enum ieee80211_key_alg alg; | |
db4d1169 | 131 | struct ieee80211_key *key; |
3b96766f | 132 | int err; |
e8cbb4cb | 133 | |
14db74bc JB |
134 | if (dev == local->mdev) |
135 | return -EOPNOTSUPP; | |
136 | ||
e8cbb4cb JB |
137 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
138 | ||
139 | switch (params->cipher) { | |
140 | case WLAN_CIPHER_SUITE_WEP40: | |
141 | case WLAN_CIPHER_SUITE_WEP104: | |
142 | alg = ALG_WEP; | |
143 | break; | |
144 | case WLAN_CIPHER_SUITE_TKIP: | |
145 | alg = ALG_TKIP; | |
146 | break; | |
147 | case WLAN_CIPHER_SUITE_CCMP: | |
148 | alg = ALG_CCMP; | |
149 | break; | |
150 | default: | |
151 | return -EINVAL; | |
152 | } | |
153 | ||
db4d1169 JB |
154 | key = ieee80211_key_alloc(alg, key_idx, params->key_len, params->key); |
155 | if (!key) | |
156 | return -ENOMEM; | |
157 | ||
3b96766f JB |
158 | rcu_read_lock(); |
159 | ||
e8cbb4cb JB |
160 | if (mac_addr) { |
161 | sta = sta_info_get(sdata->local, mac_addr); | |
db4d1169 JB |
162 | if (!sta) { |
163 | ieee80211_key_free(key); | |
3b96766f JB |
164 | err = -ENOENT; |
165 | goto out_unlock; | |
db4d1169 | 166 | } |
e8cbb4cb JB |
167 | } |
168 | ||
db4d1169 JB |
169 | ieee80211_key_link(key, sdata, sta); |
170 | ||
3b96766f JB |
171 | err = 0; |
172 | out_unlock: | |
173 | rcu_read_unlock(); | |
174 | ||
175 | return err; | |
e8cbb4cb JB |
176 | } |
177 | ||
178 | static int ieee80211_del_key(struct wiphy *wiphy, struct net_device *dev, | |
179 | u8 key_idx, u8 *mac_addr) | |
180 | { | |
14db74bc | 181 | struct ieee80211_local *local = wiphy_priv(wiphy); |
e8cbb4cb JB |
182 | struct ieee80211_sub_if_data *sdata; |
183 | struct sta_info *sta; | |
184 | int ret; | |
185 | ||
14db74bc JB |
186 | if (dev == local->mdev) |
187 | return -EOPNOTSUPP; | |
188 | ||
e8cbb4cb JB |
189 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
190 | ||
3b96766f JB |
191 | rcu_read_lock(); |
192 | ||
e8cbb4cb | 193 | if (mac_addr) { |
3b96766f JB |
194 | ret = -ENOENT; |
195 | ||
e8cbb4cb JB |
196 | sta = sta_info_get(sdata->local, mac_addr); |
197 | if (!sta) | |
3b96766f | 198 | goto out_unlock; |
e8cbb4cb | 199 | |
db4d1169 | 200 | if (sta->key) { |
d0709a65 | 201 | ieee80211_key_free(sta->key); |
db4d1169 | 202 | WARN_ON(sta->key); |
3b96766f JB |
203 | ret = 0; |
204 | } | |
e8cbb4cb | 205 | |
3b96766f | 206 | goto out_unlock; |
e8cbb4cb JB |
207 | } |
208 | ||
3b96766f JB |
209 | if (!sdata->keys[key_idx]) { |
210 | ret = -ENOENT; | |
211 | goto out_unlock; | |
212 | } | |
e8cbb4cb | 213 | |
d0709a65 | 214 | ieee80211_key_free(sdata->keys[key_idx]); |
db4d1169 | 215 | WARN_ON(sdata->keys[key_idx]); |
e8cbb4cb | 216 | |
3b96766f JB |
217 | ret = 0; |
218 | out_unlock: | |
219 | rcu_read_unlock(); | |
220 | ||
221 | return ret; | |
e8cbb4cb JB |
222 | } |
223 | ||
62da92fb JB |
224 | static int ieee80211_get_key(struct wiphy *wiphy, struct net_device *dev, |
225 | u8 key_idx, u8 *mac_addr, void *cookie, | |
226 | void (*callback)(void *cookie, | |
227 | struct key_params *params)) | |
228 | { | |
14db74bc JB |
229 | struct ieee80211_local *local = wiphy_priv(wiphy); |
230 | struct ieee80211_sub_if_data *sdata; | |
62da92fb JB |
231 | struct sta_info *sta = NULL; |
232 | u8 seq[6] = {0}; | |
233 | struct key_params params; | |
234 | struct ieee80211_key *key; | |
235 | u32 iv32; | |
236 | u16 iv16; | |
237 | int err = -ENOENT; | |
238 | ||
14db74bc JB |
239 | if (dev == local->mdev) |
240 | return -EOPNOTSUPP; | |
241 | ||
242 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | |
243 | ||
3b96766f JB |
244 | rcu_read_lock(); |
245 | ||
62da92fb JB |
246 | if (mac_addr) { |
247 | sta = sta_info_get(sdata->local, mac_addr); | |
248 | if (!sta) | |
249 | goto out; | |
250 | ||
251 | key = sta->key; | |
252 | } else | |
253 | key = sdata->keys[key_idx]; | |
254 | ||
255 | if (!key) | |
256 | goto out; | |
257 | ||
258 | memset(¶ms, 0, sizeof(params)); | |
259 | ||
260 | switch (key->conf.alg) { | |
261 | case ALG_TKIP: | |
262 | params.cipher = WLAN_CIPHER_SUITE_TKIP; | |
263 | ||
b0f76b33 HH |
264 | iv32 = key->u.tkip.tx.iv32; |
265 | iv16 = key->u.tkip.tx.iv16; | |
62da92fb JB |
266 | |
267 | if (key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE && | |
268 | sdata->local->ops->get_tkip_seq) | |
269 | sdata->local->ops->get_tkip_seq( | |
270 | local_to_hw(sdata->local), | |
271 | key->conf.hw_key_idx, | |
272 | &iv32, &iv16); | |
273 | ||
274 | seq[0] = iv16 & 0xff; | |
275 | seq[1] = (iv16 >> 8) & 0xff; | |
276 | seq[2] = iv32 & 0xff; | |
277 | seq[3] = (iv32 >> 8) & 0xff; | |
278 | seq[4] = (iv32 >> 16) & 0xff; | |
279 | seq[5] = (iv32 >> 24) & 0xff; | |
280 | params.seq = seq; | |
281 | params.seq_len = 6; | |
282 | break; | |
283 | case ALG_CCMP: | |
284 | params.cipher = WLAN_CIPHER_SUITE_CCMP; | |
285 | seq[0] = key->u.ccmp.tx_pn[5]; | |
286 | seq[1] = key->u.ccmp.tx_pn[4]; | |
287 | seq[2] = key->u.ccmp.tx_pn[3]; | |
288 | seq[3] = key->u.ccmp.tx_pn[2]; | |
289 | seq[4] = key->u.ccmp.tx_pn[1]; | |
290 | seq[5] = key->u.ccmp.tx_pn[0]; | |
291 | params.seq = seq; | |
292 | params.seq_len = 6; | |
293 | break; | |
294 | case ALG_WEP: | |
295 | if (key->conf.keylen == 5) | |
296 | params.cipher = WLAN_CIPHER_SUITE_WEP40; | |
297 | else | |
298 | params.cipher = WLAN_CIPHER_SUITE_WEP104; | |
299 | break; | |
300 | } | |
301 | ||
302 | params.key = key->conf.key; | |
303 | params.key_len = key->conf.keylen; | |
304 | ||
305 | callback(cookie, ¶ms); | |
306 | err = 0; | |
307 | ||
308 | out: | |
3b96766f | 309 | rcu_read_unlock(); |
62da92fb JB |
310 | return err; |
311 | } | |
312 | ||
e8cbb4cb JB |
313 | static int ieee80211_config_default_key(struct wiphy *wiphy, |
314 | struct net_device *dev, | |
315 | u8 key_idx) | |
316 | { | |
14db74bc | 317 | struct ieee80211_local *local = wiphy_priv(wiphy); |
e8cbb4cb JB |
318 | struct ieee80211_sub_if_data *sdata; |
319 | ||
14db74bc JB |
320 | if (dev == local->mdev) |
321 | return -EOPNOTSUPP; | |
322 | ||
3b96766f JB |
323 | rcu_read_lock(); |
324 | ||
e8cbb4cb JB |
325 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
326 | ieee80211_set_default_key(sdata, key_idx); | |
327 | ||
3b96766f JB |
328 | rcu_read_unlock(); |
329 | ||
e8cbb4cb JB |
330 | return 0; |
331 | } | |
332 | ||
c5dd9c2b LCC |
333 | static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo) |
334 | { | |
d0709a65 | 335 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
c5dd9c2b LCC |
336 | |
337 | sinfo->filled = STATION_INFO_INACTIVE_TIME | | |
338 | STATION_INFO_RX_BYTES | | |
339 | STATION_INFO_TX_BYTES; | |
340 | ||
341 | sinfo->inactive_time = jiffies_to_msecs(jiffies - sta->last_rx); | |
342 | sinfo->rx_bytes = sta->rx_bytes; | |
343 | sinfo->tx_bytes = sta->tx_bytes; | |
344 | ||
902acc78 | 345 | if (ieee80211_vif_is_mesh(&sdata->vif)) { |
c5dd9c2b | 346 | #ifdef CONFIG_MAC80211_MESH |
c5dd9c2b LCC |
347 | sinfo->filled |= STATION_INFO_LLID | |
348 | STATION_INFO_PLID | | |
349 | STATION_INFO_PLINK_STATE; | |
350 | ||
351 | sinfo->llid = le16_to_cpu(sta->llid); | |
352 | sinfo->plid = le16_to_cpu(sta->plid); | |
353 | sinfo->plink_state = sta->plink_state; | |
c5dd9c2b | 354 | #endif |
902acc78 | 355 | } |
c5dd9c2b LCC |
356 | } |
357 | ||
358 | ||
359 | static int ieee80211_dump_station(struct wiphy *wiphy, struct net_device *dev, | |
360 | int idx, u8 *mac, struct station_info *sinfo) | |
361 | { | |
362 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | |
363 | struct sta_info *sta; | |
d0709a65 JB |
364 | int ret = -ENOENT; |
365 | ||
366 | rcu_read_lock(); | |
c5dd9c2b LCC |
367 | |
368 | sta = sta_info_get_by_idx(local, idx, dev); | |
d0709a65 JB |
369 | if (sta) { |
370 | ret = 0; | |
371 | memcpy(mac, sta->addr, ETH_ALEN); | |
372 | sta_set_sinfo(sta, sinfo); | |
373 | } | |
c5dd9c2b | 374 | |
d0709a65 | 375 | rcu_read_unlock(); |
c5dd9c2b | 376 | |
d0709a65 | 377 | return ret; |
c5dd9c2b LCC |
378 | } |
379 | ||
7bbdd2d9 | 380 | static int ieee80211_get_station(struct wiphy *wiphy, struct net_device *dev, |
2ec600d6 | 381 | u8 *mac, struct station_info *sinfo) |
7bbdd2d9 JB |
382 | { |
383 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | |
384 | struct sta_info *sta; | |
d0709a65 | 385 | int ret = -ENOENT; |
7bbdd2d9 | 386 | |
d0709a65 | 387 | rcu_read_lock(); |
7bbdd2d9 JB |
388 | |
389 | /* XXX: verify sta->dev == dev */ | |
7bbdd2d9 | 390 | |
d0709a65 JB |
391 | sta = sta_info_get(local, mac); |
392 | if (sta) { | |
393 | ret = 0; | |
394 | sta_set_sinfo(sta, sinfo); | |
395 | } | |
396 | ||
397 | rcu_read_unlock(); | |
398 | ||
399 | return ret; | |
7bbdd2d9 JB |
400 | } |
401 | ||
5dfdaf58 JB |
402 | /* |
403 | * This handles both adding a beacon and setting new beacon info | |
404 | */ | |
405 | static int ieee80211_config_beacon(struct ieee80211_sub_if_data *sdata, | |
406 | struct beacon_parameters *params) | |
407 | { | |
408 | struct beacon_data *new, *old; | |
409 | int new_head_len, new_tail_len; | |
410 | int size; | |
411 | int err = -EINVAL; | |
412 | ||
413 | old = sdata->u.ap.beacon; | |
414 | ||
415 | /* head must not be zero-length */ | |
416 | if (params->head && !params->head_len) | |
417 | return -EINVAL; | |
418 | ||
419 | /* | |
420 | * This is a kludge. beacon interval should really be part | |
421 | * of the beacon information. | |
422 | */ | |
423 | if (params->interval) { | |
424 | sdata->local->hw.conf.beacon_int = params->interval; | |
425 | if (ieee80211_hw_config(sdata->local)) | |
426 | return -EINVAL; | |
427 | /* | |
428 | * We updated some parameter so if below bails out | |
429 | * it's not an error. | |
430 | */ | |
431 | err = 0; | |
432 | } | |
433 | ||
434 | /* Need to have a beacon head if we don't have one yet */ | |
435 | if (!params->head && !old) | |
436 | return err; | |
437 | ||
438 | /* sorry, no way to start beaconing without dtim period */ | |
439 | if (!params->dtim_period && !old) | |
440 | return err; | |
441 | ||
442 | /* new or old head? */ | |
443 | if (params->head) | |
444 | new_head_len = params->head_len; | |
445 | else | |
446 | new_head_len = old->head_len; | |
447 | ||
448 | /* new or old tail? */ | |
449 | if (params->tail || !old) | |
450 | /* params->tail_len will be zero for !params->tail */ | |
451 | new_tail_len = params->tail_len; | |
452 | else | |
453 | new_tail_len = old->tail_len; | |
454 | ||
455 | size = sizeof(*new) + new_head_len + new_tail_len; | |
456 | ||
457 | new = kzalloc(size, GFP_KERNEL); | |
458 | if (!new) | |
459 | return -ENOMEM; | |
460 | ||
461 | /* start filling the new info now */ | |
462 | ||
463 | /* new or old dtim period? */ | |
464 | if (params->dtim_period) | |
465 | new->dtim_period = params->dtim_period; | |
466 | else | |
467 | new->dtim_period = old->dtim_period; | |
468 | ||
469 | /* | |
470 | * pointers go into the block we allocated, | |
471 | * memory is | beacon_data | head | tail | | |
472 | */ | |
473 | new->head = ((u8 *) new) + sizeof(*new); | |
474 | new->tail = new->head + new_head_len; | |
475 | new->head_len = new_head_len; | |
476 | new->tail_len = new_tail_len; | |
477 | ||
478 | /* copy in head */ | |
479 | if (params->head) | |
480 | memcpy(new->head, params->head, new_head_len); | |
481 | else | |
482 | memcpy(new->head, old->head, new_head_len); | |
483 | ||
484 | /* copy in optional tail */ | |
485 | if (params->tail) | |
486 | memcpy(new->tail, params->tail, new_tail_len); | |
487 | else | |
488 | if (old) | |
489 | memcpy(new->tail, old->tail, new_tail_len); | |
490 | ||
491 | rcu_assign_pointer(sdata->u.ap.beacon, new); | |
492 | ||
493 | synchronize_rcu(); | |
494 | ||
495 | kfree(old); | |
496 | ||
9d139c81 | 497 | return ieee80211_if_config(sdata, IEEE80211_IFCC_BEACON); |
5dfdaf58 JB |
498 | } |
499 | ||
500 | static int ieee80211_add_beacon(struct wiphy *wiphy, struct net_device *dev, | |
501 | struct beacon_parameters *params) | |
502 | { | |
14db74bc JB |
503 | struct ieee80211_local *local = wiphy_priv(wiphy); |
504 | struct ieee80211_sub_if_data *sdata; | |
5dfdaf58 JB |
505 | struct beacon_data *old; |
506 | ||
14db74bc JB |
507 | if (dev == local->mdev) |
508 | return -EOPNOTSUPP; | |
509 | ||
510 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | |
511 | ||
5dfdaf58 JB |
512 | if (sdata->vif.type != IEEE80211_IF_TYPE_AP) |
513 | return -EINVAL; | |
514 | ||
515 | old = sdata->u.ap.beacon; | |
516 | ||
517 | if (old) | |
518 | return -EALREADY; | |
519 | ||
520 | return ieee80211_config_beacon(sdata, params); | |
521 | } | |
522 | ||
523 | static int ieee80211_set_beacon(struct wiphy *wiphy, struct net_device *dev, | |
524 | struct beacon_parameters *params) | |
525 | { | |
14db74bc JB |
526 | struct ieee80211_local *local = wiphy_priv(wiphy); |
527 | struct ieee80211_sub_if_data *sdata; | |
5dfdaf58 JB |
528 | struct beacon_data *old; |
529 | ||
14db74bc JB |
530 | if (dev == local->mdev) |
531 | return -EOPNOTSUPP; | |
532 | ||
533 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | |
534 | ||
5dfdaf58 JB |
535 | if (sdata->vif.type != IEEE80211_IF_TYPE_AP) |
536 | return -EINVAL; | |
537 | ||
538 | old = sdata->u.ap.beacon; | |
539 | ||
540 | if (!old) | |
541 | return -ENOENT; | |
542 | ||
543 | return ieee80211_config_beacon(sdata, params); | |
544 | } | |
545 | ||
546 | static int ieee80211_del_beacon(struct wiphy *wiphy, struct net_device *dev) | |
547 | { | |
14db74bc JB |
548 | struct ieee80211_local *local = wiphy_priv(wiphy); |
549 | struct ieee80211_sub_if_data *sdata; | |
5dfdaf58 JB |
550 | struct beacon_data *old; |
551 | ||
14db74bc JB |
552 | if (dev == local->mdev) |
553 | return -EOPNOTSUPP; | |
554 | ||
555 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | |
556 | ||
5dfdaf58 JB |
557 | if (sdata->vif.type != IEEE80211_IF_TYPE_AP) |
558 | return -EINVAL; | |
559 | ||
560 | old = sdata->u.ap.beacon; | |
561 | ||
562 | if (!old) | |
563 | return -ENOENT; | |
564 | ||
565 | rcu_assign_pointer(sdata->u.ap.beacon, NULL); | |
566 | synchronize_rcu(); | |
567 | kfree(old); | |
568 | ||
9d139c81 | 569 | return ieee80211_if_config(sdata, IEEE80211_IFCC_BEACON); |
5dfdaf58 JB |
570 | } |
571 | ||
4fd6931e JB |
572 | /* Layer 2 Update frame (802.2 Type 1 LLC XID Update response) */ |
573 | struct iapp_layer2_update { | |
574 | u8 da[ETH_ALEN]; /* broadcast */ | |
575 | u8 sa[ETH_ALEN]; /* STA addr */ | |
576 | __be16 len; /* 6 */ | |
577 | u8 dsap; /* 0 */ | |
578 | u8 ssap; /* 0 */ | |
579 | u8 control; | |
580 | u8 xid_info[3]; | |
581 | } __attribute__ ((packed)); | |
582 | ||
583 | static void ieee80211_send_layer2_update(struct sta_info *sta) | |
584 | { | |
585 | struct iapp_layer2_update *msg; | |
586 | struct sk_buff *skb; | |
587 | ||
588 | /* Send Level 2 Update Frame to update forwarding tables in layer 2 | |
589 | * bridge devices */ | |
590 | ||
591 | skb = dev_alloc_skb(sizeof(*msg)); | |
592 | if (!skb) | |
593 | return; | |
594 | msg = (struct iapp_layer2_update *)skb_put(skb, sizeof(*msg)); | |
595 | ||
596 | /* 802.2 Type 1 Logical Link Control (LLC) Exchange Identifier (XID) | |
597 | * Update response frame; IEEE Std 802.2-1998, 5.4.1.2.1 */ | |
598 | ||
599 | memset(msg->da, 0xff, ETH_ALEN); | |
600 | memcpy(msg->sa, sta->addr, ETH_ALEN); | |
601 | msg->len = htons(6); | |
602 | msg->dsap = 0; | |
603 | msg->ssap = 0x01; /* NULL LSAP, CR Bit: Response */ | |
604 | msg->control = 0xaf; /* XID response lsb.1111F101. | |
605 | * F=0 (no poll command; unsolicited frame) */ | |
606 | msg->xid_info[0] = 0x81; /* XID format identifier */ | |
607 | msg->xid_info[1] = 1; /* LLC types/classes: Type 1 LLC */ | |
608 | msg->xid_info[2] = 0; /* XID sender's receive window size (RW) */ | |
609 | ||
d0709a65 JB |
610 | skb->dev = sta->sdata->dev; |
611 | skb->protocol = eth_type_trans(skb, sta->sdata->dev); | |
4fd6931e JB |
612 | memset(skb->cb, 0, sizeof(skb->cb)); |
613 | netif_rx(skb); | |
614 | } | |
615 | ||
616 | static void sta_apply_parameters(struct ieee80211_local *local, | |
617 | struct sta_info *sta, | |
618 | struct station_parameters *params) | |
619 | { | |
620 | u32 rates; | |
621 | int i, j; | |
8318d78a | 622 | struct ieee80211_supported_band *sband; |
d0709a65 | 623 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
4fd6931e | 624 | |
73651ee6 JB |
625 | /* |
626 | * FIXME: updating the flags is racy when this function is | |
627 | * called from ieee80211_change_station(), this will | |
628 | * be resolved in a future patch. | |
629 | */ | |
630 | ||
4fd6931e | 631 | if (params->station_flags & STATION_FLAG_CHANGED) { |
07346f81 | 632 | spin_lock_bh(&sta->lock); |
4fd6931e JB |
633 | sta->flags &= ~WLAN_STA_AUTHORIZED; |
634 | if (params->station_flags & STATION_FLAG_AUTHORIZED) | |
635 | sta->flags |= WLAN_STA_AUTHORIZED; | |
636 | ||
637 | sta->flags &= ~WLAN_STA_SHORT_PREAMBLE; | |
638 | if (params->station_flags & STATION_FLAG_SHORT_PREAMBLE) | |
639 | sta->flags |= WLAN_STA_SHORT_PREAMBLE; | |
640 | ||
641 | sta->flags &= ~WLAN_STA_WME; | |
642 | if (params->station_flags & STATION_FLAG_WME) | |
643 | sta->flags |= WLAN_STA_WME; | |
07346f81 | 644 | spin_unlock_bh(&sta->lock); |
4fd6931e JB |
645 | } |
646 | ||
73651ee6 JB |
647 | /* |
648 | * FIXME: updating the following information is racy when this | |
649 | * function is called from ieee80211_change_station(). | |
650 | * However, all this information should be static so | |
651 | * maybe we should just reject attemps to change it. | |
652 | */ | |
653 | ||
4fd6931e JB |
654 | if (params->aid) { |
655 | sta->aid = params->aid; | |
656 | if (sta->aid > IEEE80211_MAX_AID) | |
657 | sta->aid = 0; /* XXX: should this be an error? */ | |
658 | } | |
659 | ||
660 | if (params->listen_interval >= 0) | |
661 | sta->listen_interval = params->listen_interval; | |
662 | ||
663 | if (params->supported_rates) { | |
664 | rates = 0; | |
8318d78a JB |
665 | sband = local->hw.wiphy->bands[local->oper_channel->band]; |
666 | ||
4fd6931e JB |
667 | for (i = 0; i < params->supported_rates_len; i++) { |
668 | int rate = (params->supported_rates[i] & 0x7f) * 5; | |
8318d78a JB |
669 | for (j = 0; j < sband->n_bitrates; j++) { |
670 | if (sband->bitrates[j].bitrate == rate) | |
4fd6931e JB |
671 | rates |= BIT(j); |
672 | } | |
673 | } | |
8318d78a | 674 | sta->supp_rates[local->oper_channel->band] = rates; |
4fd6931e | 675 | } |
c5dd9c2b | 676 | |
902acc78 | 677 | if (ieee80211_vif_is_mesh(&sdata->vif) && params->plink_action) { |
c5dd9c2b LCC |
678 | switch (params->plink_action) { |
679 | case PLINK_ACTION_OPEN: | |
680 | mesh_plink_open(sta); | |
681 | break; | |
682 | case PLINK_ACTION_BLOCK: | |
683 | mesh_plink_block(sta); | |
684 | break; | |
685 | } | |
902acc78 | 686 | } |
4fd6931e JB |
687 | } |
688 | ||
689 | static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, | |
690 | u8 *mac, struct station_parameters *params) | |
691 | { | |
14db74bc | 692 | struct ieee80211_local *local = wiphy_priv(wiphy); |
4fd6931e JB |
693 | struct sta_info *sta; |
694 | struct ieee80211_sub_if_data *sdata; | |
73651ee6 | 695 | int err; |
4fd6931e | 696 | |
14db74bc JB |
697 | if (dev == local->mdev || params->vlan == local->mdev) |
698 | return -EOPNOTSUPP; | |
699 | ||
4fd6931e JB |
700 | /* Prevent a race with changing the rate control algorithm */ |
701 | if (!netif_running(dev)) | |
702 | return -ENETDOWN; | |
703 | ||
4fd6931e JB |
704 | if (params->vlan) { |
705 | sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); | |
706 | ||
679fda1a | 707 | if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN && |
4fd6931e JB |
708 | sdata->vif.type != IEEE80211_IF_TYPE_AP) |
709 | return -EINVAL; | |
710 | } else | |
711 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | |
712 | ||
03e4497e JB |
713 | if (compare_ether_addr(mac, dev->dev_addr) == 0) |
714 | return -EINVAL; | |
715 | ||
716 | if (is_multicast_ether_addr(mac)) | |
717 | return -EINVAL; | |
718 | ||
719 | sta = sta_info_alloc(sdata, mac, GFP_KERNEL); | |
73651ee6 JB |
720 | if (!sta) |
721 | return -ENOMEM; | |
4fd6931e JB |
722 | |
723 | sta->flags = WLAN_STA_AUTH | WLAN_STA_ASSOC; | |
724 | ||
725 | sta_apply_parameters(local, sta, params); | |
726 | ||
727 | rate_control_rate_init(sta, local); | |
728 | ||
73651ee6 JB |
729 | rcu_read_lock(); |
730 | ||
731 | err = sta_info_insert(sta); | |
732 | if (err) { | |
93e5deb1 | 733 | /* STA has been freed */ |
73651ee6 JB |
734 | rcu_read_unlock(); |
735 | return err; | |
736 | } | |
737 | ||
738 | if (sdata->vif.type == IEEE80211_IF_TYPE_VLAN || | |
739 | sdata->vif.type == IEEE80211_IF_TYPE_AP) | |
740 | ieee80211_send_layer2_update(sta); | |
741 | ||
742 | rcu_read_unlock(); | |
743 | ||
4fd6931e JB |
744 | return 0; |
745 | } | |
746 | ||
747 | static int ieee80211_del_station(struct wiphy *wiphy, struct net_device *dev, | |
748 | u8 *mac) | |
749 | { | |
14db74bc JB |
750 | struct ieee80211_local *local = wiphy_priv(wiphy); |
751 | struct ieee80211_sub_if_data *sdata; | |
4fd6931e JB |
752 | struct sta_info *sta; |
753 | ||
14db74bc JB |
754 | if (dev == local->mdev) |
755 | return -EOPNOTSUPP; | |
756 | ||
757 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | |
758 | ||
4fd6931e | 759 | if (mac) { |
98dd6a57 JB |
760 | rcu_read_lock(); |
761 | ||
4fd6931e JB |
762 | /* XXX: get sta belonging to dev */ |
763 | sta = sta_info_get(local, mac); | |
98dd6a57 JB |
764 | if (!sta) { |
765 | rcu_read_unlock(); | |
4fd6931e | 766 | return -ENOENT; |
98dd6a57 | 767 | } |
4fd6931e | 768 | |
d0709a65 | 769 | sta_info_unlink(&sta); |
98dd6a57 JB |
770 | rcu_read_unlock(); |
771 | ||
4f6fab47 | 772 | sta_info_destroy(sta); |
4fd6931e | 773 | } else |
d0709a65 | 774 | sta_info_flush(local, sdata); |
4fd6931e JB |
775 | |
776 | return 0; | |
777 | } | |
778 | ||
779 | static int ieee80211_change_station(struct wiphy *wiphy, | |
780 | struct net_device *dev, | |
781 | u8 *mac, | |
782 | struct station_parameters *params) | |
783 | { | |
14db74bc | 784 | struct ieee80211_local *local = wiphy_priv(wiphy); |
4fd6931e JB |
785 | struct sta_info *sta; |
786 | struct ieee80211_sub_if_data *vlansdata; | |
787 | ||
14db74bc JB |
788 | if (dev == local->mdev || params->vlan == local->mdev) |
789 | return -EOPNOTSUPP; | |
790 | ||
98dd6a57 JB |
791 | rcu_read_lock(); |
792 | ||
4fd6931e JB |
793 | /* XXX: get sta belonging to dev */ |
794 | sta = sta_info_get(local, mac); | |
98dd6a57 JB |
795 | if (!sta) { |
796 | rcu_read_unlock(); | |
4fd6931e | 797 | return -ENOENT; |
98dd6a57 | 798 | } |
4fd6931e | 799 | |
d0709a65 | 800 | if (params->vlan && params->vlan != sta->sdata->dev) { |
4fd6931e JB |
801 | vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); |
802 | ||
679fda1a | 803 | if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN && |
98dd6a57 JB |
804 | vlansdata->vif.type != IEEE80211_IF_TYPE_AP) { |
805 | rcu_read_unlock(); | |
4fd6931e | 806 | return -EINVAL; |
98dd6a57 | 807 | } |
4fd6931e | 808 | |
14db74bc | 809 | sta->sdata = vlansdata; |
4fd6931e JB |
810 | ieee80211_send_layer2_update(sta); |
811 | } | |
812 | ||
813 | sta_apply_parameters(local, sta, params); | |
814 | ||
98dd6a57 JB |
815 | rcu_read_unlock(); |
816 | ||
4fd6931e JB |
817 | return 0; |
818 | } | |
819 | ||
c5dd9c2b LCC |
820 | #ifdef CONFIG_MAC80211_MESH |
821 | static int ieee80211_add_mpath(struct wiphy *wiphy, struct net_device *dev, | |
822 | u8 *dst, u8 *next_hop) | |
823 | { | |
14db74bc JB |
824 | struct ieee80211_local *local = wiphy_priv(wiphy); |
825 | struct ieee80211_sub_if_data *sdata; | |
c5dd9c2b LCC |
826 | struct mesh_path *mpath; |
827 | struct sta_info *sta; | |
828 | int err; | |
829 | ||
14db74bc JB |
830 | if (dev == local->mdev) |
831 | return -EOPNOTSUPP; | |
832 | ||
c5dd9c2b LCC |
833 | if (!netif_running(dev)) |
834 | return -ENETDOWN; | |
835 | ||
14db74bc JB |
836 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
837 | ||
c5dd9c2b LCC |
838 | if (sdata->vif.type != IEEE80211_IF_TYPE_MESH_POINT) |
839 | return -ENOTSUPP; | |
840 | ||
d0709a65 | 841 | rcu_read_lock(); |
c5dd9c2b | 842 | sta = sta_info_get(local, next_hop); |
d0709a65 JB |
843 | if (!sta) { |
844 | rcu_read_unlock(); | |
c5dd9c2b | 845 | return -ENOENT; |
d0709a65 | 846 | } |
c5dd9c2b | 847 | |
f698d856 | 848 | err = mesh_path_add(dst, sdata); |
d0709a65 JB |
849 | if (err) { |
850 | rcu_read_unlock(); | |
c5dd9c2b | 851 | return err; |
d0709a65 | 852 | } |
c5dd9c2b | 853 | |
f698d856 | 854 | mpath = mesh_path_lookup(dst, sdata); |
c5dd9c2b LCC |
855 | if (!mpath) { |
856 | rcu_read_unlock(); | |
c5dd9c2b LCC |
857 | return -ENXIO; |
858 | } | |
859 | mesh_path_fix_nexthop(mpath, sta); | |
d0709a65 | 860 | |
c5dd9c2b LCC |
861 | rcu_read_unlock(); |
862 | return 0; | |
863 | } | |
864 | ||
865 | static int ieee80211_del_mpath(struct wiphy *wiphy, struct net_device *dev, | |
866 | u8 *dst) | |
867 | { | |
f698d856 JBG |
868 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
869 | ||
c5dd9c2b | 870 | if (dst) |
f698d856 | 871 | return mesh_path_del(dst, sdata); |
c5dd9c2b | 872 | |
f698d856 | 873 | mesh_path_flush(sdata); |
c5dd9c2b LCC |
874 | return 0; |
875 | } | |
876 | ||
877 | static int ieee80211_change_mpath(struct wiphy *wiphy, | |
878 | struct net_device *dev, | |
879 | u8 *dst, u8 *next_hop) | |
880 | { | |
14db74bc JB |
881 | struct ieee80211_local *local = wiphy_priv(wiphy); |
882 | struct ieee80211_sub_if_data *sdata; | |
c5dd9c2b LCC |
883 | struct mesh_path *mpath; |
884 | struct sta_info *sta; | |
885 | ||
14db74bc JB |
886 | if (dev == local->mdev) |
887 | return -EOPNOTSUPP; | |
888 | ||
c5dd9c2b LCC |
889 | if (!netif_running(dev)) |
890 | return -ENETDOWN; | |
891 | ||
14db74bc JB |
892 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
893 | ||
c5dd9c2b LCC |
894 | if (sdata->vif.type != IEEE80211_IF_TYPE_MESH_POINT) |
895 | return -ENOTSUPP; | |
896 | ||
d0709a65 JB |
897 | rcu_read_lock(); |
898 | ||
c5dd9c2b | 899 | sta = sta_info_get(local, next_hop); |
d0709a65 JB |
900 | if (!sta) { |
901 | rcu_read_unlock(); | |
c5dd9c2b | 902 | return -ENOENT; |
d0709a65 | 903 | } |
c5dd9c2b | 904 | |
f698d856 | 905 | mpath = mesh_path_lookup(dst, sdata); |
c5dd9c2b LCC |
906 | if (!mpath) { |
907 | rcu_read_unlock(); | |
c5dd9c2b LCC |
908 | return -ENOENT; |
909 | } | |
910 | ||
911 | mesh_path_fix_nexthop(mpath, sta); | |
d0709a65 | 912 | |
c5dd9c2b LCC |
913 | rcu_read_unlock(); |
914 | return 0; | |
915 | } | |
916 | ||
917 | static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop, | |
918 | struct mpath_info *pinfo) | |
919 | { | |
920 | if (mpath->next_hop) | |
921 | memcpy(next_hop, mpath->next_hop->addr, ETH_ALEN); | |
922 | else | |
923 | memset(next_hop, 0, ETH_ALEN); | |
924 | ||
925 | pinfo->filled = MPATH_INFO_FRAME_QLEN | | |
926 | MPATH_INFO_DSN | | |
927 | MPATH_INFO_METRIC | | |
928 | MPATH_INFO_EXPTIME | | |
929 | MPATH_INFO_DISCOVERY_TIMEOUT | | |
930 | MPATH_INFO_DISCOVERY_RETRIES | | |
931 | MPATH_INFO_FLAGS; | |
932 | ||
933 | pinfo->frame_qlen = mpath->frame_queue.qlen; | |
934 | pinfo->dsn = mpath->dsn; | |
935 | pinfo->metric = mpath->metric; | |
936 | if (time_before(jiffies, mpath->exp_time)) | |
937 | pinfo->exptime = jiffies_to_msecs(mpath->exp_time - jiffies); | |
938 | pinfo->discovery_timeout = | |
939 | jiffies_to_msecs(mpath->discovery_timeout); | |
940 | pinfo->discovery_retries = mpath->discovery_retries; | |
941 | pinfo->flags = 0; | |
942 | if (mpath->flags & MESH_PATH_ACTIVE) | |
943 | pinfo->flags |= NL80211_MPATH_FLAG_ACTIVE; | |
944 | if (mpath->flags & MESH_PATH_RESOLVING) | |
945 | pinfo->flags |= NL80211_MPATH_FLAG_RESOLVING; | |
946 | if (mpath->flags & MESH_PATH_DSN_VALID) | |
947 | pinfo->flags |= NL80211_MPATH_FLAG_DSN_VALID; | |
948 | if (mpath->flags & MESH_PATH_FIXED) | |
949 | pinfo->flags |= NL80211_MPATH_FLAG_FIXED; | |
950 | if (mpath->flags & MESH_PATH_RESOLVING) | |
951 | pinfo->flags |= NL80211_MPATH_FLAG_RESOLVING; | |
952 | ||
953 | pinfo->flags = mpath->flags; | |
954 | } | |
955 | ||
956 | static int ieee80211_get_mpath(struct wiphy *wiphy, struct net_device *dev, | |
957 | u8 *dst, u8 *next_hop, struct mpath_info *pinfo) | |
958 | ||
959 | { | |
14db74bc JB |
960 | struct ieee80211_local *local = wiphy_priv(wiphy); |
961 | struct ieee80211_sub_if_data *sdata; | |
c5dd9c2b LCC |
962 | struct mesh_path *mpath; |
963 | ||
14db74bc JB |
964 | if (dev == local->mdev) |
965 | return -EOPNOTSUPP; | |
966 | ||
967 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | |
968 | ||
c5dd9c2b LCC |
969 | if (sdata->vif.type != IEEE80211_IF_TYPE_MESH_POINT) |
970 | return -ENOTSUPP; | |
971 | ||
972 | rcu_read_lock(); | |
f698d856 | 973 | mpath = mesh_path_lookup(dst, sdata); |
c5dd9c2b LCC |
974 | if (!mpath) { |
975 | rcu_read_unlock(); | |
976 | return -ENOENT; | |
977 | } | |
978 | memcpy(dst, mpath->dst, ETH_ALEN); | |
979 | mpath_set_pinfo(mpath, next_hop, pinfo); | |
980 | rcu_read_unlock(); | |
981 | return 0; | |
982 | } | |
983 | ||
984 | static int ieee80211_dump_mpath(struct wiphy *wiphy, struct net_device *dev, | |
985 | int idx, u8 *dst, u8 *next_hop, | |
986 | struct mpath_info *pinfo) | |
987 | { | |
14db74bc JB |
988 | struct ieee80211_local *local = wiphy_priv(wiphy); |
989 | struct ieee80211_sub_if_data *sdata; | |
c5dd9c2b LCC |
990 | struct mesh_path *mpath; |
991 | ||
14db74bc JB |
992 | if (dev == local->mdev) |
993 | return -EOPNOTSUPP; | |
994 | ||
995 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | |
996 | ||
c5dd9c2b LCC |
997 | if (sdata->vif.type != IEEE80211_IF_TYPE_MESH_POINT) |
998 | return -ENOTSUPP; | |
999 | ||
1000 | rcu_read_lock(); | |
f698d856 | 1001 | mpath = mesh_path_lookup_by_idx(idx, sdata); |
c5dd9c2b LCC |
1002 | if (!mpath) { |
1003 | rcu_read_unlock(); | |
1004 | return -ENOENT; | |
1005 | } | |
1006 | memcpy(dst, mpath->dst, ETH_ALEN); | |
1007 | mpath_set_pinfo(mpath, next_hop, pinfo); | |
1008 | rcu_read_unlock(); | |
1009 | return 0; | |
1010 | } | |
1011 | #endif | |
1012 | ||
f0706e82 JB |
1013 | struct cfg80211_ops mac80211_config_ops = { |
1014 | .add_virtual_intf = ieee80211_add_iface, | |
1015 | .del_virtual_intf = ieee80211_del_iface, | |
42613db7 | 1016 | .change_virtual_intf = ieee80211_change_iface, |
e8cbb4cb JB |
1017 | .add_key = ieee80211_add_key, |
1018 | .del_key = ieee80211_del_key, | |
62da92fb | 1019 | .get_key = ieee80211_get_key, |
e8cbb4cb | 1020 | .set_default_key = ieee80211_config_default_key, |
5dfdaf58 JB |
1021 | .add_beacon = ieee80211_add_beacon, |
1022 | .set_beacon = ieee80211_set_beacon, | |
1023 | .del_beacon = ieee80211_del_beacon, | |
4fd6931e JB |
1024 | .add_station = ieee80211_add_station, |
1025 | .del_station = ieee80211_del_station, | |
1026 | .change_station = ieee80211_change_station, | |
7bbdd2d9 | 1027 | .get_station = ieee80211_get_station, |
c5dd9c2b LCC |
1028 | .dump_station = ieee80211_dump_station, |
1029 | #ifdef CONFIG_MAC80211_MESH | |
1030 | .add_mpath = ieee80211_add_mpath, | |
1031 | .del_mpath = ieee80211_del_mpath, | |
1032 | .change_mpath = ieee80211_change_mpath, | |
1033 | .get_mpath = ieee80211_get_mpath, | |
1034 | .dump_mpath = ieee80211_dump_mpath, | |
1035 | #endif | |
f0706e82 | 1036 | }; |