diff options
author | adrian <adrian@FreeBSD.org> | 2012-06-05 03:14:49 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2012-06-05 03:14:49 +0000 |
commit | 6dd8c2eb6c9bd0a9ceef633b7aaf5e54ac9dbaa6 (patch) | |
tree | 890ed72fca8c0e69eab7031f7eaeec3907d491ad | |
parent | d7c9a0e9e945d2b6379a08008fe1154c1f3c4e22 (diff) | |
download | FreeBSD-src-6dd8c2eb6c9bd0a9ceef633b7aaf5e54ac9dbaa6.zip FreeBSD-src-6dd8c2eb6c9bd0a9ceef633b7aaf5e54ac9dbaa6.tar.gz |
Create a function - ath_tx_kick() - which is called where ath_start() is
called to "kick" along TX.
For now, schedule a taskqueue call.
Later on I may go back to the direct call of ath_rx_tasklet() - but for
now, this will do.
I've tested UDP and TCP TX. UDP TX still achieves 240MBit, but TCP
TX gets stuck at around 100MBit or so, instead of the 150MBit it should
be at. I'll re-test with no ACPI/power/sleep states enabled at startup
and see what effect it has.
This is in preparation for supporting an if_transmit() path, which will
turn ath_tx_kick() into a NUL operation (as there won't be an ifnet
queue to service.)
Tested:
* AR9280 STA
TODO:
* test on AR5416, AR9160, AR928x STA/AP modes
PR: kern/168649
-rw-r--r-- | sys/dev/ath/if_ath.c | 12 | ||||
-rw-r--r-- | sys/dev/ath/if_ath_misc.h | 12 | ||||
-rw-r--r-- | sys/dev/ath/if_ath_rx.c | 3 |
3 files changed, 17 insertions, 10 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 62e99c6..7824666 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -142,6 +142,7 @@ static void ath_vap_delete(struct ieee80211vap *); static void ath_init(void *); static void ath_stop_locked(struct ifnet *); static void ath_stop(struct ifnet *); +static void ath_tx_tasklet(void *arg, int npending); static int ath_reset_vap(struct ieee80211vap *, u_long); static int ath_media_change(struct ifnet *); static void ath_watchdog(void *); @@ -2330,7 +2331,7 @@ ath_start(struct ifnet *ifp) taskqueue_enqueue(sc->sc_tq, &sc->sc_txstarttask); } -void +static void ath_tx_tasklet(void *arg, int npending) { struct ath_softc *sc = (struct ath_softc *) arg; @@ -3509,8 +3510,7 @@ ath_tx_proc_q0(void *arg, int npending) sc->sc_txproc_cnt--; ATH_PCU_UNLOCK(sc); - // ath_start(ifp); - ath_tx_tasklet(sc, 1); + ath_tx_kick(sc); } /* @@ -3560,8 +3560,7 @@ ath_tx_proc_q0123(void *arg, int npending) sc->sc_txproc_cnt--; ATH_PCU_UNLOCK(sc); - //ath_start(ifp); - ath_tx_tasklet(sc, 1); + ath_tx_kick(sc); } /* @@ -3604,8 +3603,7 @@ ath_tx_proc(void *arg, int npending) sc->sc_txproc_cnt--; ATH_PCU_UNLOCK(sc); - //ath_start(ifp); - ath_tx_tasklet(sc, 1); + ath_tx_kick(sc); } #undef TXQACTIVE diff --git a/sys/dev/ath/if_ath_misc.h b/sys/dev/ath/if_ath_misc.h index 93ca161..7b6c932 100644 --- a/sys/dev/ath/if_ath_misc.h +++ b/sys/dev/ath/if_ath_misc.h @@ -83,7 +83,17 @@ extern void ath_setslottime(struct ath_softc *sc); * we can kill this. */ extern void ath_start(struct ifnet *ifp); -extern void ath_tx_tasklet(void *arg, int npending); +static inline void +ath_tx_kick(struct ath_softc *sc) +{ + + /* + * Use a taskqueue to schedule a TX completion task, + * even if we're in taskqueue context. That way this can + * be called from any context. + */ + taskqueue_enqueue(sc->sc_tq, &sc->sc_txstarttask); +} #endif diff --git a/sys/dev/ath/if_ath_rx.c b/sys/dev/ath/if_ath_rx.c index 58664b7..49901b4 100644 --- a/sys/dev/ath/if_ath_rx.c +++ b/sys/dev/ath/if_ath_rx.c @@ -899,8 +899,7 @@ rx_proc_next: ieee80211_ff_age_all(ic, 100); #endif if (!IFQ_IS_EMPTY(&ifp->if_snd)) - ath_tx_tasklet(sc, 1); - //ath_start(ifp); + ath_tx_kick(sc); } #undef PA2DESC |