diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-02-29 17:19:04 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-02-29 17:19:04 +0000 |
commit | f3a1db04f0ebba577598f1577d3c8c756c8bf757 (patch) | |
tree | eecfe6c9154a9e0717573daba16d1c58bd674d2e /package/kernel/mac80211/patches/327-mac80211-Remove-MPP-table-entries-with-MPath.patch | |
parent | 5db86ba649298bef0066cac8e4d0e17834f6b7b0 (diff) | |
download | upstream-f3a1db04f0ebba577598f1577d3c8c756c8bf757.tar.gz upstream-f3a1db04f0ebba577598f1577d3c8c756c8bf757.tar.bz2 upstream-f3a1db04f0ebba577598f1577d3c8c756c8bf757.zip |
mac80211: backport from trunk r48782 + required kernel patches and mt76, mwlwifi
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@48822 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/patches/327-mac80211-Remove-MPP-table-entries-with-MPath.patch')
-rw-r--r-- | package/kernel/mac80211/patches/327-mac80211-Remove-MPP-table-entries-with-MPath.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/327-mac80211-Remove-MPP-table-entries-with-MPath.patch b/package/kernel/mac80211/patches/327-mac80211-Remove-MPP-table-entries-with-MPath.patch new file mode 100644 index 0000000000..f7f9df946a --- /dev/null +++ b/package/kernel/mac80211/patches/327-mac80211-Remove-MPP-table-entries-with-MPath.patch @@ -0,0 +1,54 @@ +From: Henning Rogge <hrogge@gmail.com> +Date: Wed, 3 Feb 2016 13:58:36 +0100 +Subject: [PATCH] mac80211: Remove MPP table entries with MPath + +Make the mesh_path_del() function remove all mpp table entries +that are proxied by the removed mesh path. + +Acked-by: Bob Copeland <me@bobcopeland.com> +Signed-off-by: Henning Rogge <henning.rogge@fkie.fraunhofer.de> +Signed-off-by: Johannes Berg <johannes.berg@intel.com> +--- + +--- a/net/mac80211/mesh_pathtbl.c ++++ b/net/mac80211/mesh_pathtbl.c +@@ -835,6 +835,29 @@ void mesh_path_flush_by_nexthop(struct s + rcu_read_unlock(); + } + ++static void mpp_flush_by_proxy(struct ieee80211_sub_if_data *sdata, ++ const u8 *proxy) ++{ ++ struct mesh_table *tbl; ++ struct mesh_path *mpp; ++ struct mpath_node *node; ++ int i; ++ ++ rcu_read_lock(); ++ read_lock_bh(&pathtbl_resize_lock); ++ tbl = resize_dereference_mpp_paths(); ++ for_each_mesh_entry(tbl, node, i) { ++ mpp = node->mpath; ++ if (ether_addr_equal(mpp->mpp, proxy)) { ++ spin_lock(&tbl->hashwlock[i]); ++ __mesh_path_del(tbl, node); ++ spin_unlock(&tbl->hashwlock[i]); ++ } ++ } ++ read_unlock_bh(&pathtbl_resize_lock); ++ rcu_read_unlock(); ++} ++ + static void table_flush_by_iface(struct mesh_table *tbl, + struct ieee80211_sub_if_data *sdata) + { +@@ -892,6 +915,9 @@ int mesh_path_del(struct ieee80211_sub_i + int hash_idx; + int err = 0; + ++ /* flush relevant mpp entries first */ ++ mpp_flush_by_proxy(sdata, addr); ++ + read_lock_bh(&pathtbl_resize_lock); + tbl = resize_dereference_mesh_paths(); + hash_idx = mesh_table_hash(addr, sdata, tbl); |