forked from Minki/linux
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>
This commit is contained in:
parent
dbb81c428b
commit
f3c0d88a7f
@ -115,13 +115,13 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
|
|||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case MPATH_PREQ:
|
case MPATH_PREQ:
|
||||||
mhwmp_dbg("sending PREQ\n");
|
mhwmp_dbg("sending PREQ to %pM\n", dst);
|
||||||
ie_len = 37;
|
ie_len = 37;
|
||||||
pos = skb_put(skb, 2 + ie_len);
|
pos = skb_put(skb, 2 + ie_len);
|
||||||
*pos++ = WLAN_EID_PREQ;
|
*pos++ = WLAN_EID_PREQ;
|
||||||
break;
|
break;
|
||||||
case MPATH_PREP:
|
case MPATH_PREP:
|
||||||
mhwmp_dbg("sending PREP\n");
|
mhwmp_dbg("sending PREP to %pM\n", dst);
|
||||||
ie_len = 31;
|
ie_len = 31;
|
||||||
pos = skb_put(skb, 2 + ie_len);
|
pos = skb_put(skb, 2 + ie_len);
|
||||||
*pos++ = WLAN_EID_PREP;
|
*pos++ = WLAN_EID_PREP;
|
||||||
@ -439,7 +439,7 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
|
|||||||
orig_dsn = PREQ_IE_ORIG_DSN(preq_elem);
|
orig_dsn = PREQ_IE_ORIG_DSN(preq_elem);
|
||||||
dst_flags = PREQ_IE_DST_F(preq_elem);
|
dst_flags = PREQ_IE_DST_F(preq_elem);
|
||||||
|
|
||||||
mhwmp_dbg("received PREQ\n");
|
mhwmp_dbg("received PREQ from %pM\n", orig_addr);
|
||||||
|
|
||||||
if (memcmp(dst_addr, sdata->dev->dev_addr, ETH_ALEN) == 0) {
|
if (memcmp(dst_addr, sdata->dev->dev_addr, ETH_ALEN) == 0) {
|
||||||
mhwmp_dbg("PREQ is for us\n");
|
mhwmp_dbg("PREQ is for us\n");
|
||||||
@ -498,7 +498,7 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
|
|||||||
ifmsh->mshstats.dropped_frames_ttl++;
|
ifmsh->mshstats.dropped_frames_ttl++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mhwmp_dbg("forwarding the PREQ\n");
|
mhwmp_dbg("forwarding the PREQ from %pM\n", orig_addr);
|
||||||
--ttl;
|
--ttl;
|
||||||
flags = PREQ_IE_FLAGS(preq_elem);
|
flags = PREQ_IE_FLAGS(preq_elem);
|
||||||
preq_id = PREQ_IE_PREQ_ID(preq_elem);
|
preq_id = PREQ_IE_PREQ_ID(preq_elem);
|
||||||
@ -525,7 +525,7 @@ static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata,
|
|||||||
u8 next_hop[ETH_ALEN];
|
u8 next_hop[ETH_ALEN];
|
||||||
u32 dst_dsn, orig_dsn, lifetime;
|
u32 dst_dsn, orig_dsn, lifetime;
|
||||||
|
|
||||||
mhwmp_dbg("received PREP\n");
|
mhwmp_dbg("received PREP from %pM\n", PREP_IE_ORIG_ADDR(prep_elem));
|
||||||
|
|
||||||
/* Note that we divert from the draft nomenclature and denominate
|
/* Note that we divert from the draft nomenclature and denominate
|
||||||
* destination to what the draft refers to as origininator. So in this
|
* 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,
|
|||||||
ieee802_11_parse_elems(mgmt->u.action.u.mesh_action.variable,
|
ieee802_11_parse_elems(mgmt->u.action.u.mesh_action.variable,
|
||||||
len - baselen, &elems);
|
len - baselen, &elems);
|
||||||
|
|
||||||
mhwmp_dbg("RX path selection frame\n");
|
|
||||||
if (elems.preq) {
|
if (elems.preq) {
|
||||||
if (elems.preq_len != 37)
|
if (elems.preq_len != 37)
|
||||||
/* Right now we support just 1 destination and no AE */
|
/* Right now we support just 1 destination and no AE */
|
||||||
|
Loading…
Reference in New Issue
Block a user