aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_pathtbl.c
diff options
context:
space:
mode:
authorThomas Pedersen <thomas@cozybit.com>2011-08-11 22:35:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-22 14:46:00 -0400
commit25d49e4d63564c7004a4d6735d1d8c3cc41a7394 (patch)
treec052863386c4744beb808283cc3a3ff768d417e6 /net/mac80211/mesh_pathtbl.c
parent36c704fded53ee0d6866e8ae7f7e3d29cd4315b9 (diff)
mac80211: update mesh path selection frame format
Make mesh path selection frames Mesh Action category, remove outdated Mesh Path Selection category and defines, use updated reason codes, add mesh_action_is_path_sel for readability, and update/correct path selection IEs. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mesh_pathtbl.c')
-rw-r--r--net/mac80211/mesh_pathtbl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 068ee6518254..6ffcd53fe7d6 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -539,6 +539,7 @@ void mesh_plink_broken(struct sta_info *sta)
539 struct hlist_node *p; 539 struct hlist_node *p;
540 struct ieee80211_sub_if_data *sdata = sta->sdata; 540 struct ieee80211_sub_if_data *sdata = sta->sdata;
541 int i; 541 int i;
542 __le16 reason = cpu_to_le16(WLAN_REASON_MESH_PATH_DEST_UNREACHABLE);
542 543
543 rcu_read_lock(); 544 rcu_read_lock();
544 tbl = rcu_dereference(mesh_paths); 545 tbl = rcu_dereference(mesh_paths);
@@ -553,8 +554,7 @@ void mesh_plink_broken(struct sta_info *sta)
553 spin_unlock_bh(&mpath->state_lock); 554 spin_unlock_bh(&mpath->state_lock);
554 mesh_path_error_tx(sdata->u.mesh.mshcfg.element_ttl, 555 mesh_path_error_tx(sdata->u.mesh.mshcfg.element_ttl,
555 mpath->dst, cpu_to_le32(mpath->sn), 556 mpath->dst, cpu_to_le32(mpath->sn),
556 cpu_to_le16(PERR_RCODE_DEST_UNREACH), 557 reason, bcast, sdata);
557 bcast, sdata);
558 } else 558 } else
559 spin_unlock_bh(&mpath->state_lock); 559 spin_unlock_bh(&mpath->state_lock);
560 } 560 }
@@ -699,6 +699,7 @@ void mesh_path_discard_frame(struct sk_buff *skb,
699 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; 699 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
700 struct mesh_path *mpath; 700 struct mesh_path *mpath;
701 u32 sn = 0; 701 u32 sn = 0;
702 __le16 reason = cpu_to_le16(WLAN_REASON_MESH_PATH_NOFORWARD);
702 703
703 if (memcmp(hdr->addr4, sdata->vif.addr, ETH_ALEN) != 0) { 704 if (memcmp(hdr->addr4, sdata->vif.addr, ETH_ALEN) != 0) {
704 u8 *ra, *da; 705 u8 *ra, *da;
@@ -709,8 +710,7 @@ void mesh_path_discard_frame(struct sk_buff *skb,
709 if (mpath) 710 if (mpath)
710 sn = ++mpath->sn; 711 sn = ++mpath->sn;
711 mesh_path_error_tx(sdata->u.mesh.mshcfg.element_ttl, skb->data, 712 mesh_path_error_tx(sdata->u.mesh.mshcfg.element_ttl, skb->data,
712 cpu_to_le32(sn), 713 cpu_to_le32(sn), reason, ra, sdata);
713 cpu_to_le16(PERR_RCODE_NO_ROUTE), ra, sdata);
714 } 714 }
715 715
716 kfree_skb(skb); 716 kfree_skb(skb);