aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2005-07-22 16:50:18 +0000
committerSam Leffler <sam@FreeBSD.org>2005-07-22 16:50:18 +0000
commit2c39b32c9439c191bdc67411f3fee3e77e82fe32 (patch)
treefca8cfc4073f63287b1f51121bcf1c74ccdcdeb7 /sys/dev
parentaf8d224ec0cda6ccf38f94f508afcea6065d0aeb (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ath/ath_rate/amrr/amrr.c5
-rw-r--r--sys/dev/ath/ath_rate/onoe/onoe.c5
-rw-r--r--sys/dev/ath/ath_rate/sample/sample.c2
-rw-r--r--sys/dev/awi/awi.c4
-rw-r--r--sys/dev/ral/if_ral.c4
-rw-r--r--sys/dev/usb/if_ural.c2
-rw-r--r--sys/dev/wi/if_wi.c4
7 files changed, 14 insertions, 12 deletions
diff --git a/sys/dev/ath/ath_rate/amrr/amrr.c b/sys/dev/ath/ath_rate/amrr/amrr.c
index 5955e48c98af3..257a7377b1173 100644
--- a/sys/dev/ath/ath_rate/amrr/amrr.c
+++ b/sys/dev/ath/ath_rate/amrr/amrr.c
@@ -284,7 +284,7 @@ ath_rate_ctl_start(struct ath_softc *sc, struct ieee80211_node *ni)
int srate;
KASSERT(ni->ni_rates.rs_nrates > 0, ("no rates"));
- if (ic->ic_fixed_rate == -1) {
+ if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE) {
/*
* No fixed rate is requested. For 11b start with
* the highest negotiated rate; otherwise, for 11g
@@ -366,7 +366,8 @@ ath_rate_newstate(struct ath_softc *sc, enum ieee80211_state state)
ieee80211_iterate_nodes(&ic->ic_sta, ath_rate_cb, sc);
ath_rate_update(sc, ic->ic_bss, 0);
}
- if (ic->ic_fixed_rate == -1 && state == IEEE80211_S_RUN) {
+ if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE &&
+ state == IEEE80211_S_RUN) {
int interval;
/*
* Start the background rate control thread if we
diff --git a/sys/dev/ath/ath_rate/onoe/onoe.c b/sys/dev/ath/ath_rate/onoe/onoe.c
index a4f0094f8780c..ac0eac7afb429 100644
--- a/sys/dev/ath/ath_rate/onoe/onoe.c
+++ b/sys/dev/ath/ath_rate/onoe/onoe.c
@@ -268,7 +268,7 @@ ath_rate_ctl_start(struct ath_softc *sc, struct ieee80211_node *ni)
int srate;
KASSERT(ni->ni_rates.rs_nrates > 0, ("no rates"));
- if (ic->ic_fixed_rate == -1) {
+ if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE) {
/*
* No fixed rate is requested. For 11b start with
* the highest negotiated rate; otherwise, for 11g
@@ -350,7 +350,8 @@ ath_rate_newstate(struct ath_softc *sc, enum ieee80211_state state)
ieee80211_iterate_nodes(&ic->ic_sta, ath_rate_cb, sc);
ath_rate_update(sc, ic->ic_bss, 0);
}
- if (ic->ic_fixed_rate == -1 && state == IEEE80211_S_RUN) {
+ if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE &&
+ state == IEEE80211_S_RUN) {
int interval;
/*
* Start the background rate control thread if we
diff --git a/sys/dev/ath/ath_rate/sample/sample.c b/sys/dev/ath/ath_rate/sample/sample.c
index fd88101d0f78e..7acdc5cfe447f 100644
--- a/sys/dev/ath/ath_rate/sample/sample.c
+++ b/sys/dev/ath/ath_rate/sample/sample.c
@@ -684,7 +684,7 @@ ath_rate_ctl_reset(struct ath_softc *sc, struct ieee80211_node *ni)
KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
sn->static_rate_ndx = -1;
- if (ic->ic_fixed_rate != -1) {
+ if (ic->ic_fixed_rate != IEEE80211_FIXED_RATE_NONE) {
/*
* A fixed rate is to be used; ic_fixed_rate is an
* index into the supported rate set. Convert this
diff --git a/sys/dev/awi/awi.c b/sys/dev/awi/awi.c
index 032599501df31..4c0ffc2617733 100644
--- a/sys/dev/awi/awi.c
+++ b/sys/dev/awi/awi.c
@@ -605,7 +605,7 @@ awi_init(struct ifnet *ifp)
rs = &ic->ic_sup_rates[IEEE80211_MODE_FH];
else
rs = &ic->ic_sup_rates[IEEE80211_MODE_11B];
- if (ic->ic_fixed_rate != -1) {
+ if (ic->ic_fixed_rate != IEEE80211_FIXED_RATE_NONE) {
rate = rs->rs_rates[ic->ic_fixed_rate] & IEEE80211_RATE_VAL;
} else {
rate = 0;
@@ -1095,7 +1095,7 @@ awi_media_status(struct ifnet *ifp, struct ifmediareq *imr)
rate = ic->ic_bss->ni_rates.rs_rates[ic->ic_bss->ni_txrate] &
IEEE80211_RATE_VAL;
} else {
- if (ic->ic_fixed_rate == -1)
+ if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE)
rate = 0;
else
rate = ic->ic_sup_rates[mode].
diff --git a/sys/dev/ral/if_ral.c b/sys/dev/ral/if_ral.c
index 11a2ea194ce33..429233ab7ef28 100644
--- a/sys/dev/ral/if_ral.c
+++ b/sys/dev/ral/if_ral.c
@@ -1875,7 +1875,7 @@ ral_tx_data(struct ral_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
wh = mtod(m0, struct ieee80211_frame *);
- if (ic->ic_fixed_rate != -1) {
+ if (ic->ic_fixed_rate != IEEE80211_FIXED_RATE_NONE) {
rs = &ic->ic_sup_rates[ic->ic_curmode];
rate = rs->rs_rates[ic->ic_fixed_rate];
} else {
@@ -2009,7 +2009,7 @@ ral_tx_data(struct ral_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
data->ni = ni;
/* remember link conditions for rate adaptation algorithm */
- if (ic->ic_fixed_rate == -1) {
+ if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE) {
data->id.id_len = m0->m_pkthdr.len;
data->id.id_rateidx = ni->ni_txrate;
data->id.id_node = ni;
diff --git a/sys/dev/usb/if_ural.c b/sys/dev/usb/if_ural.c
index b09cb4a8745e3..239dc22ec1c92 100644
--- a/sys/dev/usb/if_ural.c
+++ b/sys/dev/usb/if_ural.c
@@ -1195,7 +1195,7 @@ ural_tx_data(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
wh = mtod(m0, struct ieee80211_frame *);
/* XXX should do automatic rate adaptation */
- if (ic->ic_fixed_rate != -1)
+ if (ic->ic_fixed_rate != IEEE80211_FIXED_RATE_NONE)
rate = ic->ic_bss->ni_rates.rs_rates[ic->ic_fixed_rate];
else
rate = ni->ni_rates.rs_rates[ni->ni_txrate];
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index 1cd2b9fe4cb06..a4a041a705d9e 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -2166,7 +2166,7 @@ wi_set_cfg(struct ifnet *ifp, u_long cmd, caddr_t data)
WI_LOCK(sc);
switch (le16toh(wreq.wi_val[0])) {
case 3:
- ic->ic_fixed_rate = -1;
+ ic->ic_fixed_rate = IEEE80211_FIXED_RATE_NONE;
break;
default:
rs = &ic->ic_sup_rates[IEEE80211_MODE_11B];
@@ -2272,7 +2272,7 @@ wi_write_txrate(struct wi_softc *sc)
int i;
u_int16_t rate;
- if (ic->ic_fixed_rate < 0)
+ if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE)
rate = 0; /* auto */
else
rate = (ic->ic_sup_rates[IEEE80211_MODE_11B].rs_rates[ic->ic_fixed_rate] &