svn commit: r192670 - projects/mesh11s/sys/net80211
Rui Paulo
rpaulo at FreeBSD.org
Sat May 23 21:49:37 UTC 2009
Author: rpaulo
Date: Sat May 23 21:49:36 2009
New Revision: 192670
URL: http://svn.freebsd.org/changeset/base/192670
Log:
Fix the build
Modified:
projects/mesh11s/sys/net80211/ieee80211_hwmp.c
projects/mesh11s/sys/net80211/ieee80211_mesh.c
projects/mesh11s/sys/net80211/ieee80211_mesh.h
projects/mesh11s/sys/net80211/ieee80211_output.c
Modified: projects/mesh11s/sys/net80211/ieee80211_hwmp.c
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_hwmp.c Sat May 23 21:43:44 2009 (r192669)
+++ projects/mesh11s/sys/net80211/ieee80211_hwmp.c Sat May 23 21:49:36 2009 (r192670)
@@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
static int ieee80211_hwmp_maxhops = 31;
+#ifdef notyet
static int ieee80211_hwmp_maxhopstime = 500;
static int ieee80211_hwmp_maxprepretries = 3;
static int ieee80211_hwmp_prepminint = 100;
@@ -77,6 +78,9 @@ static int ieee80211_hwmp_targetonly = 1
static int ieee80211_hwmp_replyforward = 1; /* propagate PREQs */
static int ieee80211_hwmp_pathmaintenance = 2000;
static int ieee80211_hwmp_confirmint = 2000;
+#endif
+
+extern int ieee80211_mesh_ttl;
SYSCTL_NODE(_net_wlan, OID_AUTO, hwmp, CTLFLAG_RD, 0,
"IEEE 802.11s HWMP parameters");
@@ -90,20 +94,23 @@ SYSCTL_INT(_net_wlan_hwmp, OID_AUTO, roo
void
ieee80211_hwmp_recv_action(struct ieee80211vap *vap, struct ieee80211_node *ni,
- struct mbuf *m)
+ struct mbuf *m0)
{
struct ieee80211_frame *wh;
+ struct ieee80211_action *ia;
uint8_t *frm, *efrm;
struct ieee80211_meshpreq_ie *meshpreq = NULL;
struct ieee80211_meshprep_ie *meshprep = NULL;
struct ieee80211_meshperr_ie *meshperr = NULL;
+ union ieee80211_send_action_args vargs;
wh = mtod(m0, struct ieee80211_frame *);
ia = (struct ieee80211_action *) &wh[1];
frm = (uint8_t *)&wh[1] + sizeof(struct ieee80211_action);
efrm = mtod(m0, uint8_t *) + m0->m_len;
- KASSERT(ia->ia_category == IEEE80211_ACTION_CAT_MESHPATH);
+ KASSERT(ia->ia_category == IEEE80211_ACTION_CAT_MESHPATH,
+ ("wrong category"));
while (efrm - frm > 1) {
IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1] + 2, return);
@@ -181,6 +188,13 @@ ieee80211_hwmp_recv_action(struct ieee80
}
+#define ADDWORD(frm, v) do { \
+ frm[0] = (v) & 0xff; \
+ frm[1] = ((v) >> 8) & 0xff; \
+ frm[2] = ((v) >> 16) & 0xff; \
+ frm[3] = ((v) >> 24) & 0xff; \
+ frm += 4; \
+} while (0)
/*
* Add a Mesh Path Reply IE to a frame.
*/
@@ -192,7 +206,7 @@ ieee80211_add_meshprep(uint8_t *frm, str
*frm++ = sizeof(struct ieee80211_meshprep_ie) - 2;
*frm++ = prep->prep_flags;
*frm++ = prep->prep_hopcount;
- *frm++ = prep->prep_ttl;
+ *frm++ = prep->prep_ttl;
IEEE80211_ADDR_COPY(frm, prep->prep_targetaddr);
frm += 6;
ADDWORD(frm, prep->prep_targetseq);
Modified: projects/mesh11s/sys/net80211/ieee80211_mesh.c
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_mesh.c Sat May 23 21:43:44 2009 (r192669)
+++ projects/mesh11s/sys/net80211/ieee80211_mesh.c Sat May 23 21:49:36 2009 (r192670)
@@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$");
#include <net80211/ieee80211_var.h>
#include <net80211/ieee80211_mesh.h>
+#include <net80211/ieee80211_hwmp.h>
#include <net80211/ieee80211_input.h>
static void mesh_vattach(struct ieee80211vap *);
@@ -85,7 +86,7 @@ static const int ieee80211_mesh_holdingt
static const int ieee80211_mesh_confirmtimeout = 40;
#define CONFIRM_TIMEOUT msecs_to_ticks(ieee80211_mesh_confirmtimeout)
static const int ieee80211_mesh_maxretries = 2;
-static int ieee80211_mesh_ttl = 31;
+int ieee80211_mesh_ttl = 31;
static int ieee80211_mesh_forwarding = 1;
SYSCTL_NODE(_net_wlan, OID_AUTO, mesh, CTLFLAG_RD, 0,
@@ -635,9 +636,6 @@ mesh_recv_action(struct ieee80211_node *
struct ieee80211_meshid_ie *meshid = NULL;
struct ieee80211_meshconf_ie *meshconf = NULL;
struct ieee80211_meshpeer_ie *meshpeer = NULL;
- struct ieee80211_meshpreq_ie *meshpreq = NULL;
- struct ieee80211_meshprep_ie *meshprep = NULL;
- struct ieee80211_meshperr_ie *meshperr = NULL;
uint8_t *frm, *efrm;
union ieee80211_send_action_args vargs;
@@ -847,7 +845,7 @@ mesh_recv_action(struct ieee80211_node *
* Mesh Path action frames are handled by the HWMP module.
*/
case IEEE80211_ACTION_CAT_MESHPATH:
- ieee80211_hwmp_recv_action(vap, ni, m);
+ ieee80211_hwmp_recv_action(vap, ni, m0);
break;
/*
* Airtime link metric handling.
Modified: projects/mesh11s/sys/net80211/ieee80211_mesh.h
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_mesh.h Sat May 23 21:43:44 2009 (r192669)
+++ projects/mesh11s/sys/net80211/ieee80211_mesh.h Sat May 23 21:49:36 2009 (r192670)
@@ -332,8 +332,6 @@ uint8_t * ieee80211_add_meshid(uint8_t *
uint8_t * ieee80211_add_meshconf(uint8_t *, struct ieee80211vap *);
uint8_t * ieee80211_add_meshpeer(uint8_t *, uint8_t, uint16_t, uint16_t,
uint16_t);
-uint8_t * ieee80211_add_meshprep(uint8_t *,
- struct ieee80211_meshprep_ie *);
uint32_t ieee80211_airtime_calc(struct ieee80211vap *,
struct ieee80211_node *);
uint8_t * ieee80211_add_meshlink(uint8_t *, uint32_t);
Modified: projects/mesh11s/sys/net80211/ieee80211_output.c
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_output.c Sat May 23 21:43:44 2009 (r192669)
+++ projects/mesh11s/sys/net80211/ieee80211_output.c Sat May 23 21:49:36 2009 (r192670)
@@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
#endif
#include <net80211/ieee80211_wds.h>
#include <net80211/ieee80211_mesh.h>
+#include <net80211/ieee80211_hwmp.h>
#ifdef INET
#include <netinet/in.h>
More information about the svn-src-projects
mailing list