Module Name: src Committed By: maya Date: Tue May 1 16:18:13 UTC 2018
Modified Files: src/sys/dev/ic: atw.c rt2560.c rt2661.c src/sys/dev/pci: if_ipw.c if_iwi.c if_iwn.c src/sys/dev/usb: if_atu.c if_rum.c if_ural.c if_zyd.c Log Message: GC private 802.11 rateset declarations, use the standard ones. Build tested only. To generate a diff of this commit: cvs rdiff -u -r1.162 -r1.163 src/sys/dev/ic/atw.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/ic/rt2560.c cvs rdiff -u -r1.36 -r1.37 src/sys/dev/ic/rt2661.c cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/if_ipw.c cvs rdiff -u -r1.105 -r1.106 src/sys/dev/pci/if_iwi.c cvs rdiff -u -r1.88 -r1.89 src/sys/dev/pci/if_iwn.c cvs rdiff -u -r1.56 -r1.57 src/sys/dev/usb/if_atu.c cvs rdiff -u -r1.59 -r1.60 src/sys/dev/usb/if_rum.c cvs rdiff -u -r1.53 -r1.54 src/sys/dev/usb/if_ural.c cvs rdiff -u -r1.46 -r1.47 src/sys/dev/usb/if_zyd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/atw.c diff -u src/sys/dev/ic/atw.c:1.162 src/sys/dev/ic/atw.c:1.163 --- src/sys/dev/ic/atw.c:1.162 Mon Oct 23 09:25:31 2017 +++ src/sys/dev/ic/atw.c Tue May 1 16:18:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: atw.c,v 1.162 2017/10/23 09:25:31 msaitoh Exp $ */ +/* $NetBSD: atw.c,v 1.163 2018/05/01 16:18:13 maya Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.162 2017/10/23 09:25:31 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.163 2018/05/01 16:18:13 maya Exp $"); #include <sys/param.h> @@ -514,7 +514,7 @@ atw_attach(struct atw_softc *sc) }; struct ieee80211com *ic = &sc->sc_ic; struct ifnet *ifp = &sc->sc_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)"}; @@ -781,12 +781,7 @@ atw_attach(struct atw_softc *sc) ic->ic_caps = IEEE80211_C_PMGT | IEEE80211_C_IBSS | IEEE80211_C_HOSTAP | IEEE80211_C_MONITOR; - 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. Index: src/sys/dev/ic/rt2560.c diff -u src/sys/dev/ic/rt2560.c:1.32 src/sys/dev/ic/rt2560.c:1.33 --- src/sys/dev/ic/rt2560.c:1.32 Thu Feb 8 09:05:19 2018 +++ src/sys/dev/ic/rt2560.c Tue May 1 16:18:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: rt2560.c,v 1.32 2018/02/08 09:05:19 dholland Exp $ */ +/* $NetBSD: rt2560.c,v 1.33 2018/05/01 16:18:13 maya Exp $ */ /* $OpenBSD: rt2560.c,v 1.15 2006/04/20 20:31:12 miod Exp $ */ /* $FreeBSD: rt2560.c,v 1.3 2006/03/21 21:15:43 damien Exp $*/ @@ -24,7 +24,7 @@ * http://www.ralinktech.com/ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rt2560.c,v 1.32 2018/02/08 09:05:19 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rt2560.c,v 1.33 2018/05/01 16:18:13 maya Exp $"); #include <sys/param.h> @@ -143,18 +143,6 @@ static void rt2560_stop(struct ifnet *, static void rt2560_softintr(void *); /* - * Supported rates for 802.11a/b/g modes (in 500Kbps unit). - */ -static const struct ieee80211_rateset rt2560_rateset_11a = - { 8, { 12, 18, 24, 36, 48, 72, 96, 108 } }; - -static const struct ieee80211_rateset rt2560_rateset_11b = - { 4, { 2, 4, 11, 22 } }; - -static const struct ieee80211_rateset rt2560_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 { @@ -420,7 +408,7 @@ rt2560_attach(void *xsc, int id) if (sc->rf_rev == RT2560_RF_5222) { /* set supported .11a rates */ - ic->ic_sup_rates[IEEE80211_MODE_11A] = rt2560_rateset_11a; + ic->ic_sup_rates[IEEE80211_MODE_11A] = ieee80211_std_rateset_11a; /* set supported .11a channels */ for (i = 36; i <= 64; i += 4) { @@ -441,8 +429,8 @@ rt2560_attach(void *xsc, int id) } /* set supported .11b and .11g rates */ - ic->ic_sup_rates[IEEE80211_MODE_11B] = rt2560_rateset_11b; - ic->ic_sup_rates[IEEE80211_MODE_11G] = rt2560_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++) { Index: src/sys/dev/ic/rt2661.c diff -u src/sys/dev/ic/rt2661.c:1.36 src/sys/dev/ic/rt2661.c:1.37 --- src/sys/dev/ic/rt2661.c:1.36 Mon Oct 23 09:31:17 2017 +++ src/sys/dev/ic/rt2661.c Tue May 1 16:18:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: rt2661.c,v 1.36 2017/10/23 09:31:17 msaitoh Exp $ */ +/* $NetBSD: rt2661.c,v 1.37 2018/05/01 16:18:13 maya Exp $ */ /* $OpenBSD: rt2661.c,v 1.17 2006/05/01 08:41:11 damien Exp $ */ /* $FreeBSD: rt2560.c,v 1.5 2006/06/02 19:59:31 csjp Exp $ */ @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rt2661.c,v 1.36 2017/10/23 09:31:17 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rt2661.c,v 1.37 2018/05/01 16:18:13 maya Exp $"); #include <sys/param.h> @@ -167,18 +167,6 @@ static void rt2661_enable_tsf_sync(struc static int rt2661_get_rssi(struct rt2661_softc *, uint8_t); static void rt2661_softintr(void *); -/* - * Supported rates for 802.11a/b/g modes (in 500Kbps unit). - */ -static const struct ieee80211_rateset rt2661_rateset_11a = - { 8, { 12, 18, 24, 36, 48, 72, 96, 108 } }; - -static const struct ieee80211_rateset rt2661_rateset_11b = - { 4, { 2, 4, 11, 22 } }; - -static const struct ieee80211_rateset rt2661_rateset_11g = - { 12, { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 } }; - static const struct { uint32_t reg; uint32_t val; @@ -309,7 +297,7 @@ rt2661_attach(void *xsc, int id) if (sc->rf_rev == RT2661_RF_5225 || sc->rf_rev == RT2661_RF_5325) { /* set supported .11a rates */ - ic->ic_sup_rates[IEEE80211_MODE_11A] = rt2661_rateset_11a; + ic->ic_sup_rates[IEEE80211_MODE_11A] = ieee80211_std_rateset_11a; /* set supported .11a channels */ for (i = 36; i <= 64; i += 4) { @@ -330,8 +318,8 @@ rt2661_attach(void *xsc, int id) } /* set supported .11b and .11g rates */ - ic->ic_sup_rates[IEEE80211_MODE_11B] = rt2661_rateset_11b; - ic->ic_sup_rates[IEEE80211_MODE_11G] = rt2661_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++) { @@ -2180,7 +2168,7 @@ rt2661_set_basicrates(struct rt2661_soft * Find h/w rate index. We know it exists because the rate * set has already been negotiated. */ - for (j = 0; rt2661_rateset_11g.rs_rates[j] != RV(rate); j++); + for (j = 0; ieee80211_std_rateset_11g.rs_rates[j] != RV(rate); j++); mask |= 1 << j; } Index: src/sys/dev/pci/if_ipw.c diff -u src/sys/dev/pci/if_ipw.c:1.67 src/sys/dev/pci/if_ipw.c:1.68 --- src/sys/dev/pci/if_ipw.c:1.67 Tue Jan 16 07:05:24 2018 +++ src/sys/dev/pci/if_ipw.c Tue May 1 16:18:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ipw.c,v 1.67 2018/01/16 07:05:24 maxv Exp $ */ +/* $NetBSD: if_ipw.c,v 1.68 2018/05/01 16:18:13 maya Exp $ */ /* FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.15 2005/11/13 17:17:40 damien Exp */ /*- @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.67 2018/01/16 07:05:24 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.68 2018/05/01 16:18:13 maya Exp $"); /*- * Intel(R) PRO/Wireless 2100 MiniPCI driver @@ -133,12 +133,6 @@ static void ipw_read_mem_1(struct ipw_so static void ipw_write_mem_1(struct ipw_softc *, bus_size_t, uint8_t *, bus_size_t); -/* - * Supported rates for 802.11b mode (in 500Kbps unit). - */ -static const struct ieee80211_rateset ipw_rateset_11b = - { 4, { 2, 4, 11, 22 } }; - static inline uint8_t MEM_READ_1(struct ipw_softc *sc, uint32_t addr) { @@ -282,7 +276,7 @@ ipw_attach(device_t parent, device_t sel ic->ic_myaddr[5] = val & 0xff; /* set supported .11b rates */ - ic->ic_sup_rates[IEEE80211_MODE_11B] = ipw_rateset_11b; + ic->ic_sup_rates[IEEE80211_MODE_11B] = ieee80211_std_rateset_11b; /* set supported .11b channels (read from EEPROM) */ if ((val = ipw_read_prom_word(sc, IPW_EEPROM_CHANNEL_LIST)) == 0) Index: src/sys/dev/pci/if_iwi.c diff -u src/sys/dev/pci/if_iwi.c:1.105 src/sys/dev/pci/if_iwi.c:1.106 --- src/sys/dev/pci/if_iwi.c:1.105 Tue Jan 16 07:05:24 2018 +++ src/sys/dev/pci/if_iwi.c Tue May 1 16:18:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwi.c,v 1.105 2018/01/16 07:05:24 maxv Exp $ */ +/* $NetBSD: if_iwi.c,v 1.106 2018/05/01 16:18:13 maya Exp $ */ /* $OpenBSD: if_iwi.c,v 1.111 2010/11/15 19:11:57 damien Exp $ */ /*- @@ -19,7 +19,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.105 2018/01/16 07:05:24 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.106 2018/05/01 16:18:13 maya Exp $"); /*- * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver @@ -147,18 +147,6 @@ static int iwi_getrfkill(struct iwi_soft static void iwi_led_set(struct iwi_softc *, uint32_t, int); static void iwi_sysctlattach(struct iwi_softc *); -/* - * Supported rates for 802.11a/b/g modes (in 500Kbps unit). - */ -static const struct ieee80211_rateset iwi_rateset_11a = - { 8, { 12, 18, 24, 36, 48, 72, 96, 108 } }; - -static const struct ieee80211_rateset iwi_rateset_11b = - { 4, { 2, 4, 11, 22 } }; - -static const struct ieee80211_rateset iwi_rateset_11g = - { 12, { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 } }; - static inline uint8_t MEM_READ_1(struct iwi_softc *sc, uint32_t addr) { @@ -329,7 +317,7 @@ iwi_attach(device_t parent, device_t sel if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_INTEL_PRO_WL_2915ABG_1 || PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_INTEL_PRO_WL_2915ABG_2) { /* set supported .11a rates (2915ABG only) */ - ic->ic_sup_rates[IEEE80211_MODE_11A] = iwi_rateset_11a; + ic->ic_sup_rates[IEEE80211_MODE_11A] = ieee80211_std_rateset_11a; /* set supported .11a channels */ for (i = 36; i <= 64; i += 4) { @@ -345,8 +333,8 @@ iwi_attach(device_t parent, device_t sel } /* set supported .11b and .11g rates */ - ic->ic_sup_rates[IEEE80211_MODE_11B] = iwi_rateset_11b; - ic->ic_sup_rates[IEEE80211_MODE_11G] = iwi_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++) { Index: src/sys/dev/pci/if_iwn.c diff -u src/sys/dev/pci/if_iwn.c:1.88 src/sys/dev/pci/if_iwn.c:1.89 --- src/sys/dev/pci/if_iwn.c:1.88 Sun Jan 28 16:12:41 2018 +++ src/sys/dev/pci/if_iwn.c Tue May 1 16:18:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwn.c,v 1.88 2018/01/28 16:12:41 christos Exp $ */ +/* $NetBSD: if_iwn.c,v 1.89 2018/05/01 16:18:13 maya Exp $ */ /* $OpenBSD: if_iwn.c,v 1.135 2014/09/10 07:22:09 dcoppa Exp $ */ /*- @@ -22,7 +22,7 @@ * adapters. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.88 2018/01/28 16:12:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.89 2018/05/01 16:18:13 maya Exp $"); #define IWN_USE_RBUF /* Use local storage for RX */ #undef IWN_HWCRYPTO /* XXX does not even compile yet */ @@ -118,18 +118,6 @@ static const pci_product_id_t iwn_device PCI_PRODUCT_INTEL_WIFI_LINK_105_2, }; -/* - * Supported rates for 802.11a/b/g modes (in 500Kbps unit). - */ -static const struct ieee80211_rateset iwn_rateset_11a = - { 8, { 12, 18, 24, 36, 48, 72, 96, 108 } }; - -static const struct ieee80211_rateset iwn_rateset_11b = - { 4, { 2, 4, 11, 22 } }; - -static const struct ieee80211_rateset iwn_rateset_11g = - { 12, { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 } }; - static int iwn_match(device_t , struct cfdata *, void *); static void iwn_attach(device_t , device_t , void *); static int iwn4965_attach(struct iwn_softc *, pci_product_id_t); @@ -567,10 +555,10 @@ iwn_attach(device_t parent __unused, dev #endif /* !IEEE80211_NO_HT */ /* Set supported legacy rates. */ - ic->ic_sup_rates[IEEE80211_MODE_11B] = iwn_rateset_11b; - ic->ic_sup_rates[IEEE80211_MODE_11G] = iwn_rateset_11g; + ic->ic_sup_rates[IEEE80211_MODE_11B] = ieee80211_std_rateset_11b; + ic->ic_sup_rates[IEEE80211_MODE_11G] = ieee80211_std_rateset_11g; if (sc->sc_flags & IWN_FLAG_HAS_5GHZ) { - ic->ic_sup_rates[IEEE80211_MODE_11A] = iwn_rateset_11a; + ic->ic_sup_rates[IEEE80211_MODE_11A] = ieee80211_std_rateset_11a; } #ifndef IEEE80211_NO_HT if (sc->sc_flags & IWN_FLAG_HAS_11N) { Index: src/sys/dev/usb/if_atu.c diff -u src/sys/dev/usb/if_atu.c:1.56 src/sys/dev/usb/if_atu.c:1.57 --- src/sys/dev/usb/if_atu.c:1.56 Sun Jan 21 13:57:11 2018 +++ src/sys/dev/usb/if_atu.c Tue May 1 16:18:13 2018 @@ -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 | Index: src/sys/dev/usb/if_rum.c diff -u src/sys/dev/usb/if_rum.c:1.59 src/sys/dev/usb/if_rum.c:1.60 --- src/sys/dev/usb/if_rum.c:1.59 Sun Jan 21 13:57:12 2018 +++ src/sys/dev/usb/if_rum.c Tue May 1 16:18:13 2018 @@ -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.bergam...@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 sel 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 sel } /* 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++) { Index: src/sys/dev/usb/if_ural.c diff -u src/sys/dev/usb/if_ural.c:1.53 src/sys/dev/usb/if_ural.c:1.54 --- src/sys/dev/usb/if_ural.c:1.53 Sun Jan 21 13:57:12 2018 +++ src/sys/dev/usb/if_ural.c Tue May 1 16:18:13 2018 @@ -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 usb 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 se 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 se } /* 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++) { Index: src/sys/dev/usb/if_zyd.c diff -u src/sys/dev/usb/if_zyd.c:1.46 src/sys/dev/usb/if_zyd.c:1.47 --- src/sys/dev/usb/if_zyd.c:1.46 Mon Apr 30 01:14:07 2018 +++ src/sys/dev/usb/if_zyd.c Tue May 1 16:18:13 2018 @@ -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.bergam...@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 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++) {