Bug fix: send all multicast data frames at the lowest possible data

rate, with short preamble turned *off*.  Fixes IBSS operation,
where multicast frames were sent at the highest possible rate with
short preamble turned *on*, so the likelihood of reception was
relatively low, and there was no chance for stations w/o short
preamble capability to receive the frames.

XXX This is a quick fix that I will revisit very soon.  Multicast
data frames are eligible to be sent with short preamble in
IEEE80211_M_STA, IEEE80211_M_HOSTAP modes.  An AP knows who all of
its peers are at all times, so it can make an intelligent decision.
Ditto the AP client.

XXX The rate adaptation should be involved in choosing short/long
preamble.  Also, we can make a reasonable choice of a higher
multicast data rate based on statistics gathered by the rate
adaptation module.
This commit is contained in:
dyoung 2005-07-03 19:42:10 +00:00
parent 967b5afe90
commit 3ba3e0571b

View File

@ -1,4 +1,4 @@
/* $NetBSD: ath.c,v 1.50 2005/07/03 19:31:03 dyoung Exp $ */
/* $NetBSD: ath.c,v 1.51 2005/07/03 19:42:10 dyoung Exp $ */
/*-
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@ -41,7 +41,7 @@
__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.88 2005/04/12 17:56:43 sam Exp $");
#endif
#ifdef __NetBSD__
__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.50 2005/07/03 19:31:03 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.51 2005/07/03 19:42:10 dyoung Exp $");
#endif
/*
@ -3317,7 +3317,7 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf
* negotiated parameters.
*/
if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) &&
(ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_PREAMBLE)) {
(ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_PREAMBLE) && !ismcast) {
shortPreamble = AH_TRUE;
sc->sc_stats.ast_tx_shortpre++;
} else {
@ -3374,10 +3374,18 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf
case IEEE80211_FC0_TYPE_DATA:
atype = HAL_PKT_TYPE_NORMAL; /* default */
/*
* Data frames; consult the rate control module.
* Data frames; consult the rate control module for
* unicast frames. Send multicast frames at the
* lowest rate.
*/
ath_rate_findrate(sc, an, shortPreamble, pktlen,
&rix, &try0, &txrate);
if (!ismcast) {
ath_rate_findrate(sc, an, shortPreamble, pktlen,
&rix, &try0, &txrate);
} else {
rix = 0;
try0 = ATH_TXMAXTRY;
txrate = an->an_tx_mgtrate;
}
sc->sc_txrate = txrate; /* for LED blinking */
/*
* Default all non-QoS traffic to the background queue.