From owner-p4-projects@FreeBSD.ORG Wed Jan 12 03:53:29 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 99B4C16A4D0; Wed, 12 Jan 2005 03:53:29 +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 6E74D16A4CE for ; Wed, 12 Jan 2005 03:53:29 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55CB143D45 for ; Wed, 12 Jan 2005 03:53:29 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j0C3rT2T031160 for ; Wed, 12 Jan 2005 03:53:29 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j0C3rT8V031157 for perforce@freebsd.org; Wed, 12 Jan 2005 03:53:29 GMT (envelope-from sam@freebsd.org) Date: Wed, 12 Jan 2005 03:53:29 GMT Message-Id: <200501120353.j0C3rT8V031157@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 68799 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: Wed, 12 Jan 2005 03:53:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=68799 Change 68799 by sam@sam_ebb on 2005/01/12 03:53:12 cleanup ibss merge handling: we don't need to do anything specifically to reprogram the beacon timers, it all happens automatically when the state machine is clocked; just move the call to stop tx dma on the beacon queue to the right place Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#66 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#66 (text+ko) ==== @@ -2795,21 +2795,13 @@ * 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. + * is determined by the tsf. Note that hardware + * reconfiguration happens through callback to + * ath_newstate as the state machine will be go + * from RUN -> RUN when this happens. */ - if (le64toh(ni->ni_tstamp.tsf) >= tsf && - ieee80211_ibss_merge(ic, ni)) { - /* - * XXX rather than handle this here it's - * probably better to do it at the 802.11 - * layer through the state machine so, - * we can switch channel, etc. - */ - /* XXX adopt beacon interval and ATIM window */ - ath_hal_setassocid(ah, ic->ic_bss->ni_bssid, 0); - ath_hal_stoptxdma(ah, sc->sc_bhalq); - ath_beacon_config(sc); - } + if (le64toh(ni->ni_tstamp.tsf) >= tsf) + (void) ieee80211_ibss_merge(ic, ni); } break; } @@ -4338,6 +4330,14 @@ */ if (ic->ic_opmode == IEEE80211_M_HOSTAP || ic->ic_opmode == IEEE80211_M_IBSS) { + /* + * Stop any previous beacon DMA. This may be + * necessary, for example, when an ibss merge + * causes reconfiguration; there will be a state + * transition from RUN->RUN that means we may + * be called with beacon transmission active. + */ + ath_hal_stoptxdma(ah, sc->sc_bhalq); error = ath_beacon_alloc(sc, ni); if (error != 0) goto bad;