From owner-p4-projects@FreeBSD.ORG Fri Feb 3 21:34:15 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 174E916A423; Fri, 3 Feb 2006 21:34:15 +0000 (GMT) X-Original-To: perforce@freebsd.org 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 E133316A420 for ; Fri, 3 Feb 2006 21:34:14 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A30F443D45 for ; Fri, 3 Feb 2006 21:34:14 +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 k13LYESq041279 for ; Fri, 3 Feb 2006 21:34:14 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k13LYEIt041276 for perforce@freebsd.org; Fri, 3 Feb 2006 21:34:14 GMT (envelope-from sam@freebsd.org) Date: Fri, 3 Feb 2006 21:34:14 GMT Message-Id: <200602032134.k13LYEIt041276@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 Cc: Subject: PERFORCE change 90997 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2006 21:34:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=90997 Change 90997 by sam@sam_ebb on 2006/02/03 21:33:30 two fixes from atheros: o channel powers are in 1/2 not 1/4 dbm units o when joining an ibss/bss defer beacon timer setup until a recent beacon has been received; otherwise nexttbtt may be misprogrammed using a value too far out of date Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#124 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#124 (text+ko) ==== @@ -5010,7 +5010,17 @@ error = ath_beacon_alloc(sc, ni); if (error != 0) goto bad; - ath_beacon_config(sc); + /* + * If joining an adhoc network defer beacon timer + * configuration to the next beacon frame so we + * have a current TSF to use. Otherwise we're + * starting an ibss/bss so there's no need to delay. + */ + if (ic->ic_opmode == IEEE80211_M_IBSS && + ic->ic_bss->ni_tstamp.tsf != 0) + sc->sc_syncbeacon = 1; + else + ath_beacon_config(sc); break; case IEEE80211_M_STA: /* @@ -5020,7 +5030,12 @@ sc->sc_hasclrkey && ni->ni_ucastkey.wk_keyix == IEEE80211_KEYIX_NONE) ath_setup_stationkey(ni); - ath_beacon_config(sc); + /* + * Defer beacon timer configuration to the next + * beacon frame so we have a current TSF to use + * (any TSF collected when scanning is likely old). + */ + sc->sc_syncbeacon = 1; break; default: break; @@ -5148,8 +5163,8 @@ ichan->ic_freq = c->channel; ichan->ic_flags = c->channelFlags; ichan->ic_maxregpower = c->maxRegTxPower; /* dBm */ - ichan->ic_maxpower = c->maxTxPower / 4; /* 1/4 dBm */ - ichan->ic_minpower = c->minTxPower / 4; /* 1/4 dBm */ + ichan->ic_maxpower = c->maxTxPower / 2; /* 1/2 dBm */ + ichan->ic_minpower = c->minTxPower / 2; /* 1/2 dBm */ } ic->ic_nchans = nchan; free(chans, M_TEMP);