Date: Fri, 3 Feb 2006 21:34:14 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 90997 for review Message-ID: <200602032134.k13LYEIt041276@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602032134.k13LYEIt041276>