Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 May 2012 16:07:35 +0000 (UTC)
From:      Monthadar Al Jaberi <monthadar@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r234885 - head/sys/net80211
Message-ID:  <201205011607.q41G7ZKV033668@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: monthadar
Date: Tue May  1 16:07:35 2012
New Revision: 234885
URL: http://svn.freebsd.org/changeset/base/234885

Log:
  * Fixed hwmp_discover code to populate a PREQ packet correctly;
  * Removed IEEE80211_MESHPREQ_TFLAGS_RF which is no longer part of the
  amendment spec;
  
  Approved by: adrian

Modified:
  head/sys/net80211/ieee80211_hwmp.c
  head/sys/net80211/ieee80211_mesh.h

Modified: head/sys/net80211/ieee80211_hwmp.c
==============================================================================
--- head/sys/net80211/ieee80211_hwmp.c	Tue May  1 16:06:20 2012	(r234884)
+++ head/sys/net80211/ieee80211_hwmp.c	Tue May  1 16:07:35 2012	(r234885)
@@ -171,9 +171,6 @@ static SYSCTL_NODE(_net_wlan, OID_AUTO, 
 static int	ieee80211_hwmp_targetonly = 0;
 SYSCTL_INT(_net_wlan_hwmp, OID_AUTO, targetonly, CTLTYPE_INT | CTLFLAG_RW,
     &ieee80211_hwmp_targetonly, 0, "Set TO bit on generated PREQs");
-static int	ieee80211_hwmp_replyforward = 1;
-SYSCTL_INT(_net_wlan_hwmp, OID_AUTO, replyforward, CTLTYPE_INT | CTLFLAG_RW,
-    &ieee80211_hwmp_replyforward, 0, "Set RF bit on generated PREQs");
 static int	ieee80211_hwmp_pathtimeout = -1;
 SYSCTL_PROC(_net_wlan_hwmp, OID_AUTO, pathlifetime, CTLTYPE_INT | CTLFLAG_RW,
     &ieee80211_hwmp_pathtimeout, 0, ieee80211_sysctl_msecs_ticks, "I",
@@ -838,8 +835,7 @@ hwmp_rootmode_cb(void *arg)
 	preq.preq_metric = IEEE80211_MESHLMETRIC_INITIALVAL;
 	preq.preq_tcount = 1;
 	IEEE80211_ADDR_COPY(PREQ_TADDR(0), broadcastaddr);
-	PREQ_TFLAGS(0) = IEEE80211_MESHPREQ_TFLAGS_TO |
-	    IEEE80211_MESHPREQ_TFLAGS_RF;
+	PREQ_TFLAGS(0) = IEEE80211_MESHPREQ_TFLAGS_TO;
 	PREQ_TSEQ(0) = 0;
 	vap->iv_stats.is_hwmp_rootreqs++;
 	hwmp_send_preq(vap->iv_bss, vap->iv_myaddr, broadcastaddr, &preq,
@@ -1104,8 +1100,6 @@ hwmp_recv_preq(struct ieee80211vap *vap,
 				 */
 				ppreq.preq_targets[0].target_flags |=
 				    IEEE80211_MESHPREQ_TFLAGS_TO;
-				ppreq.preq_targets[0].target_flags &=
-				    ~IEEE80211_MESHPREQ_TFLAGS_RF;
 				hwmp_send_preq(ni, vap->iv_myaddr,
 				    rttarg->rt_nexthop, &ppreq,
 				    &hrtarg->hr_lastpreq,
@@ -1709,16 +1703,14 @@ hwmp_discover(struct ieee80211vap *vap,
 			preq.preq_origseq = hr->hr_origseq;
 			preq.preq_lifetime =
 			    ticks_to_msecs(ieee80211_hwmp_pathtimeout);
-			preq.preq_metric = rt->rt_metric;
+			preq.preq_metric = IEEE80211_MESHLMETRIC_INITIALVAL;
 			preq.preq_tcount = 1;
 			IEEE80211_ADDR_COPY(PREQ_TADDR(0), dest);
 			PREQ_TFLAGS(0) = 0;
 			if (ieee80211_hwmp_targetonly)
 				PREQ_TFLAGS(0) |= IEEE80211_MESHPREQ_TFLAGS_TO;
-			if (ieee80211_hwmp_replyforward)
-				PREQ_TFLAGS(0) |= IEEE80211_MESHPREQ_TFLAGS_RF;
 			PREQ_TFLAGS(0) |= IEEE80211_MESHPREQ_TFLAGS_USN;
-			PREQ_TSEQ(0) = hr->hr_seq;
+			PREQ_TSEQ(0) = 0; /* RESERVED when USN flag is set */
 			/* XXX check return value */
 			hwmp_send_preq(vap->iv_bss, vap->iv_myaddr,
 			    broadcastaddr, &preq, &hr->hr_lastpreq,

Modified: head/sys/net80211/ieee80211_mesh.h
==============================================================================
--- head/sys/net80211/ieee80211_mesh.h	Tue May  1 16:06:20 2012	(r234884)
+++ head/sys/net80211/ieee80211_mesh.h	Tue May  1 16:07:35 2012	(r234885)
@@ -246,7 +246,6 @@ struct ieee80211_meshpreq_ie {
 	struct {
 		uint8_t		target_flags;
 #define	IEEE80211_MESHPREQ_TFLAGS_TO	0x01	/* Target Only */
-#define	IEEE80211_MESHPREQ_TFLAGS_RF	0x02	/* Reply and Forward */
 #define	IEEE80211_MESHPREQ_TFLAGS_USN	0x04	/* Unknown HWMP seq number */
 		uint8_t		target_addr[IEEE80211_ADDR_LEN];
 		uint32_t	target_seq;	/* HWMP Sequence Number */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205011607.q41G7ZKV033668>