summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2006-11-26 17:20:34 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2006-11-26 17:20:34 +0000
commitb1a9c0a79daf45c38ec6c51fce673f44db47edf1 (patch)
tree6a296437e8d50e623dd9ac827655b10b3023a4e0 /sys/dev/ic
parentb6b1aebc467a9507844d9ec43842a4b2f94a4b6f (diff)
Make use of ieee80211_std_rateset
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/acx.c11
-rw-r--r--sys/dev/ic/acx100.c4
-rw-r--r--sys/dev/ic/acx111.c6
-rw-r--r--sys/dev/ic/atw.c11
-rw-r--r--sys/dev/ic/rtw.c13
5 files changed, 12 insertions, 33 deletions
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c
index 03676dbf496..d5a673c0c17 100644
--- a/sys/dev/ic/acx.c
+++ b/sys/dev/ic/acx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acx.c,v 1.54 2006/11/09 23:15:54 claudio Exp $ */
+/* $OpenBSD: acx.c,v 1.55 2006/11/26 17:20:33 jsg Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -201,11 +201,6 @@ void acx_iter_func(void *, struct ieee80211_node *);
void acx_amrr_timeout(void *);
void acx_newassoc(struct ieee80211com *, struct ieee80211_node *, int);
-const struct ieee80211_rateset acx_rates_11b =
- { 4, { 2, 4, 11, 22 } };
-const struct ieee80211_rateset acx_rates_11g =
- { 12, { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 } };
-
static int acx_chanscan_rate = 5; /* 5 channels per second */
int acx_beacon_intvl = 100; /* 100 TU */
@@ -296,10 +291,6 @@ acx_attach(struct acx_softc *sc)
IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
IFQ_SET_READY(&ifp->if_snd);
- /* set supported .11b and .11g rates */
- ic->ic_sup_rates[IEEE80211_MODE_11B] = acx_rates_11b;
- ic->ic_sup_rates[IEEE80211_MODE_11G] = acx_rates_11g;
-
/* Set channels */
for (i = 1; i <= 14; ++i) {
ic->ic_channels[i].ic_freq =
diff --git a/sys/dev/ic/acx100.c b/sys/dev/ic/acx100.c
index 78eb641e0f3..848db7d5f19 100644
--- a/sys/dev/ic/acx100.c
+++ b/sys/dev/ic/acx100.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acx100.c,v 1.12 2006/09/27 04:34:36 brad Exp $ */
+/* $OpenBSD: acx100.c,v 1.13 2006/11/26 17:20:33 jsg Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -297,7 +297,7 @@ acx100_set_param(struct acx_softc *sc)
sc->chip_phymode = IEEE80211_MODE_11B;
sc->chip_chan_flags = IEEE80211_CHAN_B;
sc->sc_ic.ic_phytype = IEEE80211_T_DS;
- sc->sc_ic.ic_sup_rates[IEEE80211_MODE_11B] = acx_rates_11b;
+ sc->sc_ic.ic_sup_rates[IEEE80211_MODE_11B] = ieee80211_std_rateset_11b;
sc->chip_init = acx100_init;
sc->chip_set_wepkey = acx100_set_wepkey;
diff --git a/sys/dev/ic/acx111.c b/sys/dev/ic/acx111.c
index 2515cf58ce3..3b8eba8c696 100644
--- a/sys/dev/ic/acx111.c
+++ b/sys/dev/ic/acx111.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acx111.c,v 1.12 2006/09/27 04:34:36 brad Exp $ */
+/* $OpenBSD: acx111.c,v 1.13 2006/11/26 17:20:33 jsg Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -299,8 +299,8 @@ acx111_set_param(struct acx_softc *sc)
IEEE80211_CHAN_2GHZ;
sc->sc_ic.ic_caps = IEEE80211_C_WEP;
sc->sc_ic.ic_phytype = IEEE80211_T_OFDM;
- sc->sc_ic.ic_sup_rates[IEEE80211_MODE_11B] = acx_rates_11b;
- sc->sc_ic.ic_sup_rates[IEEE80211_MODE_11G] = acx_rates_11g;
+ sc->sc_ic.ic_sup_rates[IEEE80211_MODE_11B] = ieee80211_std_rateset_11b;
+ sc->sc_ic.ic_sup_rates[IEEE80211_MODE_11G] = ieee80211_std_rateset_11g;
sc->chip_init = acx111_init;
sc->chip_write_config = acx111_write_config;
diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c
index 24c48e9667e..f148b1cf91a 100644
--- a/sys/dev/ic/atw.c
+++ b/sys/dev/ic/atw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atw.c,v 1.48 2006/08/30 11:20:20 jsg Exp $ */
+/* $OpenBSD: atw.c,v 1.49 2006/11/26 17:20:33 jsg Exp $ */
/* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */
/*-
@@ -568,7 +568,7 @@ atw_attach(struct atw_softc *sc)
};
struct ieee80211com *ic = &sc->sc_ic;
struct ifnet *ifp = &ic->ic_if;
- int country_code, error, i, nrate, srom_major;
+ int country_code, error, i, srom_major;
u_int32_t reg;
static const char *type_strings[] = {"Intersil (not supported)",
"RFMD", "Marvel (not supported)"};
@@ -823,12 +823,7 @@ atw_attach(struct atw_softc *sc)
ic->ic_caps = IEEE80211_C_PMGT | IEEE80211_C_IBSS |
IEEE80211_C_HOSTAP | IEEE80211_C_MONITOR | IEEE80211_C_WEP;
- nrate = 0;
- ic->ic_sup_rates[IEEE80211_MODE_11B].rs_rates[nrate++] = 2;
- ic->ic_sup_rates[IEEE80211_MODE_11B].rs_rates[nrate++] = 4;
- ic->ic_sup_rates[IEEE80211_MODE_11B].rs_rates[nrate++] = 11;
- ic->ic_sup_rates[IEEE80211_MODE_11B].rs_rates[nrate++] = 22;
- ic->ic_sup_rates[IEEE80211_MODE_11B].rs_nrates = nrate;
+ ic->ic_sup_rates[IEEE80211_MODE_11B] = ieee80211_std_rateset_11b;
/*
* Call MI attach routines.
diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c
index 587f53678d2..8381bfd63fa 100644
--- a/sys/dev/ic/rtw.c
+++ b/sys/dev/ic/rtw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtw.c,v 1.55 2006/08/30 11:20:20 jsg Exp $ */
+/* $OpenBSD: rtw.c,v 1.56 2006/11/26 17:20:33 jsg Exp $ */
/* $NetBSD: rtw.c,v 1.29 2004/12/27 19:49:16 dyoung Exp $ */
/*-
@@ -3760,7 +3760,7 @@ rtw_attach(struct rtw_softc *sc)
const char *vername;
struct ifnet *ifp;
char scratch[sizeof("unknown 0xXXXXXXXX")];
- int pri, rc, nrate;
+ int pri, rc;
/* Use default DMA memory access */
@@ -3929,14 +3929,7 @@ rtw_attach(struct rtw_softc *sc)
ic->ic_caps = IEEE80211_C_PMGT | IEEE80211_C_IBSS |
IEEE80211_C_HOSTAP | IEEE80211_C_MONITOR | IEEE80211_C_WEP;
- nrate = 0;
- ic->ic_sup_rates[IEEE80211_MODE_11B].rs_rates[nrate++] =
- IEEE80211_RATE_BASIC | 2;
- ic->ic_sup_rates[IEEE80211_MODE_11B].rs_rates[nrate++] =
- IEEE80211_RATE_BASIC | 4;
- ic->ic_sup_rates[IEEE80211_MODE_11B].rs_rates[nrate++] = 11;
- ic->ic_sup_rates[IEEE80211_MODE_11B].rs_rates[nrate++] = 22;
- ic->ic_sup_rates[IEEE80211_MODE_11B].rs_nrates = nrate;
+ ic->ic_sup_rates[IEEE80211_MODE_11B] = ieee80211_std_rateset_11b;
rtw_led_attach(&sc->sc_led_state, (void *)sc);