mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
mac80211: disable mesh
My kvm instance was complaining a lot about sleeping in atomic contexts in the mesh code, and it turns out that both mesh_path_add() and mpp_path_add() need to be able to sleep (they even use synchronize_rcu()!). I put in a might_sleep() to annotate that, but I see no way, at least right now, of actually making sure those functions are only called from process context since they are both called during TX and RX and the mesh code itself even calls them with rcu_read_lock() "held". Therefore, let's disable it completely for now. It's possible that I'm only seeing this because the hwsim's beaconing is broken and thus the peers aren't discovered right away, but it is possible that this happens even if beaconing is working, for a peer that doesn't exist or so. It should be possible to solve this by deferring the freeing of the tables to call_rcu() instead of using synchronize_rcu(), and also using atomic allocations, but maybe it makes more sense to rework the code to not call these from atomic contexts and defer more of the work to the workqueue. Right now, I can't work on either of those solutions though. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
7b80ece41a
commit
e2e414d923
2 changed files with 4 additions and 0 deletions
|
@ -83,6 +83,7 @@ endmenu
|
|||
config MAC80211_MESH
|
||||
bool "Enable mac80211 mesh networking (pre-802.11s) support"
|
||||
depends on MAC80211 && EXPERIMENTAL
|
||||
depends on BROKEN
|
||||
---help---
|
||||
This options enables support of Draft 802.11s mesh networking.
|
||||
The implementation is based on Draft 1.08 of the Mesh Networking
|
||||
|
|
|
@ -175,6 +175,8 @@ int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata)
|
|||
int err = 0;
|
||||
u32 hash_idx;
|
||||
|
||||
might_sleep();
|
||||
|
||||
if (memcmp(dst, sdata->dev->dev_addr, ETH_ALEN) == 0)
|
||||
/* never add ourselves as neighbours */
|
||||
return -ENOTSUPP;
|
||||
|
@ -265,6 +267,7 @@ int mpp_path_add(u8 *dst, u8 *mpp, struct ieee80211_sub_if_data *sdata)
|
|||
int err = 0;
|
||||
u32 hash_idx;
|
||||
|
||||
might_sleep();
|
||||
|
||||
if (memcmp(dst, sdata->dev->dev_addr, ETH_ALEN) == 0)
|
||||
/* never add ourselves as neighbours */
|
||||
|
|
Loading…
Reference in a new issue