diff options
| author | Sam Leffler <sam@FreeBSD.org> | 2005-07-22 16:50:18 +0000 |
|---|---|---|
| committer | Sam Leffler <sam@FreeBSD.org> | 2005-07-22 16:50:18 +0000 |
| commit | 2c39b32c9439c191bdc67411f3fee3e77e82fe32 (patch) | |
| tree | fca8cfc4073f63287b1f51121bcf1c74ccdcdeb7 /sys/net80211 | |
| parent | af8d224ec0cda6ccf38f94f508afcea6065d0aeb (diff) | |
Notes
Diffstat (limited to 'sys/net80211')
| -rw-r--r-- | sys/net80211/ieee80211.c | 2 | ||||
| -rw-r--r-- | sys/net80211/ieee80211_ioctl.c | 4 | ||||
| -rw-r--r-- | sys/net80211/ieee80211_proto.c | 5 | ||||
| -rw-r--r-- | sys/net80211/ieee80211_var.h | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index b25f047dd592..ea75fa0356f6 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -665,7 +665,7 @@ ieee80211_media_status(struct ifnet *ifp, struct ifmediareq *imr) /* * Calculate a current rate if possible. */ - if (ic->ic_fixed_rate != -1) { + if (ic->ic_fixed_rate != IEEE80211_FIXED_RATE_NONE) { /* * A fixed rate is set, report that. */ diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 83ac126cf33a..017c927b7fea 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -273,7 +273,7 @@ ieee80211_cfgget(struct ieee80211com *ic, u_long cmd, caddr_t data) wreq.wi_len = IEEE80211_ADDR_LEN / 2; break; case WI_RID_TX_RATE: - if (ic->ic_fixed_rate == -1) + if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE) wreq.wi_val[0] = 0; /* auto */ else wreq.wi_val[0] = htole16( @@ -592,7 +592,7 @@ ieee80211_cfgset(struct ieee80211com *ic, u_long cmd, caddr_t data) return EINVAL; if (wreq.wi_val[0] == 0) { /* auto */ - ic->ic_fixed_rate = -1; + ic->ic_fixed_rate = IEEE80211_FIXED_RATE_NONE; break; } rate = 2 * le16toh(wreq.wi_val[0]); diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index 168f4102454f..0fe457483691 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -100,7 +100,7 @@ ieee80211_proto_attach(struct ieee80211com *ic) ic->ic_rtsthreshold = IEEE80211_RTS_MAX; #endif ic->ic_fragthreshold = 2346; /* XXX not used yet */ - ic->ic_fixed_rate = -1; /* no fixed rate */ + ic->ic_fixed_rate = IEEE80211_FIXED_RATE_NONE; ic->ic_protmode = IEEE80211_PROT_CTSONLY; ic->ic_roaming = IEEE80211_ROAMING_AUTO; @@ -335,7 +335,8 @@ ieee80211_fix_rate(struct ieee80211com *ic, struct ieee80211_node *ni, int flags * If the fixed rate check was requested but no * fixed has been defined then just remove it. */ - if ((flags & IEEE80211_F_DOFRATE) && ic->ic_fixed_rate < 0) + if ((flags & IEEE80211_F_DOFRATE) && + ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE) flags &= ~IEEE80211_F_DOFRATE; error = 0; okrate = badrate = fixedrate = 0; diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index 1c34e78439ac..d4959af983ed 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -72,6 +72,8 @@ #define IEEE80211_PS_SLEEP 0x1 /* STA is in power saving mode */ #define IEEE80211_PS_MAX_QUEUE 50 /* maximum saved packets */ +#define IEEE80211_FIXED_RATE_NONE -1 + #define IEEE80211_MS_TO_TU(x) (((x) * 1000) / 1024) #define IEEE80211_TU_TO_MS(x) (((x) * 1024) / 1000) |
