From 3d7486ce5067641fae491e0d18ae74c8595eef44 Mon Sep 17 00:00:00 2001 From: Monthadar Al Jaberi Date: Tue, 1 May 2012 16:06:20 +0000 Subject: [PATCH] * Fixed PREQ flag field Adressing mode subfiled according to amendment specs; Approved by: adria --- sys/net80211/ieee80211_hwmp.c | 8 ++++---- sys/net80211/ieee80211_mesh.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/net80211/ieee80211_hwmp.c b/sys/net80211/ieee80211_hwmp.c index 3e06ab899c3..ca31aea3108 100644 --- a/sys/net80211/ieee80211_hwmp.c +++ b/sys/net80211/ieee80211_hwmp.c @@ -824,7 +824,7 @@ hwmp_rootmode_cb(void *arg) IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, vap->iv_bss, "%s", "send broadcast PREQ"); - preq.preq_flags = IEEE80211_MESHPREQ_FLAGS_AM; + preq.preq_flags = 0; if (ms->ms_flags & IEEE80211_MESHFLAGS_PORTAL) preq.preq_flags |= IEEE80211_MESHPREQ_FLAGS_PR; if (hs->hs_rootmode == IEEE80211_HWMP_ROOTMODE_PROACTIVE) @@ -1092,8 +1092,8 @@ hwmp_recv_preq(struct ieee80211vap *vap, struct ieee80211_node *ni, * Propagate the original PREQ. * PREQ is unicast now to rttarg->rt_nexthop */ - ppreq.preq_flags &= - ~IEEE80211_MESHPREQ_FLAGS_AM; + ppreq.preq_flags |= + IEEE80211_MESHPREQ_FLAGS_AM; ppreq.preq_hopcount += 1; ppreq.preq_ttl -= 1; ppreq.preq_metric += @@ -1701,7 +1701,7 @@ hwmp_discover(struct ieee80211vap *vap, * Try to discover the path for this node. * Group addressed PREQ Case A */ - preq.preq_flags = IEEE80211_MESHPREQ_FLAGS_AM; + preq.preq_flags = 0; preq.preq_hopcount = 0; preq.preq_ttl = ms->ms_ttl; preq.preq_id = ++hs->hs_preqid; diff --git a/sys/net80211/ieee80211_mesh.h b/sys/net80211/ieee80211_mesh.h index f28356e5cec..6496b0cbb83 100644 --- a/sys/net80211/ieee80211_mesh.h +++ b/sys/net80211/ieee80211_mesh.h @@ -230,7 +230,7 @@ struct ieee80211_meshpreq_ie { uint8_t preq_len; uint8_t preq_flags; #define IEEE80211_MESHPREQ_FLAGS_PR 0x01 /* Portal Role */ -#define IEEE80211_MESHPREQ_FLAGS_AM 0x02 /* 0 = ucast / 1 = bcast */ +#define IEEE80211_MESHPREQ_FLAGS_AM 0x02 /* 0 = bcast / 1 = ucast */ #define IEEE80211_MESHPREQ_FLAGS_PP 0x04 /* Proactive PREP */ #define IEEE80211_MESHPREQ_FLAGS_AE 0x40 /* Address Extension */ uint8_t preq_hopcount; -- 2.45.2