aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_pathtbl.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mesh_pathtbl.c')
-rw-r--r--net/mac80211/mesh_pathtbl.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 4c50d8ade04f..edf167e3b8f3 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -973,38 +973,11 @@ int mesh_path_send_to_gates(struct mesh_path *mpath)
973 * @skb: frame to discard 973 * @skb: frame to discard
974 * @sdata: network subif the frame was to be sent through 974 * @sdata: network subif the frame was to be sent through
975 * 975 *
976 * If the frame was being forwarded from another MP, a PERR frame will be sent
977 * to the precursor. The precursor's address (i.e. the previous hop) was saved
978 * in addr1 of the frame-to-be-forwarded, and would only be overwritten once
979 * the destination is successfully resolved.
980 *
981 * Locking: the function must me called within a rcu_read_lock region 976 * Locking: the function must me called within a rcu_read_lock region
982 */ 977 */
983void mesh_path_discard_frame(struct sk_buff *skb, 978void mesh_path_discard_frame(struct sk_buff *skb,
984 struct ieee80211_sub_if_data *sdata) 979 struct ieee80211_sub_if_data *sdata)
985{ 980{
986 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
987 struct mesh_path *mpath;
988 u32 sn = 0;
989 __le16 reason = cpu_to_le16(WLAN_REASON_MESH_PATH_NOFORWARD);
990
991 if (memcmp(hdr->addr4, sdata->vif.addr, ETH_ALEN) != 0) {
992 u8 *ra, *da;
993
994 da = hdr->addr3;
995 ra = hdr->addr2;
996 rcu_read_lock();
997 mpath = mesh_path_lookup(da, sdata);
998 if (mpath) {
999 spin_lock_bh(&mpath->state_lock);
1000 sn = ++mpath->sn;
1001 spin_unlock_bh(&mpath->state_lock);
1002 }
1003 rcu_read_unlock();
1004 mesh_path_error_tx(sdata->u.mesh.mshcfg.element_ttl, da,
1005 cpu_to_le32(sn), reason, ra, sdata);
1006 }
1007
1008 kfree_skb(skb); 981 kfree_skb(skb);
1009 sdata->u.mesh.mshstats.dropped_frames_no_route++; 982 sdata->u.mesh.mshstats.dropped_frames_no_route++;
1010} 983}