Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Nov 2004 20:29:21 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 64715 for review
Message-ID:  <200411092029.iA9KTLhS042642@repoman.freebsd.org>

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

Change 64715 by sam@sam_ebb on 2004/11/09 20:28:57

	add ibss merge; still need to fix beacons

Affected files ...

.. //depot/projects/wifi/sys/dev/ath/if_ath.c#14 edit

Differences ...

==== //depot/projects/wifi/sys/dev/ath/if_ath.c#14 (text+ko) ====

@@ -2200,6 +2200,23 @@
 		ATH_RSSI_LPF(ATH_NODE(ni)->an_halstats.ns_avgbrssi, rssi);
 		/* fall thru... */
 	case IEEE80211_FC0_SUBTYPE_PROBE_RESP:
+		if (ic->ic_opmode == IEEE80211_M_IBSS &&
+		    ic->ic_state == IEEE80211_S_RUN) {
+			struct ath_hal *ah = sc->sc_ah;
+			/* XXX extend rstamp */
+			u_int64_t tsf = ath_hal_gettsf64(ah);
+
+			/*
+			 * Handle ibss merge as needed; check the tsf on the
+			 * frame before attempting the merge.  The 802.11 spec
+			 * says the station should change it's bssid to match
+			 * the oldest station with the same ssid, where oldest
+			 * is determined by the tsf.
+			 */
+			if (le64toh(ni->ni_tstamp.tsf) >= tsf &&
+			    ieee80211_ibss_merge(ic, ni))
+				ath_hal_setassocid(ah, ic->ic_bss->ni_bssid, 0);
+		}
 		break;
 	}
 }



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