aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Paulo <rpaulo@gmail.com>2009-11-09 18:46:47 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-11 15:23:59 -0500
commitf3c0d88a7fc1c3fff84ac57d3f3195d0dd1854ac (patch)
tree7215681fd6129051d85e303f6af083f9afad38c4
parentdbb81c428bf534fcfe94102acca50f6d56504999 (diff)
mac80211: improve HWMP debugging
Signed-off-by: Rui Paulo <rpaulo@gmail.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Reviewed-by: Andrey Yurovsky <andrey@cozybit.com> Tested-by: Brian Cavagnolo <brian@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/mesh_hwmp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index e67e812f78e2..db1a33098a88 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -115,13 +115,13 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
115 115
116 switch (action) { 116 switch (action) {
117 case MPATH_PREQ: 117 case MPATH_PREQ:
118 mhwmp_dbg("sending PREQ\n"); 118 mhwmp_dbg("sending PREQ to %pM\n", dst);
119 ie_len = 37; 119 ie_len = 37;
120 pos = skb_put(skb, 2 + ie_len); 120 pos = skb_put(skb, 2 + ie_len);
121 *pos++ = WLAN_EID_PREQ; 121 *pos++ = WLAN_EID_PREQ;
122 break; 122 break;
123 case MPATH_PREP: 123 case MPATH_PREP:
124 mhwmp_dbg("sending PREP\n"); 124 mhwmp_dbg("sending PREP to %pM\n", dst);
125 ie_len = 31; 125 ie_len = 31;
126 pos = skb_put(skb, 2 + ie_len); 126 pos = skb_put(skb, 2 + ie_len);
127 *pos++ = WLAN_EID_PREP; 127 *pos++ = WLAN_EID_PREP;
@@ -439,7 +439,7 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
439 orig_dsn = PREQ_IE_ORIG_DSN(preq_elem); 439 orig_dsn = PREQ_IE_ORIG_DSN(preq_elem);
440 dst_flags = PREQ_IE_DST_F(preq_elem); 440 dst_flags = PREQ_IE_DST_F(preq_elem);
441 441
442 mhwmp_dbg("received PREQ\n"); 442 mhwmp_dbg("received PREQ from %pM\n", orig_addr);
443 443
444 if (memcmp(dst_addr, sdata->dev->dev_addr, ETH_ALEN) == 0) { 444 if (memcmp(dst_addr, sdata->dev->dev_addr, ETH_ALEN) == 0) {
445 mhwmp_dbg("PREQ is for us\n"); 445 mhwmp_dbg("PREQ is for us\n");
@@ -498,7 +498,7 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
498 ifmsh->mshstats.dropped_frames_ttl++; 498 ifmsh->mshstats.dropped_frames_ttl++;
499 return; 499 return;
500 } 500 }
501 mhwmp_dbg("forwarding the PREQ\n"); 501 mhwmp_dbg("forwarding the PREQ from %pM\n", orig_addr);
502 --ttl; 502 --ttl;
503 flags = PREQ_IE_FLAGS(preq_elem); 503 flags = PREQ_IE_FLAGS(preq_elem);
504 preq_id = PREQ_IE_PREQ_ID(preq_elem); 504 preq_id = PREQ_IE_PREQ_ID(preq_elem);
@@ -525,7 +525,7 @@ static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata,
525 u8 next_hop[ETH_ALEN]; 525 u8 next_hop[ETH_ALEN];
526 u32 dst_dsn, orig_dsn, lifetime; 526 u32 dst_dsn, orig_dsn, lifetime;
527 527
528 mhwmp_dbg("received PREP\n"); 528 mhwmp_dbg("received PREP from %pM\n", PREP_IE_ORIG_ADDR(prep_elem));
529 529
530 /* Note that we divert from the draft nomenclature and denominate 530 /* Note that we divert from the draft nomenclature and denominate
531 * destination to what the draft refers to as origininator. So in this 531 * destination to what the draft refers to as origininator. So in this
@@ -628,7 +628,6 @@ void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata,
628 ieee802_11_parse_elems(mgmt->u.action.u.mesh_action.variable, 628 ieee802_11_parse_elems(mgmt->u.action.u.mesh_action.variable,
629 len - baselen, &elems); 629 len - baselen, &elems);
630 630
631 mhwmp_dbg("RX path selection frame\n");
632 if (elems.preq) { 631 if (elems.preq) {
633 if (elems.preq_len != 37) 632 if (elems.preq_len != 37)
634 /* Right now we support just 1 destination and no AE */ 633 /* Right now we support just 1 destination and no AE */