diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2006-12-17 16:24:01 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2006-12-17 16:24:01 +0000 |
commit | 6083f9277517b6ab275011110788a080c535a98e (patch) | |
tree | 6c98638b0aabb5edd2692a3b162e1c777b7588d5 /sys/dev/ic/rt2661.c | |
parent | f37d64c3d21f9f09f39d98e43efa0a30b487fa96 (diff) |
fix index of ERP information element in beacons.
still ugly, but correct.
Diffstat (limited to 'sys/dev/ic/rt2661.c')
-rw-r--r-- | sys/dev/ic/rt2661.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c index 49a571e2dba..ca383414cf8 100644 --- a/sys/dev/ic/rt2661.c +++ b/sys/dev/ic/rt2661.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2661.c,v 1.33 2006/12/03 16:39:13 damien Exp $ */ +/* $OpenBSD: rt2661.c,v 1.34 2006/12/17 16:24:00 damien Exp $ */ /*- * Copyright (c) 2006 @@ -2828,10 +2828,12 @@ rt2661_prepare_beacon(struct rt2661_softc *sc) sc->erp_csr = RT2661_HW_BEACON_BASE0 + 24 + sizeof (struct ieee80211_frame) + - 8 + 2 + 2 + 2 + ni->ni_esslen + 2 + 1 + - ((ic->ic_opmode == IEEE80211_M_IBSS) ? 3 : 6) + - 2 + ni->ni_rates.rs_nrates + - ((ni->ni_rates.rs_nrates > IEEE80211_RATE_SIZE) ? 2 : 0) + + 8 + 2 + 2 + + ((ic->ic_flags & IEEE80211_F_HIDENWID) ? + 1 : 2 + ni->ni_esslen) + + 2 + min(ni->ni_rates.rs_nrates, IEEE80211_RATE_SIZE) + + 2 + 1 + + ((ic->ic_opmode == IEEE80211_M_IBSS) ? 4 : 6) + 2; } |