From ab46b5e00527e3f843f5ae91684b08fc83f0bf1b Mon Sep 17 00:00:00 2001 From: Damien Bergamini Date: Tue, 17 Nov 2009 18:01:41 +0000 Subject: add short interframe space to duration since the athn_txtime function does not take it into account. oops. --- sys/dev/ic/athn.c | 6 ++++-- sys/dev/ic/athnvar.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'sys/dev/ic') diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c index 6dee200f684..9276cadc570 100644 --- a/sys/dev/ic/athn.c +++ b/sys/dev/ic/athn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: athn.c,v 1.5 2009/11/16 17:09:31 damien Exp $ */ +/* $OpenBSD: athn.c,v 1.6 2009/11/17 18:01:40 damien Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini @@ -1372,6 +1372,8 @@ athn_set_phy(struct athn_softc *sc, struct ieee80211_channel *c, AR_WRITE(sc, AR_GTXTO, SM(AR_GTXTO_TIMEOUT_LIMIT, 25)); AR_WRITE(sc, AR_CST, SM(AR_CST_TIMEOUT_LIMIT, 15)); + /* Set Short Interframe Space. */ + sc->sifs = IEEE80211_IS_CHAN_5GHZ(c) ? 16 : 10; } int @@ -3481,7 +3483,7 @@ athn_tx(struct athn_softc *sc, struct mbuf *m, struct ieee80211_node *ni) /* Compute duration for each series. */ for (i = 0; i < 4; i++) { series[i].dur = athn_txtime(sc, IEEE80211_ACK_LEN, - ridx[i], ic->ic_flags); + ridx[i], ic->ic_flags) + sc->sifs; } } diff --git a/sys/dev/ic/athnvar.h b/sys/dev/ic/athnvar.h index c5ec813e00e..f568fe49c42 100644 --- a/sys/dev/ic/athnvar.h +++ b/sys/dev/ic/athnvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: athnvar.h,v 1.2 2009/11/15 14:04:02 damien Exp $ */ +/* $OpenBSD: athnvar.h,v 1.3 2009/11/17 18:01:40 damien Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini @@ -428,6 +428,7 @@ struct athn_softc { struct athn_ops ops; int fixed_ridx; + int sifs; int16_t def_nf; struct { -- cgit v1.2.3