Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Dec 2005 05:19:19 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 87684 for review
Message-ID:  <200512030519.jB35JJB1016727@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=87684

Change 87684 by sam@sam_ebb on 2005/12/03 05:18:19

	ahdemo mode fixups:
	o set bssid on create, default to all zero's
	o setup discovered neighbors to have wme+ff's as locally
	  configured; in particular enabling wme use lets us create
	  ack-free networks trivially

Affected files ...

.. //depot/projects/wifi/sys/net80211/ieee80211_node.c#71 edit

Differences ...

==== //depot/projects/wifi/sys/net80211/ieee80211_node.c#71 (text+ko) ====

@@ -279,6 +279,11 @@
 			IEEE80211_ADDR_COPY(ni->ni_bssid, ic->ic_des_bssid);
 		else
 			ni->ni_bssid[0] |= 0x02;	/* local bit for IBSS */
+	} else if (ic->ic_opmode == IEEE80211_M_AHDEMO) {
+		if (ic->ic_flags & IEEE80211_F_DESBSSID)
+			IEEE80211_ADDR_COPY(ni->ni_bssid, ic->ic_des_bssid);
+		else
+			memset(ni->ni_bssid, 0, IEEE80211_ADDR_LEN);
 	}
 	/* 
 	 * Fix the channel and related attributes.
@@ -898,6 +903,19 @@
 		ni->ni_rates = ic->ic_bss->ni_rates;
 		if (ic->ic_newassoc != NULL)
 			ic->ic_newassoc(ni, 1);
+		if (ic->ic_opmode == IEEE80211_M_AHDEMO) {
+			/*
+			 * In adhoc demo mode there are no management
+			 * frames to use to discover neighbor capabilities,
+			 * so blindly propagate the local configuration 
+			 * so we can do interesting things (e.g. use
+			 * WME to disable ACK's).
+			 */
+			if (ic->ic_flags & IEEE80211_F_WME)
+				ni->ni_flags |= IEEE80211_NODE_QOS;
+			if (ic->ic_flags & IEEE80211_F_FF)
+				ni->ni_flags |= IEEE80211_NODE_FF;
+		}
 		/* XXX not right for 802.1x/WPA */
 		ieee80211_node_authorize(ni);
 	}



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