diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2010-04-12 18:02:32 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2010-04-12 18:02:32 +0000 |
commit | 8baae7603e7d55899c1d962cc06e31e2d0358356 (patch) | |
tree | 9a0f242767576c6489587509a04f130a646b6f69 /sys/dev | |
parent | b21be0a881207d66328a4b1fb9e42175809eae01 (diff) |
Make hardware generate 802.11 sequence numbers (except for unicast
QoS data frames) such that the same counter is used for beacons,
management frames and non-QoS data frames.
This will help clients that don't like jumps in sequence numbers,
like the FreeBSD duplicate detection code.
Found after an interesting discussion with Yao Zhao.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/rt2860.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ic/rt2860.c b/sys/dev/ic/rt2860.c index c1c2399feff..ab0a4e2a9c6 100644 --- a/sys/dev/ic/rt2860.c +++ b/sys/dev/ic/rt2860.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2860.c,v 1.50 2010/04/10 07:57:21 damien Exp $ */ +/* $OpenBSD: rt2860.c,v 1.51 2010/04/12 18:02:31 damien Exp $ */ /*- * Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr> @@ -1461,7 +1461,8 @@ rt2860_tx(struct rt2860_softc *sc, struct mbuf *m, struct ieee80211_node *ni) /* setup TX Wireless Information */ txwi = data->txwi; txwi->flags = 0; - txwi->xflags = 0; + /* let HW generate seq numbers for non-QoS frames */ + txwi->xflags = hasqos ? 0 : RT2860_TX_NSEQ; txwi->wcid = (type == IEEE80211_FC0_TYPE_DATA) ? RT2860_AID2WCID(ni->ni_associd) : 0xff; txwi->len = htole16(m->m_pkthdr.len); @@ -3708,6 +3709,7 @@ rt2860_setup_beacon(struct rt2860_softc *sc) txwi.phy |= htole16(RT2860_PHY_OFDM); txwi.txop = RT2860_TX_TXOP_HT; txwi.flags = RT2860_TX_TS; + txwi.xflags = RT2860_TX_NSEQ; RAL_WRITE_REGION_1(sc, RT2860_BCN_BASE(0), (uint8_t *)&txwi, sizeof txwi); |