From babe2453bd2e33368d54bf95c092fb1f90eb8c65 Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Sat, 3 Apr 2004 00:02:17 +0000 Subject: [PATCH] transmit beacon frames directly instead of defering them to a swi; there was too much delay Obtained from: madwifi --- sys/dev/ath/if_ath.c | 11 ++++++++--- sys/dev/ath/if_athvar.h | 1 - 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 6620ff91bfc..3699e51f976 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -270,7 +270,6 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) TASK_INIT(&sc->sc_txtask, 0, ath_tx_proc, sc); TASK_INIT(&sc->sc_rxtask, 0, ath_rx_proc, sc); - TASK_INIT(&sc->sc_swbatask, 0, ath_beacon_proc, sc); TASK_INIT(&sc->sc_rxorntask, 0, ath_rxorn_proc, sc); TASK_INIT(&sc->sc_fataltask, 0, ath_fatal_proc, sc); TASK_INIT(&sc->sc_bmisstask, 0, ath_bmiss_proc, sc); @@ -480,8 +479,14 @@ ath_intr(void *arg) taskqueue_enqueue(taskqueue_swi, &sc->sc_rxtask); if (status & HAL_INT_TX) taskqueue_enqueue(taskqueue_swi, &sc->sc_txtask); - if (status & HAL_INT_SWBA) - taskqueue_enqueue(taskqueue_swi, &sc->sc_swbatask); + if (status & HAL_INT_SWBA) { + /* + * Handle beacon transmission directly; deferring + * this is too slow to meet timing constraints + * under load. + */ + ath_beacon_proc(sc, 0); + } if (status & HAL_INT_BMISS) { sc->sc_stats.ast_bmiss++; taskqueue_enqueue(taskqueue_swi, &sc->sc_bmisstask); diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h index 3803dabb0eb..766163d69ef 100644 --- a/sys/dev/ath/if_athvar.h +++ b/sys/dev/ath/if_athvar.h @@ -147,7 +147,6 @@ struct ath_softc { u_int sc_bhalq; /* HAL q for outgoing beacons */ struct ath_buf *sc_bcbuf; /* beacon buffer */ struct ath_buf *sc_bufptr; /* allocated buffer ptr */ - struct task sc_swbatask; /* swba int processing */ struct task sc_bmisstask; /* bmiss int processing */ struct callout sc_cal_ch; /* callout handle for cals */