aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_plink.c
diff options
context:
space:
mode:
authorRui Paulo <rpaulo@gmail.com>2009-11-09 18:46:48 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-11 15:23:59 -0500
commit1460dd158a520447b87661aea4afda1997d69cde (patch)
tree7a56ca4475d4b093d7fdf96adf5f30b377a81517 /net/mac80211/mesh_plink.c
parentf3c0d88a7fc1c3fff84ac57d3f3195d0dd1854ac (diff)
mac80211: improve peer link management debugging
Print the FSM state strings instead of just the numbers. 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>
Diffstat (limited to 'net/mac80211/mesh_plink.c')
-rw-r--r--net/mac80211/mesh_plink.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 8a54bc836c92..cf12f616c5b1 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -398,6 +398,17 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
398 u8 ie_len; 398 u8 ie_len;
399 u8 *baseaddr; 399 u8 *baseaddr;
400 __le16 plid, llid, reason; 400 __le16 plid, llid, reason;
401#ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG
402 static const char *mplstates[] = {
403 [PLINK_LISTEN] = "LISTEN",
404 [PLINK_OPN_SNT] = "OPN-SNT",
405 [PLINK_OPN_RCVD] = "OPN-RCVD",
406 [PLINK_CNF_RCVD] = "CNF_RCVD",
407 [PLINK_ESTAB] = "ESTAB",
408 [PLINK_HOLDING] = "HOLDING",
409 [PLINK_BLOCKED] = "BLOCKED"
410 };
411#endif
401 412
402 /* need action_code, aux */ 413 /* need action_code, aux */
403 if (len < IEEE80211_MIN_ACTION_SIZE + 3) 414 if (len < IEEE80211_MIN_ACTION_SIZE + 3)
@@ -536,8 +547,8 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
536 } 547 }
537 } 548 }
538 549
539 mpl_dbg("Mesh plink (peer, state, llid, plid, event): %pM %d %d %d %d\n", 550 mpl_dbg("Mesh plink (peer, state, llid, plid, event): %pM %s %d %d %d\n",
540 mgmt->sa, sta->plink_state, 551 mgmt->sa, mplstates[sta->plink_state],
541 le16_to_cpu(sta->llid), le16_to_cpu(sta->plid), 552 le16_to_cpu(sta->llid), le16_to_cpu(sta->plid),
542 event); 553 event);
543 reason = 0; 554 reason = 0;