From 6083f9277517b6ab275011110788a080c535a98e Mon Sep 17 00:00:00 2001 From: Damien Bergamini Date: Sun, 17 Dec 2006 16:24:01 +0000 Subject: fix index of ERP information element in beacons. still ugly, but correct. --- sys/dev/ic/rt2560.c | 12 +++++++----- sys/dev/ic/rt2661.c | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) (limited to 'sys/dev/ic') diff --git a/sys/dev/ic/rt2560.c b/sys/dev/ic/rt2560.c index 30fa917b646..c5d327643e0 100644 --- a/sys/dev/ic/rt2560.c +++ b/sys/dev/ic/rt2560.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2560.c,v 1.28 2006/12/03 16:39:13 damien Exp $ */ +/* $OpenBSD: rt2560.c,v 1.29 2006/12/17 16:24:00 damien Exp $ */ /*- * Copyright (c) 2005, 2006 @@ -1581,10 +1581,12 @@ rt2560_tx_bcn(struct rt2560_softc *sc, struct mbuf *m0, sc->erp = mtod(m0, uint8_t *) + 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; } 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; } -- cgit v1.2.3