svn commit: r188468 - in projects/vap7/sys: . contrib/pf dev
dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210
dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212
dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54...
Sam Leffler
sam at FreeBSD.org
Tue Feb 10 15:55:24 PST 2009
Author: sam
Date: Tue Feb 10 23:55:23 2009
New Revision: 188468
URL: http://svn.freebsd.org/changeset/base/188468
Log:
merge r188465: don't do phantom beacon miss checking for s/w bmiss handling
Modified:
projects/vap7/sys/ (props changed)
projects/vap7/sys/contrib/pf/ (props changed)
projects/vap7/sys/dev/ (props changed)
projects/vap7/sys/dev/ath/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ah_regdomain.c
projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed)
projects/vap7/sys/dev/ath/if_ath.c
projects/vap7/sys/dev/cxgb/ (props changed)
projects/vap7/sys/dev/usb2/ (props changed)
projects/vap7/sys/i386/conf/USB2 (props changed)
projects/vap7/sys/modules/usb2/ (props changed)
projects/vap7/sys/net80211/ (props changed)
projects/vap7/sys/net80211/ieee80211_adhoc.c
projects/vap7/sys/net80211/ieee80211_tdma.c
Modified: projects/vap7/sys/dev/ath/ath_hal/ah_regdomain.c
==============================================================================
--- projects/vap7/sys/dev/ath/ath_hal/ah_regdomain.c Tue Feb 10 23:52:28 2009 (r188467)
+++ projects/vap7/sys/dev/ath/ath_hal/ah_regdomain.c Tue Feb 10 23:55:23 2009 (r188468)
@@ -786,8 +786,10 @@ static REG_DMN_FREQ_BAND regDmn5GhzFreq[
* 5GHz Turbo (dynamic & static) tags
*/
static REG_DMN_FREQ_BAND regDmn5GhzTurboFreq[] = {
+ { 4950, 4980, 30, 6, 40, 40, NO_DFS, PSCAN_FCC },
+#define T1_4950_4980 0
{ 5130, 5210, 5, 6, 40, 40, NO_DFS, NO_PSCAN },
-#define T1_5130_5210 0
+#define T1_5130_5210 AFTER(T1_4950_4980)
{ 5250, 5330, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN },
#define T1_5250_5330 AFTER(T1_5130_5210)
{ 5370, 5490, 5, 6, 40, 40, NO_DFS, NO_PSCAN },
@@ -1043,7 +1045,8 @@ static REG_DOMAIN regDomains[] = {
F3_5120_5240,
F3_5260_5700,
F8_5745_5825),
- .chan11a_turbo = BM8(T1_5130_5210,
+ .chan11a_turbo = BM9(T1_4950_4980,
+ T1_5130_5210,
T1_5250_5330,
T1_5370_5490,
T1_5530_5650,
Modified: projects/vap7/sys/dev/ath/if_ath.c
==============================================================================
--- projects/vap7/sys/dev/ath/if_ath.c Tue Feb 10 23:52:28 2009 (r188467)
+++ projects/vap7/sys/dev/ath/if_ath.c Tue Feb 10 23:55:23 2009 (r188468)
@@ -1372,29 +1372,34 @@ ath_fatal_proc(void *arg, int pending)
static void
ath_bmiss_vap(struct ieee80211vap *vap)
{
- struct ifnet *ifp = vap->iv_ic->ic_ifp;
- struct ath_softc *sc = ifp->if_softc;
- u_int64_t lastrx = sc->sc_lastrx;
- u_int64_t tsf = ath_hal_gettsf64(sc->sc_ah);
- u_int bmisstimeout =
- vap->iv_bmissthreshold * vap->iv_bss->ni_intval * 1024;
-
- DPRINTF(sc, ATH_DEBUG_BEACON,
- "%s: tsf %llu lastrx %lld (%llu) bmiss %u\n",
- __func__, (unsigned long long) tsf,
- (unsigned long long)(tsf - lastrx),
- (unsigned long long) lastrx, bmisstimeout);
/*
* Workaround phantom bmiss interrupts by sanity-checking
* the time of our last rx'd frame. If it is within the
* beacon miss interval then ignore the interrupt. If it's
* truly a bmiss we'll get another interrupt soon and that'll
- * be dispatched up for processing.
+ * be dispatched up for processing. Note this applies only
+ * for h/w beacon miss events.
*/
- if (tsf - lastrx > bmisstimeout)
- ATH_VAP(vap)->av_bmiss(vap);
- else
- sc->sc_stats.ast_bmiss_phantom++;
+ if ((vap->iv_flags_ext & IEEE80211_FEXT_SWBMISS) == 0) {
+ struct ifnet *ifp = vap->iv_ic->ic_ifp;
+ struct ath_softc *sc = ifp->if_softc;
+ u_int64_t lastrx = sc->sc_lastrx;
+ u_int64_t tsf = ath_hal_gettsf64(sc->sc_ah);
+ u_int bmisstimeout =
+ vap->iv_bmissthreshold * vap->iv_bss->ni_intval * 1024;
+
+ DPRINTF(sc, ATH_DEBUG_BEACON,
+ "%s: tsf %llu lastrx %lld (%llu) bmiss %u\n",
+ __func__, (unsigned long long) tsf,
+ (unsigned long long)(tsf - lastrx),
+ (unsigned long long) lastrx, bmisstimeout);
+
+ if (tsf - lastrx <= bmisstimeout) {
+ sc->sc_stats.ast_bmiss_phantom++;
+ return;
+ }
+ }
+ ATH_VAP(vap)->av_bmiss(vap);
}
static int
Modified: projects/vap7/sys/net80211/ieee80211_adhoc.c
==============================================================================
--- projects/vap7/sys/net80211/ieee80211_adhoc.c Tue Feb 10 23:52:28 2009 (r188467)
+++ projects/vap7/sys/net80211/ieee80211_adhoc.c Tue Feb 10 23:55:23 2009 (r188468)
@@ -110,6 +110,15 @@ adhoc_vattach(struct ieee80211vap *vap)
#endif
}
+static void
+sta_leave(void *arg, struct ieee80211_node *ni)
+{
+ struct ieee80211vap *vap = arg;
+
+ if (ni->ni_vap == vap && ni != vap->iv_bss)
+ ieee80211_node_leave(ni);
+}
+
/*
* IEEE80211_M_IBSS+IEEE80211_M_AHDEMO vap state machine handler.
*/
@@ -146,8 +155,11 @@ adhoc_newstate(struct ieee80211vap *vap,
break;
case IEEE80211_S_SCAN:
switch (ostate) {
- case IEEE80211_S_INIT:
case IEEE80211_S_RUN: /* beacon miss */
+ /* purge station table; entries are stale */
+ ieee80211_iterate_nodes(&ic->ic_sta, sta_leave, vap);
+ /* fall thru... */
+ case IEEE80211_S_INIT:
if (vap->iv_des_chan != IEEE80211_CHAN_ANYC &&
!IEEE80211_IS_CHAN_RADAR(vap->iv_des_chan)) {
/*
Modified: projects/vap7/sys/net80211/ieee80211_tdma.c
==============================================================================
--- projects/vap7/sys/net80211/ieee80211_tdma.c Tue Feb 10 23:52:28 2009 (r188467)
+++ projects/vap7/sys/net80211/ieee80211_tdma.c Tue Feb 10 23:55:23 2009 (r188468)
@@ -173,6 +173,15 @@ tdma_vdetach(struct ieee80211vap *vap)
setackpolicy(vap->iv_ic, 0); /* enable ACK's */
}
+static void
+sta_leave(void *arg, struct ieee80211_node *ni)
+{
+ struct ieee80211vap *vap = arg;
+
+ if (ni->ni_vap == vap && ni != vap->iv_bss)
+ ieee80211_node_leave(ni);
+}
+
/*
* TDMA state machine handler.
*/
@@ -180,10 +189,11 @@ static int
tdma_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
{
struct ieee80211_tdma_state *ts = vap->iv_tdma;
+ struct ieee80211com *ic = vap->iv_ic;
enum ieee80211_state ostate;
int status;
- IEEE80211_LOCK_ASSERT(vap->iv_ic);
+ IEEE80211_LOCK_ASSERT(ic);
ostate = vap->iv_state;
IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, "%s: %s -> %s (%d)\n",
@@ -201,6 +211,11 @@ tdma_newstate(struct ieee80211vap *vap,
*/
vap->iv_state = nstate; /* state transition */
ieee80211_cancel_scan(vap); /* background scan */
+ if (ostate == IEEE80211_S_RUN) {
+ /* purge station table; entries are stale */
+ ieee80211_iterate_nodes(&ic->ic_sta, sta_leave, vap);
+ ieee80211_free_node(vap->iv_bss); /* XXX */
+ }
if (vap->iv_flags_ext & IEEE80211_FEXT_SCANREQ) {
ieee80211_check_scan(vap,
vap->iv_scanreq_flags,
@@ -326,7 +341,6 @@ tdma_recv_mgmt(struct ieee80211_node *ni
* Count beacon frame for s/w bmiss handling.
*/
vap->iv_swbmiss_count++;
- vap->iv_bmiss_count = 0;
/*
* Process tdma ie. The contents are used to sync
* the slot timing, reconfigure the bss, etc.
More information about the svn-src-projects
mailing list