diff options
Diffstat (limited to 'net/mac80211/mesh.c')
-rw-r--r-- | net/mac80211/mesh.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 88dcfe3030b1..05955dc6b3d3 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -373,6 +373,17 @@ static void ieee80211_mesh_path_root_timer(unsigned long data) | |||
373 | ieee80211_queue_work(&local->hw, &ifmsh->work); | 373 | ieee80211_queue_work(&local->hw, &ifmsh->work); |
374 | } | 374 | } |
375 | 375 | ||
376 | void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh) | ||
377 | { | ||
378 | if (ifmsh->mshcfg.dot11MeshHWMPRootMode) | ||
379 | set_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags); | ||
380 | else { | ||
381 | clear_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags); | ||
382 | /* stop running timer */ | ||
383 | del_timer_sync(&ifmsh->mesh_path_root_timer); | ||
384 | } | ||
385 | } | ||
386 | |||
376 | /** | 387 | /** |
377 | * ieee80211_fill_mesh_addresses - fill addresses of a locally originated mesh frame | 388 | * ieee80211_fill_mesh_addresses - fill addresses of a locally originated mesh frame |
378 | * @hdr: 802.11 frame header | 389 | * @hdr: 802.11 frame header |
@@ -503,6 +514,7 @@ void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata) | |||
503 | add_timer(&ifmsh->mesh_path_timer); | 514 | add_timer(&ifmsh->mesh_path_timer); |
504 | if (test_and_clear_bit(TMR_RUNNING_MPR, &ifmsh->timers_running)) | 515 | if (test_and_clear_bit(TMR_RUNNING_MPR, &ifmsh->timers_running)) |
505 | add_timer(&ifmsh->mesh_path_root_timer); | 516 | add_timer(&ifmsh->mesh_path_root_timer); |
517 | ieee80211_mesh_root_setup(ifmsh); | ||
506 | } | 518 | } |
507 | #endif | 519 | #endif |
508 | 520 | ||
@@ -512,6 +524,7 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata) | |||
512 | struct ieee80211_local *local = sdata->local; | 524 | struct ieee80211_local *local = sdata->local; |
513 | 525 | ||
514 | set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags); | 526 | set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags); |
527 | ieee80211_mesh_root_setup(ifmsh); | ||
515 | ieee80211_queue_work(&local->hw, &ifmsh->work); | 528 | ieee80211_queue_work(&local->hw, &ifmsh->work); |
516 | sdata->vif.bss_conf.beacon_int = MESH_DEFAULT_BEACON_INTERVAL; | 529 | sdata->vif.bss_conf.beacon_int = MESH_DEFAULT_BEACON_INTERVAL; |
517 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON | | 530 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON | |