From owner-p4-projects@FreeBSD.ORG Tue Nov 9 20:29:23 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7C48516A4EC; Tue, 9 Nov 2004 20:29:22 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2557516A4CF for ; Tue, 9 Nov 2004 20:29:22 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17D0D43D2D for ; Tue, 9 Nov 2004 20:29:22 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id iA9KTLaQ042645 for ; Tue, 9 Nov 2004 20:29:21 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id iA9KTLhS042642 for perforce@freebsd.org; Tue, 9 Nov 2004 20:29:21 GMT (envelope-from sam@freebsd.org) Date: Tue, 9 Nov 2004 20:29:21 GMT Message-Id: <200411092029.iA9KTLhS042642@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 64715 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2004 20:29:23 -0000 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; } }