|
@@ -373,6 +373,17 @@ static void ieee80211_mesh_path_root_timer(unsigned long data)
|
|
ieee80211_queue_work(&local->hw, &ifmsh->work);
|
|
ieee80211_queue_work(&local->hw, &ifmsh->work);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh)
|
|
|
|
+{
|
|
|
|
+ if (ifmsh->mshcfg.dot11MeshHWMPRootMode)
|
|
|
|
+ set_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags);
|
|
|
|
+ else {
|
|
|
|
+ clear_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags);
|
|
|
|
+ /* stop running timer */
|
|
|
|
+ del_timer_sync(&ifmsh->mesh_path_root_timer);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* ieee80211_fill_mesh_addresses - fill addresses of a locally originated mesh frame
|
|
* ieee80211_fill_mesh_addresses - fill addresses of a locally originated mesh frame
|
|
* @hdr: 802.11 frame header
|
|
* @hdr: 802.11 frame header
|
|
@@ -503,6 +514,7 @@ void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata)
|
|
add_timer(&ifmsh->mesh_path_timer);
|
|
add_timer(&ifmsh->mesh_path_timer);
|
|
if (test_and_clear_bit(TMR_RUNNING_MPR, &ifmsh->timers_running))
|
|
if (test_and_clear_bit(TMR_RUNNING_MPR, &ifmsh->timers_running))
|
|
add_timer(&ifmsh->mesh_path_root_timer);
|
|
add_timer(&ifmsh->mesh_path_root_timer);
|
|
|
|
+ ieee80211_mesh_root_setup(ifmsh);
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
@@ -512,6 +524,7 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata)
|
|
struct ieee80211_local *local = sdata->local;
|
|
struct ieee80211_local *local = sdata->local;
|
|
|
|
|
|
set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags);
|
|
set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags);
|
|
|
|
+ ieee80211_mesh_root_setup(ifmsh);
|
|
ieee80211_queue_work(&local->hw, &ifmsh->work);
|
|
ieee80211_queue_work(&local->hw, &ifmsh->work);
|
|
sdata->vif.bss_conf.beacon_int = MESH_DEFAULT_BEACON_INTERVAL;
|
|
sdata->vif.bss_conf.beacon_int = MESH_DEFAULT_BEACON_INTERVAL;
|
|
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON |
|
|
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON |
|