svn commit: r193095 - projects/mesh11s/sys/net80211

Rui Paulo rpaulo at FreeBSD.org
Sat May 30 15:07:48 UTC 2009


Author: rpaulo
Date: Sat May 30 15:07:47 2009
New Revision: 193095
URL: http://svn.freebsd.org/changeset/base/193095

Log:
  * add proper handling for the header of a mesh frame.
  * remove code that was moved to the hwmp module
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/mesh11s/sys/net80211/ieee80211_output.c

Modified: projects/mesh11s/sys/net80211/ieee80211_output.c
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_output.c	Sat May 30 14:59:08 2009	(r193094)
+++ projects/mesh11s/sys/net80211/ieee80211_output.c	Sat May 30 15:07:47 2009	(r193095)
@@ -494,13 +494,28 @@ ieee80211_send_setup(
 			IEEE80211_ADDR_COPY(wh->i_addr3, sa);
 			break;
 		case IEEE80211_M_WDS:
-		case IEEE80211_M_MBSS:	/* XXX confirm */
 			wh->i_fc[1] = IEEE80211_FC1_DIR_DSTODS;
 			IEEE80211_ADDR_COPY(wh->i_addr1, da);
 			IEEE80211_ADDR_COPY(wh->i_addr2, vap->iv_myaddr);
 			IEEE80211_ADDR_COPY(wh->i_addr3, da);
 			IEEE80211_ADDR_COPY(WH4(wh)->i_addr4, sa);
 			break;
+		case IEEE80211_M_MBSS:
+			/* XXX add support for proxied addresses */
+			if (IEEE80211_IS_MULTICAST(wh->i_addr1)) {
+				wh->i_fc[1] = IEEE80211_FC1_DIR_FROMDS;
+				/* XXX next hop */
+				IEEE80211_ADDR_COPY(wh->i_addr1, da);
+				IEEE80211_ADDR_COPY(wh->i_addr2,
+				    vap->iv_myaddr);
+			} else {
+				wh->i_fc[1] = IEEE80211_FC1_DIR_DSTODS;
+				IEEE80211_ADDR_COPY(wh->i_addr2,
+				    vap->iv_myaddr);
+				IEEE80211_ADDR_COPY(wh->i_addr3, da);
+				IEEE80211_ADDR_COPY(WH4(wh)->i_addr4, sa);
+			}
+			break;
 		case IEEE80211_M_MONITOR:	/* NB: to quiet compiler */
 			break;
 		}
@@ -577,20 +592,6 @@ ieee80211_send_action(struct ieee80211_n
 			+ sizeof(struct ieee80211_meshconf_ie)
 			+ sizeof(struct ieee80211_meshpeer_ie);
 		break;
-	case IEEE80211_ACTION_CAT_MESHPATH:
-		switch (action) {
-		case IEEE80211_ACTION_MESHPATH_REQ:
-			/* XXX more than one destination */
-			addsize = sizeof(struct ieee80211_meshpreq_ie);
-			break;
-		case IEEE80211_ACTION_MESHPATH_REP:
-			addsize = sizeof(struct ieee80211_meshprep_ie);
-			break;
-		case IEEE80211_ACTION_MESHPATH_ERR:
-			addsize = sizeof(struct ieee80211_meshperr_ie);
-			break;
-		}
-		break;
 	}
 	m = ieee80211_getmgtframe(&frm,
 		ic->ic_headroom + sizeof(struct ieee80211_frame),
@@ -781,39 +782,6 @@ ieee80211_send_action(struct ieee80211_n
 		}
 		}
 		break;
-	case IEEE80211_ACTION_CAT_MESHPATH:
-		switch (action) {
-		/*
-		 * mesh path request action frame format:
-		 *   [1] action
-		 *   [1] category
-		 *   [tlv] mesh path request
-		 */
-		case IEEE80211_ACTION_MESHPATH_REQ:
-			break;
-		/*
-		 * mesh path reply action frame format:
-		 *   [1] action
-		 *   [1] category
-		 *   [tlv] mesh path reply
-		 */
-		case IEEE80211_ACTION_MESHPATH_REP:
-		{
-			struct ieee80211_meshprep_ie *prep;
-
-			prep = vargs.ptrarg;
-			IEEE80211_NOTE(vap,
-			    IEEE80211_MSG_ACTION | IEEE80211_MSG_MESH, ni,
-			    "send PATH REPLY action: flags 0x%x, "
-			    "hopcount 0x%x, ttl 0x%x, "
-			    "seq 0x%x, lifetime 0x%x", prep->prep_flags,
-			    prep->prep_hopcount, prep->prep_ttl,
-			    prep->prep_targetseq, prep->prep_lifetime);
-			frm = ieee80211_add_meshprep(frm, prep);
-			break;	
-		}
-		}
-		break;
 	default:
 	badaction:
 		IEEE80211_NOTE(vap,


More information about the svn-src-projects mailing list