summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authormaya <maya@NetBSD.org>2018-05-01 16:18:13 +0000
committermaya <maya@NetBSD.org>2018-05-01 16:18:13 +0000
commit5366ef43b53d63d81ecc71786daabcae5f6e0432 (patch)
tree290a904cbfd82a86b88ead17f680ad15059778eb /sys/dev/usb
parent998e151a3256eb8414bf80b560e38d6d47891929 (diff)
GC private 802.11 rateset declarations, use the standard ones.
Build tested only.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_atu.c10
-rw-r--r--sys/dev/usb/if_rum.c22
-rw-r--r--sys/dev/usb/if_ural.c22
-rw-r--r--sys/dev/usb/if_zyd.c14
4 files changed, 17 insertions, 51 deletions
diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c
index 87bf9d69b69..0b11b7d348d 100644
--- a/sys/dev/usb/if_atu.c
+++ b/sys/dev/usb/if_atu.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_atu.c,v 1.56 2018/01/21 13:57:11 skrll Exp $ */
+/* $NetBSD: if_atu.c,v 1.57 2018/05/01 16:18:13 maya Exp $ */
/* $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */
/*
* Copyright (c) 2003, 2004
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.56 2018/01/21 13:57:11 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.57 2018/05/01 16:18:13 maya Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1434,11 +1434,7 @@ atu_complete_attach(struct atu_softc *sc)
#endif
i = 0;
- ic->ic_sup_rates[IEEE80211_MODE_11B].rs_rates[i++] = 2;
- ic->ic_sup_rates[IEEE80211_MODE_11B].rs_rates[i++] = 4;
- ic->ic_sup_rates[IEEE80211_MODE_11B].rs_rates[i++] = 11;
- ic->ic_sup_rates[IEEE80211_MODE_11B].rs_rates[i++] = 22;
- ic->ic_sup_rates[IEEE80211_MODE_11B].rs_nrates = i;
+ ic->ic_sup_rates[IEEE80211_MODE_11B] = ieee80211_std_rateset_11b;
for (i = 1; i <= 14; i++) {
ic->ic_channels[i].ic_flags = IEEE80211_CHAN_B |
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index a051b531698..8b60ad7bad3 100644
--- a/sys/dev/usb/if_rum.c
+++ b/sys/dev/usb/if_rum.c
@@ -1,5 +1,5 @@
/* $OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $ */
-/* $NetBSD: if_rum.c,v 1.59 2018/01/21 13:57:12 skrll Exp $ */
+/* $NetBSD: if_rum.c,v 1.60 2018/05/01 16:18:13 maya Exp $ */
/*-
* Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr>
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.59 2018/01/21 13:57:12 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.60 2018/05/01 16:18:13 maya Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -207,18 +207,6 @@ static void rum_amrr_timeout(void *);
static void rum_amrr_update(struct usbd_xfer *, void *,
usbd_status);
-/*
- * Supported rates for 802.11a/b/g modes (in 500Kbps unit).
- */
-static const struct ieee80211_rateset rum_rateset_11a =
- { 8, { 12, 18, 24, 36, 48, 72, 96, 108 } };
-
-static const struct ieee80211_rateset rum_rateset_11b =
- { 4, { 2, 4, 11, 22 } };
-
-static const struct ieee80211_rateset rum_rateset_11g =
- { 12, { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 } };
-
static const struct {
uint32_t reg;
uint32_t val;
@@ -413,7 +401,7 @@ rum_attach(device_t parent, device_t self, void *aux)
if (sc->rf_rev == RT2573_RF_5225 || sc->rf_rev == RT2573_RF_5226) {
/* set supported .11a rates */
- ic->ic_sup_rates[IEEE80211_MODE_11A] = rum_rateset_11a;
+ ic->ic_sup_rates[IEEE80211_MODE_11A] = ieee80211_std_rateset_11a;
/* set supported .11a channels */
for (i = 34; i <= 46; i += 4) {
@@ -439,8 +427,8 @@ rum_attach(device_t parent, device_t self, void *aux)
}
/* set supported .11b and .11g rates */
- ic->ic_sup_rates[IEEE80211_MODE_11B] = rum_rateset_11b;
- ic->ic_sup_rates[IEEE80211_MODE_11G] = rum_rateset_11g;
+ ic->ic_sup_rates[IEEE80211_MODE_11B] = ieee80211_std_rateset_11b;
+ ic->ic_sup_rates[IEEE80211_MODE_11G] = ieee80211_std_rateset_11g;
/* set supported .11b and .11g channels (1 through 14) */
for (i = 1; i <= 14; i++) {
diff --git a/sys/dev/usb/if_ural.c b/sys/dev/usb/if_ural.c
index b2e258241de..0bbc378e4ca 100644
--- a/sys/dev/usb/if_ural.c
+++ b/sys/dev/usb/if_ural.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ural.c,v 1.53 2018/01/21 13:57:12 skrll Exp $ */
+/* $NetBSD: if_ural.c,v 1.54 2018/05/01 16:18:13 maya Exp $ */
/* $FreeBSD: /repoman/r/ncvs/src/sys/dev/usb/if_ural.c,v 1.40 2006/06/02 23:14:40 sam Exp $ */
/*-
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ural.c,v 1.53 2018/01/21 13:57:12 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ural.c,v 1.54 2018/05/01 16:18:13 maya Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -174,18 +174,6 @@ Static void ural_amrr_update(struct usbd_xfer *, void *,
usbd_status status);
/*
- * Supported rates for 802.11a/b/g modes (in 500Kbps unit).
- */
-static const struct ieee80211_rateset ural_rateset_11a =
- { 8, { 12, 18, 24, 36, 48, 72, 96, 108 } };
-
-static const struct ieee80211_rateset ural_rateset_11b =
- { 4, { 2, 4, 11, 22 } };
-
-static const struct ieee80211_rateset ural_rateset_11g =
- { 12, { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 } };
-
-/*
* Default values for MAC registers; values taken from the reference driver.
*/
static const struct {
@@ -470,7 +458,7 @@ ural_attach(device_t parent, device_t self, void *aux)
if (sc->rf_rev == RAL_RF_5222) {
/* set supported .11a rates */
- ic->ic_sup_rates[IEEE80211_MODE_11A] = ural_rateset_11a;
+ ic->ic_sup_rates[IEEE80211_MODE_11A] = ieee80211_std_rateset_11a;
/* set supported .11a channels */
for (i = 36; i <= 64; i += 4) {
@@ -491,8 +479,8 @@ ural_attach(device_t parent, device_t self, void *aux)
}
/* set supported .11b and .11g rates */
- ic->ic_sup_rates[IEEE80211_MODE_11B] = ural_rateset_11b;
- ic->ic_sup_rates[IEEE80211_MODE_11G] = ural_rateset_11g;
+ ic->ic_sup_rates[IEEE80211_MODE_11B] = ieee80211_std_rateset_11b;
+ ic->ic_sup_rates[IEEE80211_MODE_11G] = ieee80211_std_rateset_11g;
/* set supported .11b and .11g channels (1 through 14) */
for (i = 1; i <= 14; i++) {
diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c
index 1f15482357c..17386ddb496 100644
--- a/sys/dev/usb/if_zyd.c
+++ b/sys/dev/usb/if_zyd.c
@@ -1,5 +1,5 @@
/* $OpenBSD: if_zyd.c,v 1.52 2007/02/11 00:08:04 jsg Exp $ */
-/* $NetBSD: if_zyd.c,v 1.46 2018/04/30 01:14:07 maya Exp $ */
+/* $NetBSD: if_zyd.c,v 1.47 2018/05/01 16:18:13 maya Exp $ */
/*-
* Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr>
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_zyd.c,v 1.46 2018/04/30 01:14:07 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_zyd.c,v 1.47 2018/05/01 16:18:13 maya Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -239,12 +239,6 @@ Static void zyd_iter_func(void *, struct ieee80211_node *);
Static void zyd_amrr_timeout(void *);
Static void zyd_newassoc(struct ieee80211_node *, int);
-static const struct ieee80211_rateset zyd_rateset_11b =
- { 4, { 2, 4, 11, 22 } };
-
-static const struct ieee80211_rateset zyd_rateset_11g =
- { 12, { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 } };
-
int
zyd_match(device_t parent, cfdata_t match, void *aux)
{
@@ -417,8 +411,8 @@ zyd_complete_attach(struct zyd_softc *sc)
IEEE80211_C_WEP; /* s/w WEP */
/* set supported .11b and .11g rates */
- ic->ic_sup_rates[IEEE80211_MODE_11B] = zyd_rateset_11b;
- ic->ic_sup_rates[IEEE80211_MODE_11G] = zyd_rateset_11g;
+ ic->ic_sup_rates[IEEE80211_MODE_11B] = ieee80211_std_rateset_11b;
+ ic->ic_sup_rates[IEEE80211_MODE_11G] = ieee80211_std_rateset_11g;
/* set supported .11b and .11g channels (1 through 14) */
for (i = 1; i <= 14; i++) {