mac80211: update mesh beacon on workqueue
PATCH v3 1/1 mac80211: update mesh beacon on workqueue
Instead of updating the mesh beacon immediately when requested (which would require the sdata_lock()), defer it to the mac80211 workqueue.
Fixes yet another deadlock on calling sta_info_flush() with the sdata_lock() held from ieee80211_stop_mesh(). We could just drop the sdata_lock() around the mesh_sta_cleanup() call, but this path is also taken from several non-locked error paths.
---
v3:
cast u32 as unsigned long endianess (Johannes) clear mesh work flags on stop (Johannes) test_and_clear_bit() returns a bool {set,clear}_bit() takes the bit _number_
net/mac80211/ieee80211_i.h | 1 + net/mac80211/mesh.c | 53 ++++++++++++++++++++++++++++++++++---------- net/mac80211/mesh.h | 2 ++ 3 files changed, 44 insertions(+), 12 deletions(-)
net/mac80211/ieee80211_i.h +1 -0
@@ -543,6 +543,7 @@ struct ieee80211_if_mesh {struct timer_list mesh_path_root_timer;unsigned long wrkq_flags; +unsigned long mbss_changed;u8 mesh_id[IEEE80211_MAX_MESH_ID_LEN ];size_t mesh_id_len;
net/mac80211/mesh.c +41 -12
84 lines not on this page · raw message
net/mac80211/mesh.h +2 -0
@@ -57,6 +57,7 @@ enum mesh_path_flags {* grow * @MESH_WORK_ROOT: the mesh root station needs to send a frame * @MESH_WORK_DRIFT_ADJUST: time to compensate for clock drift relative to other +* @MESH_WORK_MBSS_CHANGED: rebuild beacon and notify driver of BSS changes * mesh nodes */ enum mesh_deferred_task_flags {
@@ -65,6 +66,7 @@ enum mesh_deferred_task_flags {MESH_WORK_GROW_MPP_TABLE ,MESH_WORK_ROOT ,MESH_WORK_DRIFT_ADJUST , + MESH_WORK_MBSS_CHANGED, };/**
Signature · 1 line
1.7.10.4
Johannes Berg
maintainerQuoted 4 lines · Thomas Pedersen
* @MESH_WORK_ROOT: the mesh root station needs to send a frame
* @MESH_WORK_DRIFT_ADJUST: time to compensate for clock drift relative to other
+ * @MESH_WORK_MBSS_CHANGED: rebuild beacon and notify driver of BSS changes
* mesh nodes
That seems to have gone wrong :)
I fixed it and applied this.
johannes