summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2009-11-17 18:01:41 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2009-11-17 18:01:41 +0000
commitab46b5e00527e3f843f5ae91684b08fc83f0bf1b (patch)
tree13751777413828406fe79de568454391850bfcd6 /sys/dev/ic
parent04a1ebc811fb1573d2c1246c527af4793eabd4fe (diff)
add short interframe space to duration since the athn_txtime
function does not take it into account. oops.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/athn.c6
-rw-r--r--sys/dev/ic/athnvar.h3
2 files changed, 6 insertions, 3 deletions
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 <damien.bergamini@free.fr>
@@ -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 <damien.bergamini@free.fr>
@@ -428,6 +428,7 @@ struct athn_softc {
struct athn_ops ops;
int fixed_ridx;
+ int sifs;
int16_t def_nf;
struct {