diff options
Diffstat (limited to 'net/mac80211/mesh_plink.c')
-rw-r--r-- | net/mac80211/mesh_plink.c | 112 |
1 files changed, 67 insertions, 45 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 44b53931ba5e..f4adc0917888 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #define dot11MeshMaxPeerLinks(s) (s->u.mesh.mshcfg.dot11MeshMaxPeerLinks) | 43 | #define dot11MeshMaxPeerLinks(s) (s->u.mesh.mshcfg.dot11MeshMaxPeerLinks) |
44 | 44 | ||
45 | enum plink_frame_type { | 45 | enum plink_frame_type { |
46 | PLINK_OPEN = 0, | 46 | PLINK_OPEN = 1, |
47 | PLINK_CONFIRM, | 47 | PLINK_CONFIRM, |
48 | PLINK_CLOSE | 48 | PLINK_CLOSE |
49 | }; | 49 | }; |
@@ -83,7 +83,7 @@ void mesh_plink_dec_estab_count(struct ieee80211_sub_if_data *sdata) | |||
83 | */ | 83 | */ |
84 | static inline void mesh_plink_fsm_restart(struct sta_info *sta) | 84 | static inline void mesh_plink_fsm_restart(struct sta_info *sta) |
85 | { | 85 | { |
86 | sta->plink_state = PLINK_LISTEN; | 86 | sta->plink_state = NL80211_PLINK_LISTEN; |
87 | sta->llid = sta->plid = sta->reason = 0; | 87 | sta->llid = sta->plid = sta->reason = 0; |
88 | sta->plink_retries = 0; | 88 | sta->plink_retries = 0; |
89 | } | 89 | } |
@@ -105,7 +105,7 @@ static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata, | |||
105 | if (!sta) | 105 | if (!sta) |
106 | return NULL; | 106 | return NULL; |
107 | 107 | ||
108 | sta->flags = WLAN_STA_AUTHORIZED; | 108 | sta->flags = WLAN_STA_AUTHORIZED | WLAN_STA_AUTH; |
109 | sta->sta.supp_rates[local->hw.conf.channel->band] = rates; | 109 | sta->sta.supp_rates[local->hw.conf.channel->band] = rates; |
110 | rate_control_rate_init(sta); | 110 | rate_control_rate_init(sta); |
111 | 111 | ||
@@ -126,11 +126,11 @@ static bool __mesh_plink_deactivate(struct sta_info *sta) | |||
126 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 126 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
127 | bool deactivated = false; | 127 | bool deactivated = false; |
128 | 128 | ||
129 | if (sta->plink_state == PLINK_ESTAB) { | 129 | if (sta->plink_state == NL80211_PLINK_ESTAB) { |
130 | mesh_plink_dec_estab_count(sdata); | 130 | mesh_plink_dec_estab_count(sdata); |
131 | deactivated = true; | 131 | deactivated = true; |
132 | } | 132 | } |
133 | sta->plink_state = PLINK_BLOCKED; | 133 | sta->plink_state = NL80211_PLINK_BLOCKED; |
134 | mesh_path_flush_by_nexthop(sta); | 134 | mesh_path_flush_by_nexthop(sta); |
135 | 135 | ||
136 | return deactivated; | 136 | return deactivated; |
@@ -161,7 +161,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, | |||
161 | __le16 reason) { | 161 | __le16 reason) { |
162 | struct ieee80211_local *local = sdata->local; | 162 | struct ieee80211_local *local = sdata->local; |
163 | struct sk_buff *skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400 + | 163 | struct sk_buff *skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400 + |
164 | sdata->u.mesh.vendor_ie_len); | 164 | sdata->u.mesh.ie_len); |
165 | struct ieee80211_mgmt *mgmt; | 165 | struct ieee80211_mgmt *mgmt; |
166 | bool include_plid = false; | 166 | bool include_plid = false; |
167 | static const u8 meshpeeringproto[] = { 0x00, 0x0F, 0xAC, 0x2A }; | 167 | static const u8 meshpeeringproto[] = { 0x00, 0x0F, 0xAC, 0x2A }; |
@@ -181,8 +181,8 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, | |||
181 | IEEE80211_STYPE_ACTION); | 181 | IEEE80211_STYPE_ACTION); |
182 | memcpy(mgmt->da, da, ETH_ALEN); | 182 | memcpy(mgmt->da, da, ETH_ALEN); |
183 | memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); | 183 | memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); |
184 | /* BSSID is left zeroed, wildcard value */ | 184 | memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); |
185 | mgmt->u.action.category = WLAN_CATEGORY_MESH_PLINK; | 185 | mgmt->u.action.category = WLAN_CATEGORY_MESH_ACTION; |
186 | mgmt->u.action.u.plink_action.action_code = action; | 186 | mgmt->u.action.u.plink_action.action_code = action; |
187 | 187 | ||
188 | if (action == PLINK_CLOSE) | 188 | if (action == PLINK_CLOSE) |
@@ -237,8 +237,9 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, | |||
237 | return 0; | 237 | return 0; |
238 | } | 238 | } |
239 | 239 | ||
240 | void mesh_neighbour_update(u8 *hw_addr, u32 rates, struct ieee80211_sub_if_data *sdata, | 240 | void mesh_neighbour_update(u8 *hw_addr, u32 rates, |
241 | bool peer_accepting_plinks) | 241 | struct ieee80211_sub_if_data *sdata, |
242 | struct ieee802_11_elems *elems) | ||
242 | { | 243 | { |
243 | struct ieee80211_local *local = sdata->local; | 244 | struct ieee80211_local *local = sdata->local; |
244 | struct sta_info *sta; | 245 | struct sta_info *sta; |
@@ -248,8 +249,14 @@ void mesh_neighbour_update(u8 *hw_addr, u32 rates, struct ieee80211_sub_if_data | |||
248 | sta = sta_info_get(sdata, hw_addr); | 249 | sta = sta_info_get(sdata, hw_addr); |
249 | if (!sta) { | 250 | if (!sta) { |
250 | rcu_read_unlock(); | 251 | rcu_read_unlock(); |
251 | 252 | /* Userspace handles peer allocation when security is enabled | |
252 | sta = mesh_plink_alloc(sdata, hw_addr, rates); | 253 | * */ |
254 | if (sdata->u.mesh.security & IEEE80211_MESH_SEC_AUTHED) | ||
255 | cfg80211_notify_new_peer_candidate(sdata->dev, hw_addr, | ||
256 | elems->ie_start, elems->total_len, | ||
257 | GFP_KERNEL); | ||
258 | else | ||
259 | sta = mesh_plink_alloc(sdata, hw_addr, rates); | ||
253 | if (!sta) | 260 | if (!sta) |
254 | return; | 261 | return; |
255 | if (sta_info_insert_rcu(sta)) { | 262 | if (sta_info_insert_rcu(sta)) { |
@@ -260,7 +267,8 @@ void mesh_neighbour_update(u8 *hw_addr, u32 rates, struct ieee80211_sub_if_data | |||
260 | 267 | ||
261 | sta->last_rx = jiffies; | 268 | sta->last_rx = jiffies; |
262 | sta->sta.supp_rates[local->hw.conf.channel->band] = rates; | 269 | sta->sta.supp_rates[local->hw.conf.channel->band] = rates; |
263 | if (peer_accepting_plinks && sta->plink_state == PLINK_LISTEN && | 270 | if (mesh_peer_accepts_plinks(elems) && |
271 | sta->plink_state == NL80211_PLINK_LISTEN && | ||
264 | sdata->u.mesh.accepting_plinks && | 272 | sdata->u.mesh.accepting_plinks && |
265 | sdata->u.mesh.mshcfg.auto_open_plinks) | 273 | sdata->u.mesh.mshcfg.auto_open_plinks) |
266 | mesh_plink_open(sta); | 274 | mesh_plink_open(sta); |
@@ -300,8 +308,8 @@ static void mesh_plink_timer(unsigned long data) | |||
300 | sdata = sta->sdata; | 308 | sdata = sta->sdata; |
301 | 309 | ||
302 | switch (sta->plink_state) { | 310 | switch (sta->plink_state) { |
303 | case PLINK_OPN_RCVD: | 311 | case NL80211_PLINK_OPN_RCVD: |
304 | case PLINK_OPN_SNT: | 312 | case NL80211_PLINK_OPN_SNT: |
305 | /* retry timer */ | 313 | /* retry timer */ |
306 | if (sta->plink_retries < dot11MeshMaxRetries(sdata)) { | 314 | if (sta->plink_retries < dot11MeshMaxRetries(sdata)) { |
307 | u32 rand; | 315 | u32 rand; |
@@ -320,17 +328,17 @@ static void mesh_plink_timer(unsigned long data) | |||
320 | } | 328 | } |
321 | reason = cpu_to_le16(MESH_MAX_RETRIES); | 329 | reason = cpu_to_le16(MESH_MAX_RETRIES); |
322 | /* fall through on else */ | 330 | /* fall through on else */ |
323 | case PLINK_CNF_RCVD: | 331 | case NL80211_PLINK_CNF_RCVD: |
324 | /* confirm timer */ | 332 | /* confirm timer */ |
325 | if (!reason) | 333 | if (!reason) |
326 | reason = cpu_to_le16(MESH_CONFIRM_TIMEOUT); | 334 | reason = cpu_to_le16(MESH_CONFIRM_TIMEOUT); |
327 | sta->plink_state = PLINK_HOLDING; | 335 | sta->plink_state = NL80211_PLINK_HOLDING; |
328 | mod_plink_timer(sta, dot11MeshHoldingTimeout(sdata)); | 336 | mod_plink_timer(sta, dot11MeshHoldingTimeout(sdata)); |
329 | spin_unlock_bh(&sta->lock); | 337 | spin_unlock_bh(&sta->lock); |
330 | mesh_plink_frame_tx(sdata, PLINK_CLOSE, sta->sta.addr, llid, plid, | 338 | mesh_plink_frame_tx(sdata, PLINK_CLOSE, sta->sta.addr, llid, plid, |
331 | reason); | 339 | reason); |
332 | break; | 340 | break; |
333 | case PLINK_HOLDING: | 341 | case NL80211_PLINK_HOLDING: |
334 | /* holding timer */ | 342 | /* holding timer */ |
335 | del_timer(&sta->plink_timer); | 343 | del_timer(&sta->plink_timer); |
336 | mesh_plink_fsm_restart(sta); | 344 | mesh_plink_fsm_restart(sta); |
@@ -372,14 +380,17 @@ int mesh_plink_open(struct sta_info *sta) | |||
372 | __le16 llid; | 380 | __le16 llid; |
373 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 381 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
374 | 382 | ||
383 | if (!test_sta_flags(sta, WLAN_STA_AUTH)) | ||
384 | return -EPERM; | ||
385 | |||
375 | spin_lock_bh(&sta->lock); | 386 | spin_lock_bh(&sta->lock); |
376 | get_random_bytes(&llid, 2); | 387 | get_random_bytes(&llid, 2); |
377 | sta->llid = llid; | 388 | sta->llid = llid; |
378 | if (sta->plink_state != PLINK_LISTEN) { | 389 | if (sta->plink_state != NL80211_PLINK_LISTEN) { |
379 | spin_unlock_bh(&sta->lock); | 390 | spin_unlock_bh(&sta->lock); |
380 | return -EBUSY; | 391 | return -EBUSY; |
381 | } | 392 | } |
382 | sta->plink_state = PLINK_OPN_SNT; | 393 | sta->plink_state = NL80211_PLINK_OPN_SNT; |
383 | mesh_plink_timer_set(sta, dot11MeshRetryTimeout(sdata)); | 394 | mesh_plink_timer_set(sta, dot11MeshRetryTimeout(sdata)); |
384 | spin_unlock_bh(&sta->lock); | 395 | spin_unlock_bh(&sta->lock); |
385 | mpl_dbg("Mesh plink: starting establishment with %pM\n", | 396 | mpl_dbg("Mesh plink: starting establishment with %pM\n", |
@@ -396,7 +407,7 @@ void mesh_plink_block(struct sta_info *sta) | |||
396 | 407 | ||
397 | spin_lock_bh(&sta->lock); | 408 | spin_lock_bh(&sta->lock); |
398 | deactivated = __mesh_plink_deactivate(sta); | 409 | deactivated = __mesh_plink_deactivate(sta); |
399 | sta->plink_state = PLINK_BLOCKED; | 410 | sta->plink_state = NL80211_PLINK_BLOCKED; |
400 | spin_unlock_bh(&sta->lock); | 411 | spin_unlock_bh(&sta->lock); |
401 | 412 | ||
402 | if (deactivated) | 413 | if (deactivated) |
@@ -419,13 +430,13 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
419 | __le16 plid, llid, reason; | 430 | __le16 plid, llid, reason; |
420 | #ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG | 431 | #ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG |
421 | static const char *mplstates[] = { | 432 | static const char *mplstates[] = { |
422 | [PLINK_LISTEN] = "LISTEN", | 433 | [NL80211_PLINK_LISTEN] = "LISTEN", |
423 | [PLINK_OPN_SNT] = "OPN-SNT", | 434 | [NL80211_PLINK_OPN_SNT] = "OPN-SNT", |
424 | [PLINK_OPN_RCVD] = "OPN-RCVD", | 435 | [NL80211_PLINK_OPN_RCVD] = "OPN-RCVD", |
425 | [PLINK_CNF_RCVD] = "CNF_RCVD", | 436 | [NL80211_PLINK_CNF_RCVD] = "CNF_RCVD", |
426 | [PLINK_ESTAB] = "ESTAB", | 437 | [NL80211_PLINK_ESTAB] = "ESTAB", |
427 | [PLINK_HOLDING] = "HOLDING", | 438 | [NL80211_PLINK_HOLDING] = "HOLDING", |
428 | [PLINK_BLOCKED] = "BLOCKED" | 439 | [NL80211_PLINK_BLOCKED] = "BLOCKED" |
429 | }; | 440 | }; |
430 | #endif | 441 | #endif |
431 | 442 | ||
@@ -449,6 +460,11 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
449 | mpl_dbg("Mesh plink: missing necessary peer link ie\n"); | 460 | mpl_dbg("Mesh plink: missing necessary peer link ie\n"); |
450 | return; | 461 | return; |
451 | } | 462 | } |
463 | if (elems.rsn_len && | ||
464 | sdata->u.mesh.security == IEEE80211_MESH_SEC_NONE) { | ||
465 | mpl_dbg("Mesh plink: can't establish link with secure peer\n"); | ||
466 | return; | ||
467 | } | ||
452 | 468 | ||
453 | ftype = mgmt->u.action.u.plink_action.action_code; | 469 | ftype = mgmt->u.action.u.plink_action.action_code; |
454 | ie_len = elems.peer_link_len; | 470 | ie_len = elems.peer_link_len; |
@@ -480,7 +496,13 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
480 | return; | 496 | return; |
481 | } | 497 | } |
482 | 498 | ||
483 | if (sta && sta->plink_state == PLINK_BLOCKED) { | 499 | if (sta && !test_sta_flags(sta, WLAN_STA_AUTH)) { |
500 | mpl_dbg("Mesh plink: Action frame from non-authed peer\n"); | ||
501 | rcu_read_unlock(); | ||
502 | return; | ||
503 | } | ||
504 | |||
505 | if (sta && sta->plink_state == NL80211_PLINK_BLOCKED) { | ||
484 | rcu_read_unlock(); | 506 | rcu_read_unlock(); |
485 | return; | 507 | return; |
486 | } | 508 | } |
@@ -550,7 +572,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
550 | event = CNF_ACPT; | 572 | event = CNF_ACPT; |
551 | break; | 573 | break; |
552 | case PLINK_CLOSE: | 574 | case PLINK_CLOSE: |
553 | if (sta->plink_state == PLINK_ESTAB) | 575 | if (sta->plink_state == NL80211_PLINK_ESTAB) |
554 | /* Do not check for llid or plid. This does not | 576 | /* Do not check for llid or plid. This does not |
555 | * follow the standard but since multiple plinks | 577 | * follow the standard but since multiple plinks |
556 | * per sta are not supported, it is necessary in | 578 | * per sta are not supported, it is necessary in |
@@ -585,14 +607,14 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
585 | reason = 0; | 607 | reason = 0; |
586 | switch (sta->plink_state) { | 608 | switch (sta->plink_state) { |
587 | /* spin_unlock as soon as state is updated at each case */ | 609 | /* spin_unlock as soon as state is updated at each case */ |
588 | case PLINK_LISTEN: | 610 | case NL80211_PLINK_LISTEN: |
589 | switch (event) { | 611 | switch (event) { |
590 | case CLS_ACPT: | 612 | case CLS_ACPT: |
591 | mesh_plink_fsm_restart(sta); | 613 | mesh_plink_fsm_restart(sta); |
592 | spin_unlock_bh(&sta->lock); | 614 | spin_unlock_bh(&sta->lock); |
593 | break; | 615 | break; |
594 | case OPN_ACPT: | 616 | case OPN_ACPT: |
595 | sta->plink_state = PLINK_OPN_RCVD; | 617 | sta->plink_state = NL80211_PLINK_OPN_RCVD; |
596 | sta->plid = plid; | 618 | sta->plid = plid; |
597 | get_random_bytes(&llid, 2); | 619 | get_random_bytes(&llid, 2); |
598 | sta->llid = llid; | 620 | sta->llid = llid; |
@@ -609,7 +631,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
609 | } | 631 | } |
610 | break; | 632 | break; |
611 | 633 | ||
612 | case PLINK_OPN_SNT: | 634 | case NL80211_PLINK_OPN_SNT: |
613 | switch (event) { | 635 | switch (event) { |
614 | case OPN_RJCT: | 636 | case OPN_RJCT: |
615 | case CNF_RJCT: | 637 | case CNF_RJCT: |
@@ -618,7 +640,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
618 | if (!reason) | 640 | if (!reason) |
619 | reason = cpu_to_le16(MESH_CLOSE_RCVD); | 641 | reason = cpu_to_le16(MESH_CLOSE_RCVD); |
620 | sta->reason = reason; | 642 | sta->reason = reason; |
621 | sta->plink_state = PLINK_HOLDING; | 643 | sta->plink_state = NL80211_PLINK_HOLDING; |
622 | if (!mod_plink_timer(sta, | 644 | if (!mod_plink_timer(sta, |
623 | dot11MeshHoldingTimeout(sdata))) | 645 | dot11MeshHoldingTimeout(sdata))) |
624 | sta->ignore_plink_timer = true; | 646 | sta->ignore_plink_timer = true; |
@@ -630,7 +652,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
630 | break; | 652 | break; |
631 | case OPN_ACPT: | 653 | case OPN_ACPT: |
632 | /* retry timer is left untouched */ | 654 | /* retry timer is left untouched */ |
633 | sta->plink_state = PLINK_OPN_RCVD; | 655 | sta->plink_state = NL80211_PLINK_OPN_RCVD; |
634 | sta->plid = plid; | 656 | sta->plid = plid; |
635 | llid = sta->llid; | 657 | llid = sta->llid; |
636 | spin_unlock_bh(&sta->lock); | 658 | spin_unlock_bh(&sta->lock); |
@@ -638,7 +660,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
638 | plid, 0); | 660 | plid, 0); |
639 | break; | 661 | break; |
640 | case CNF_ACPT: | 662 | case CNF_ACPT: |
641 | sta->plink_state = PLINK_CNF_RCVD; | 663 | sta->plink_state = NL80211_PLINK_CNF_RCVD; |
642 | if (!mod_plink_timer(sta, | 664 | if (!mod_plink_timer(sta, |
643 | dot11MeshConfirmTimeout(sdata))) | 665 | dot11MeshConfirmTimeout(sdata))) |
644 | sta->ignore_plink_timer = true; | 666 | sta->ignore_plink_timer = true; |
@@ -651,7 +673,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
651 | } | 673 | } |
652 | break; | 674 | break; |
653 | 675 | ||
654 | case PLINK_OPN_RCVD: | 676 | case NL80211_PLINK_OPN_RCVD: |
655 | switch (event) { | 677 | switch (event) { |
656 | case OPN_RJCT: | 678 | case OPN_RJCT: |
657 | case CNF_RJCT: | 679 | case CNF_RJCT: |
@@ -660,7 +682,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
660 | if (!reason) | 682 | if (!reason) |
661 | reason = cpu_to_le16(MESH_CLOSE_RCVD); | 683 | reason = cpu_to_le16(MESH_CLOSE_RCVD); |
662 | sta->reason = reason; | 684 | sta->reason = reason; |
663 | sta->plink_state = PLINK_HOLDING; | 685 | sta->plink_state = NL80211_PLINK_HOLDING; |
664 | if (!mod_plink_timer(sta, | 686 | if (!mod_plink_timer(sta, |
665 | dot11MeshHoldingTimeout(sdata))) | 687 | dot11MeshHoldingTimeout(sdata))) |
666 | sta->ignore_plink_timer = true; | 688 | sta->ignore_plink_timer = true; |
@@ -678,7 +700,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
678 | break; | 700 | break; |
679 | case CNF_ACPT: | 701 | case CNF_ACPT: |
680 | del_timer(&sta->plink_timer); | 702 | del_timer(&sta->plink_timer); |
681 | sta->plink_state = PLINK_ESTAB; | 703 | sta->plink_state = NL80211_PLINK_ESTAB; |
682 | spin_unlock_bh(&sta->lock); | 704 | spin_unlock_bh(&sta->lock); |
683 | mesh_plink_inc_estab_count(sdata); | 705 | mesh_plink_inc_estab_count(sdata); |
684 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON); | 706 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON); |
@@ -691,7 +713,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
691 | } | 713 | } |
692 | break; | 714 | break; |
693 | 715 | ||
694 | case PLINK_CNF_RCVD: | 716 | case NL80211_PLINK_CNF_RCVD: |
695 | switch (event) { | 717 | switch (event) { |
696 | case OPN_RJCT: | 718 | case OPN_RJCT: |
697 | case CNF_RJCT: | 719 | case CNF_RJCT: |
@@ -700,7 +722,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
700 | if (!reason) | 722 | if (!reason) |
701 | reason = cpu_to_le16(MESH_CLOSE_RCVD); | 723 | reason = cpu_to_le16(MESH_CLOSE_RCVD); |
702 | sta->reason = reason; | 724 | sta->reason = reason; |
703 | sta->plink_state = PLINK_HOLDING; | 725 | sta->plink_state = NL80211_PLINK_HOLDING; |
704 | if (!mod_plink_timer(sta, | 726 | if (!mod_plink_timer(sta, |
705 | dot11MeshHoldingTimeout(sdata))) | 727 | dot11MeshHoldingTimeout(sdata))) |
706 | sta->ignore_plink_timer = true; | 728 | sta->ignore_plink_timer = true; |
@@ -712,7 +734,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
712 | break; | 734 | break; |
713 | case OPN_ACPT: | 735 | case OPN_ACPT: |
714 | del_timer(&sta->plink_timer); | 736 | del_timer(&sta->plink_timer); |
715 | sta->plink_state = PLINK_ESTAB; | 737 | sta->plink_state = NL80211_PLINK_ESTAB; |
716 | spin_unlock_bh(&sta->lock); | 738 | spin_unlock_bh(&sta->lock); |
717 | mesh_plink_inc_estab_count(sdata); | 739 | mesh_plink_inc_estab_count(sdata); |
718 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON); | 740 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON); |
@@ -727,13 +749,13 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
727 | } | 749 | } |
728 | break; | 750 | break; |
729 | 751 | ||
730 | case PLINK_ESTAB: | 752 | case NL80211_PLINK_ESTAB: |
731 | switch (event) { | 753 | switch (event) { |
732 | case CLS_ACPT: | 754 | case CLS_ACPT: |
733 | reason = cpu_to_le16(MESH_CLOSE_RCVD); | 755 | reason = cpu_to_le16(MESH_CLOSE_RCVD); |
734 | sta->reason = reason; | 756 | sta->reason = reason; |
735 | deactivated = __mesh_plink_deactivate(sta); | 757 | deactivated = __mesh_plink_deactivate(sta); |
736 | sta->plink_state = PLINK_HOLDING; | 758 | sta->plink_state = NL80211_PLINK_HOLDING; |
737 | llid = sta->llid; | 759 | llid = sta->llid; |
738 | mod_plink_timer(sta, dot11MeshHoldingTimeout(sdata)); | 760 | mod_plink_timer(sta, dot11MeshHoldingTimeout(sdata)); |
739 | spin_unlock_bh(&sta->lock); | 761 | spin_unlock_bh(&sta->lock); |
@@ -753,7 +775,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
753 | break; | 775 | break; |
754 | } | 776 | } |
755 | break; | 777 | break; |
756 | case PLINK_HOLDING: | 778 | case NL80211_PLINK_HOLDING: |
757 | switch (event) { | 779 | switch (event) { |
758 | case CLS_ACPT: | 780 | case CLS_ACPT: |
759 | if (del_timer(&sta->plink_timer)) | 781 | if (del_timer(&sta->plink_timer)) |