PERFORCE change 90997 for review
Sam Leffler
sam at FreeBSD.org
Fri Feb 3 13:34:15 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=90997
Change 90997 by sam at 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);
More information about the p4-projects
mailing list