Date: Sat, 17 Dec 2011 10:54:05 +0000 From: Alexander Best <arundel@freebsd.org> To: Bernhard Schmidt <bschmidt@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228621 - in head/sys: dev/an dev/ath dev/bwi dev/bwn dev/if_ndis dev/ipw dev/iwi dev/iwn dev/malo dev/mwl dev/ral dev/usb/wlan dev/wi dev/wpi net80211 Message-ID: <20111217105405.GA18782@freebsd.org> In-Reply-To: <201112171023.pBHANH9S053317@svn.freebsd.org> References: <201112171023.pBHANH9S053317@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat Dec 17 11, Bernhard Schmidt wrote: > Author: bschmidt > Date: Sat Dec 17 10:23:17 2011 > New Revision: 228621 > URL: http://svn.freebsd.org/changeset/base/228621 > > Log: > Fix some net80211 enum nits: > - ic_vap_create() uses an ieee80211_opmode argument > - ieee80211_rate2media() takes an ieee80211_phymode argument > - ieee80211_plcp2rate() takes an ieee80211_phytype argument > - cast to enum ieee80211_protmode and ieee80211_roamingmode to silence > compiler warnings > > Submitted by: arundel@ actually i merely submitted a problem report via kern/162475. ;) i didn't write a single patch. so all the credit goes to bernhard. :) > > Modified: > head/sys/dev/an/if_an.c > head/sys/dev/ath/if_ath.c > head/sys/dev/bwi/if_bwi.c > head/sys/dev/bwn/if_bwn.c > head/sys/dev/if_ndis/if_ndis.c > head/sys/dev/ipw/if_ipw.c > head/sys/dev/iwi/if_iwi.c > head/sys/dev/iwn/if_iwn.c > head/sys/dev/malo/if_malo.c > head/sys/dev/mwl/if_mwl.c > head/sys/dev/ral/rt2560.c > head/sys/dev/ral/rt2661.c > head/sys/dev/usb/wlan/if_rum.c > head/sys/dev/usb/wlan/if_run.c > head/sys/dev/usb/wlan/if_uath.c > head/sys/dev/usb/wlan/if_upgt.c > head/sys/dev/usb/wlan/if_ural.c > head/sys/dev/usb/wlan/if_urtw.c > head/sys/dev/usb/wlan/if_zyd.c > head/sys/dev/wi/if_wi.c > head/sys/dev/wpi/if_wpi.c > head/sys/net80211/ieee80211.c > head/sys/net80211/ieee80211_ht.c > head/sys/net80211/ieee80211_ioctl.c > head/sys/net80211/ieee80211_var.h > > Modified: head/sys/dev/an/if_an.c > ============================================================================== > --- head/sys/dev/an/if_an.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/an/if_an.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -797,7 +797,7 @@ an_attach(struct an_softc *sc, int flags > ADD(IFM_AUTO, IFM_IEEE80211_ADHOC); > for (i = 0; i < nrate; i++) { > r = sc->an_caps.an_rates[i]; > - mword = ieee80211_rate2media(NULL, r, IEEE80211_T_DS); > + mword = ieee80211_rate2media(NULL, r, IEEE80211_MODE_AUTO); > if (mword == 0) > continue; > printf("%s%d%sMbps", (i != 0 ? " " : ""), > @@ -3299,7 +3299,7 @@ an_media_status(struct ifnet *ifp, struc > if (sc->an_config.an_opmode == AN_OPMODE_IBSS_ADHOC) > imr->ifm_active |= IFM_IEEE80211_ADHOC; > imr->ifm_active |= ieee80211_rate2media(NULL, > - status.an_current_tx_rate, IEEE80211_T_DS); > + status.an_current_tx_rate, IEEE80211_MODE_AUTO); > imr->ifm_status = IFM_AVALID; > if (status.an_opmode & AN_STATUS_OPMODE_ASSOCIATED) > imr->ifm_status |= IFM_ACTIVE; > > Modified: head/sys/dev/ath/if_ath.c > ============================================================================== > --- head/sys/dev/ath/if_ath.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/ath/if_ath.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -128,9 +128,9 @@ __FBSDID("$FreeBSD$"); > CTASSERT(ATH_BCBUF <= 8); > > static struct ieee80211vap *ath_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, > - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void ath_vap_delete(struct ieee80211vap *); > static void ath_init(void *); > static void ath_stop_locked(struct ifnet *); > @@ -885,16 +885,17 @@ assign_bslot(struct ath_softc *sc) > } > > static struct ieee80211vap * > -ath_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac0[IEEE80211_ADDR_LEN]) > +ath_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac0[IEEE80211_ADDR_LEN]) > { > struct ath_softc *sc = ic->ic_ifp->if_softc; > struct ath_vap *avp; > struct ieee80211vap *vap; > uint8_t mac[IEEE80211_ADDR_LEN]; > - int ic_opmode, needbeacon, error; > + int needbeacon, error; > + enum ieee80211_opmode ic_opmode; > > avp = (struct ath_vap *) malloc(sizeof(struct ath_vap), > M_80211_VAP, M_WAITOK | M_ZERO); > > Modified: head/sys/dev/bwi/if_bwi.c > ============================================================================== > --- head/sys/dev/bwi/if_bwi.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/bwi/if_bwi.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -96,9 +96,9 @@ struct bwi_myaddr_bssid { > } __packed; > > static struct ieee80211vap *bwi_vap_create(struct ieee80211com *, > - const char [IFNAMSIZ], int, int, int, > - const uint8_t [IEEE80211_ADDR_LEN], > - const uint8_t [IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void bwi_vap_delete(struct ieee80211vap *); > static void bwi_init(void *); > static int bwi_ioctl(struct ifnet *, u_long, caddr_t); > @@ -118,7 +118,7 @@ static void bwi_calibrate(void *); > > static int bwi_calc_rssi(struct bwi_softc *, const struct bwi_rxbuf_hdr *); > static int bwi_calc_noise(struct bwi_softc *); > -static __inline uint8_t bwi_plcp2rate(uint32_t, enum ieee80211_phymode); > +static __inline uint8_t bwi_plcp2rate(uint32_t, enum ieee80211_phytype); > static void bwi_rx_radiotap(struct bwi_softc *, struct mbuf *, > struct bwi_rxbuf_hdr *, const void *, int, int, int); > > @@ -591,10 +591,10 @@ bwi_detach(struct bwi_softc *sc) > } > > static struct ieee80211vap * > -bwi_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]) > +bwi_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac[IEEE80211_ADDR_LEN]) > { > struct bwi_vap *bvp; > struct ieee80211vap *vap; > @@ -2667,9 +2667,9 @@ bwi_rxeof(struct bwi_softc *sc, int end_ > m_adj(m, sizeof(*hdr) + wh_ofs); > > if (htole16(hdr->rxh_flags1) & BWI_RXH_F1_OFDM) > - rate = bwi_plcp2rate(plcp, IEEE80211_MODE_11G); > + rate = bwi_plcp2rate(plcp, IEEE80211_T_OFDM); > else > - rate = bwi_plcp2rate(plcp, IEEE80211_MODE_11B); > + rate = bwi_plcp2rate(plcp, IEEE80211_T_CCK); > > /* RX radio tap */ > if (ieee80211_radiotap_active(ic)) > @@ -3801,10 +3801,10 @@ bwi_calc_noise(struct bwi_softc *sc) > } > > static __inline uint8_t > -bwi_plcp2rate(const uint32_t plcp0, enum ieee80211_phymode phymode) > +bwi_plcp2rate(const uint32_t plcp0, enum ieee80211_phytype type) > { > - uint32_t plcp = le32toh(plcp0) & IEEE80211_OFDM_PLCP_RATE_MASK; > - return (ieee80211_plcp2rate(plcp, phymode)); > + uint32_t plcp = le32toh(plcp0) & IEEE80211_OFDM_PLCP_RATE_MASK; > + return (ieee80211_plcp2rate(plcp, type)); > } > > static void > > Modified: head/sys/dev/bwn/if_bwn.c > ============================================================================== > --- head/sys/dev/bwn/if_bwn.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/bwn/if_bwn.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -193,8 +193,8 @@ static void bwn_scan_start(struct ieee80 > static void bwn_scan_end(struct ieee80211com *); > static void bwn_set_channel(struct ieee80211com *); > static struct ieee80211vap *bwn_vap_create(struct ieee80211com *, > - const char [IFNAMSIZ], int, int, > - int, const uint8_t [IEEE80211_ADDR_LEN], > + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > const uint8_t [IEEE80211_ADDR_LEN]); > static void bwn_vap_delete(struct ieee80211vap *); > static void bwn_stop(struct bwn_softc *, int); > @@ -2927,10 +2927,10 @@ fail: > } > > static struct ieee80211vap * > -bwn_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac0[IEEE80211_ADDR_LEN]) > +bwn_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac0[IEEE80211_ADDR_LEN]) > { > struct ifnet *ifp = ic->ic_ifp; > struct bwn_softc *sc = ifp->if_softc; > > Modified: head/sys/dev/if_ndis/if_ndis.c > ============================================================================== > --- head/sys/dev/if_ndis/if_ndis.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/if_ndis/if_ndis.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -150,9 +150,9 @@ static funcptr ndis_resettask_wrap; > static funcptr ndis_inputtask_wrap; > > static struct ieee80211vap *ndis_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, > - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void ndis_vap_delete (struct ieee80211vap *); > static void ndis_tick (void *); > static void ndis_ticktask (device_object *, void *); > @@ -973,10 +973,10 @@ fail: > } > > static struct ieee80211vap * > -ndis_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]) > +ndis_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac[IEEE80211_ADDR_LEN]) > { > struct ndis_vap *nvp; > struct ieee80211vap *vap; > > Modified: head/sys/dev/ipw/if_ipw.c > ============================================================================== > --- head/sys/dev/ipw/if_ipw.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/ipw/if_ipw.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -108,9 +108,9 @@ static const struct ipw_ident ipw_ident_ > }; > > static struct ieee80211vap *ipw_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void ipw_vap_delete(struct ieee80211vap *); > static int ipw_dma_alloc(struct ipw_softc *); > static void ipw_release(struct ipw_softc *); > @@ -428,10 +428,10 @@ ipw_detach(device_t dev) > } > > static struct ieee80211vap * > -ipw_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]) > +ipw_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac[IEEE80211_ADDR_LEN]) > { > struct ifnet *ifp = ic->ic_ifp; > struct ipw_softc *sc = ifp->if_softc; > > Modified: head/sys/dev/iwi/if_iwi.c > ============================================================================== > --- head/sys/dev/iwi/if_iwi.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/iwi/if_iwi.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -129,9 +129,9 @@ static const struct iwi_ident iwi_ident_ > }; > > static struct ieee80211vap *iwi_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void iwi_vap_delete(struct ieee80211vap *); > static void iwi_dma_map_addr(void *, bus_dma_segment_t *, int, int); > static int iwi_alloc_cmd_ring(struct iwi_softc *, struct iwi_cmd_ring *, > @@ -495,10 +495,10 @@ iwi_detach(device_t dev) > } > > static struct ieee80211vap * > -iwi_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]) > +iwi_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac[IEEE80211_ADDR_LEN]) > { > struct ifnet *ifp = ic->ic_ifp; > struct iwi_softc *sc = ifp->if_softc; > > Modified: head/sys/dev/iwn/if_iwn.c > ============================================================================== > --- head/sys/dev/iwn/if_iwn.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/iwn/if_iwn.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -116,9 +116,9 @@ static int iwn5000_attach(struct iwn_sof > static void iwn_radiotap_attach(struct iwn_softc *); > static void iwn_sysctlattach(struct iwn_softc *); > static struct ieee80211vap *iwn_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, > - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void iwn_vap_delete(struct ieee80211vap *); > static int iwn_detach(device_t); > static int iwn_shutdown(device_t); > @@ -845,8 +845,8 @@ iwn_sysctlattach(struct iwn_softc *sc) > } > > static struct ieee80211vap * > -iwn_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > +iwn_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > const uint8_t bssid[IEEE80211_ADDR_LEN], > const uint8_t mac[IEEE80211_ADDR_LEN]) > { > > Modified: head/sys/dev/malo/if_malo.c > ============================================================================== > --- head/sys/dev/malo/if_malo.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/malo/if_malo.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -125,10 +125,10 @@ enum { > > static MALLOC_DEFINE(M_MALODEV, "malodev", "malo driver dma buffers"); > > -static struct ieee80211vap *malo_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > +static struct ieee80211vap *malo_vap_create(struct ieee80211com *, > + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void malo_vap_delete(struct ieee80211vap *); > static int malo_dma_setup(struct malo_softc *); > static int malo_setup_hwdma(struct malo_softc *); > @@ -344,10 +344,10 @@ bad: > } > > static struct ieee80211vap * > -malo_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]) > +malo_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac[IEEE80211_ADDR_LEN]) > { > struct ifnet *ifp = ic->ic_ifp; > struct malo_vap *mvp; > > Modified: head/sys/dev/mwl/if_mwl.c > ============================================================================== > --- head/sys/dev/mwl/if_mwl.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/mwl/if_mwl.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -83,9 +83,9 @@ __FBSDID("$FreeBSD$"); > #define SM(v,x) (((v) << x##_S) & x) > > static struct ieee80211vap *mwl_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, > - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void mwl_vap_delete(struct ieee80211vap *); > static int mwl_setupdma(struct mwl_softc *); > static int mwl_hal_reset(struct mwl_softc *sc); > @@ -601,10 +601,10 @@ reclaim_address(struct mwl_softc *sc, ui > } > > static struct ieee80211vap * > -mwl_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac0[IEEE80211_ADDR_LEN]) > +mwl_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac0[IEEE80211_ADDR_LEN]) > { > struct ifnet *ifp = ic->ic_ifp; > struct mwl_softc *sc = ifp->if_softc; > > Modified: head/sys/dev/ral/rt2560.c > ============================================================================== > --- head/sys/dev/ral/rt2560.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/ral/rt2560.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -85,9 +85,9 @@ __FBSDID("$FreeBSD$"); > #endif > > static struct ieee80211vap *rt2560_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, > - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, > + int, const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void rt2560_vap_delete(struct ieee80211vap *); > static void rt2560_dma_map_addr(void *, bus_dma_segment_t *, int, > int); > @@ -373,10 +373,10 @@ rt2560_detach(void *xsc) > } > > static struct ieee80211vap * > -rt2560_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]) > +rt2560_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac[IEEE80211_ADDR_LEN]) > { > struct ifnet *ifp = ic->ic_ifp; > struct rt2560_vap *rvp; > > Modified: head/sys/dev/ral/rt2661.c > ============================================================================== > --- head/sys/dev/ral/rt2661.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/ral/rt2661.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -82,9 +82,9 @@ __FBSDID("$FreeBSD$"); > #endif > > static struct ieee80211vap *rt2661_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, > - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, > + int, const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void rt2661_vap_delete(struct ieee80211vap *); > static void rt2661_dma_map_addr(void *, bus_dma_segment_t *, int, > int); > @@ -368,10 +368,10 @@ rt2661_detach(void *xsc) > } > > static struct ieee80211vap * > -rt2661_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]) > +rt2661_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac[IEEE80211_ADDR_LEN]) > { > struct ifnet *ifp = ic->ic_ifp; > struct rt2661_vap *rvp; > > Modified: head/sys/dev/usb/wlan/if_rum.c > ============================================================================== > --- head/sys/dev/usb/wlan/if_rum.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/usb/wlan/if_rum.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -152,9 +152,9 @@ static usb_callback_t rum_bulk_write_cal > static usb_error_t rum_do_request(struct rum_softc *sc, > struct usb_device_request *req, void *data); > static struct ieee80211vap *rum_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, > - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, > + int, const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void rum_vap_delete(struct ieee80211vap *); > static void rum_tx_free(struct rum_tx_data *, int); > static void rum_setup_tx_list(struct rum_softc *); > @@ -580,10 +580,10 @@ rum_do_request(struct rum_softc *sc, > } > > static struct ieee80211vap * > -rum_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]) > +rum_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac[IEEE80211_ADDR_LEN]) > { > struct rum_softc *sc = ic->ic_ifp->if_softc; > struct rum_vap *rvp; > > Modified: head/sys/dev/usb/wlan/if_run.c > ============================================================================== > --- head/sys/dev/usb/wlan/if_run.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/usb/wlan/if_run.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -315,9 +315,9 @@ static usb_callback_t run_bulk_tx_callba > static void run_bulk_tx_callbackN(struct usb_xfer *xfer, > usb_error_t error, unsigned int index); > static struct ieee80211vap *run_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t > - mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void run_vap_delete(struct ieee80211vap *); > static void run_cmdq_cb(void *, int); > static void run_setup_tx_list(struct run_softc *, > @@ -748,8 +748,8 @@ run_detach(device_t self) > } > > static struct ieee80211vap * > -run_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > +run_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > const uint8_t bssid[IEEE80211_ADDR_LEN], > const uint8_t mac[IEEE80211_ADDR_LEN]) > { > > Modified: head/sys/dev/usb/wlan/if_uath.c > ============================================================================== > --- head/sys/dev/usb/wlan/if_uath.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/usb/wlan/if_uath.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -254,9 +254,9 @@ static const struct usb_config uath_usbc > }; > > static struct ieee80211vap *uath_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, > - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void uath_vap_delete(struct ieee80211vap *); > static int uath_alloc_cmd_list(struct uath_softc *, struct uath_cmd [], > int, int); > @@ -1065,10 +1065,10 @@ uath_free_tx_data_list(struct uath_softc > } > > static struct ieee80211vap * > -uath_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]) > +uath_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac[IEEE80211_ADDR_LEN]) > { > struct uath_vap *uvp; > struct ieee80211vap *vap; > > Modified: head/sys/dev/usb/wlan/if_upgt.c > ============================================================================== > --- head/sys/dev/usb/wlan/if_upgt.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/usb/wlan/if_upgt.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -138,9 +138,9 @@ static void upgt_scan_start(struct ieee8 > static void upgt_scan_end(struct ieee80211com *); > static void upgt_set_channel(struct ieee80211com *); > static struct ieee80211vap *upgt_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, > - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void upgt_vap_delete(struct ieee80211vap *); > static void upgt_update_mcast(struct ifnet *); > static uint8_t upgt_rx_rate(struct upgt_softc *, const int); > @@ -1014,10 +1014,10 @@ upgt_set_chan(struct upgt_softc *sc, str > } > > static struct ieee80211vap * > -upgt_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]) > +upgt_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac[IEEE80211_ADDR_LEN]) > { > struct upgt_vap *uvp; > struct ieee80211vap *vap; > > Modified: head/sys/dev/usb/wlan/if_ural.c > ============================================================================== > --- head/sys/dev/usb/wlan/if_ural.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/usb/wlan/if_ural.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -131,9 +131,9 @@ static usb_callback_t ural_bulk_write_ca > static usb_error_t ural_do_request(struct ural_softc *sc, > struct usb_device_request *req, void *data); > static struct ieee80211vap *ural_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, > - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, > + int, const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void ural_vap_delete(struct ieee80211vap *); > static void ural_tx_free(struct ural_tx_data *, int); > static void ural_setup_tx_list(struct ural_softc *); > @@ -568,10 +568,10 @@ ural_do_request(struct ural_softc *sc, > } > > static struct ieee80211vap * > -ural_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]) > +ural_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac[IEEE80211_ADDR_LEN]) > { > struct ural_softc *sc = ic->ic_ifp->if_softc; > struct ural_vap *uvp; > > Modified: head/sys/dev/usb/wlan/if_urtw.c > ============================================================================== > --- head/sys/dev/usb/wlan/if_urtw.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/usb/wlan/if_urtw.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -649,9 +649,9 @@ static const struct usb_config urtw_8187 > }; > > static struct ieee80211vap *urtw_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, > - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, > + int, const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void urtw_vap_delete(struct ieee80211vap *); > static void urtw_init(void *); > static void urtw_stop(struct ifnet *, int); > @@ -993,10 +993,10 @@ urtw_free_data_list(struct urtw_softc *s > } > > static struct ieee80211vap * > -urtw_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]) > +urtw_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac[IEEE80211_ADDR_LEN]) > { > struct urtw_vap *uvp; > struct ieee80211vap *vap; > > Modified: head/sys/dev/usb/wlan/if_zyd.c > ============================================================================== > --- head/sys/dev/usb/wlan/if_zyd.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/usb/wlan/if_zyd.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -118,9 +118,9 @@ static usb_callback_t zyd_bulk_read_call > static usb_callback_t zyd_bulk_write_callback; > > static struct ieee80211vap *zyd_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, > - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void zyd_vap_delete(struct ieee80211vap *); > static void zyd_tx_free(struct zyd_tx_data *, int); > static void zyd_setup_tx_list(struct zyd_softc *); > @@ -456,10 +456,10 @@ zyd_detach(device_t dev) > } > > static struct ieee80211vap * > -zyd_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]) > +zyd_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac[IEEE80211_ADDR_LEN]) > { > struct zyd_vap *zvp; > struct ieee80211vap *vap; > > Modified: head/sys/dev/wi/if_wi.c > ============================================================================== > --- head/sys/dev/wi/if_wi.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/wi/if_wi.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -108,10 +108,10 @@ __FBSDID("$FreeBSD$"); > #include <dev/wi/if_wireg.h> > #include <dev/wi/if_wivar.h> > > -static struct ieee80211vap *wi_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > +static struct ieee80211vap *wi_vap_create(struct ieee80211com *, > + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void wi_vap_delete(struct ieee80211vap *vap); > static void wi_stop_locked(struct wi_softc *sc, int disable); > static void wi_start_locked(struct ifnet *); > @@ -507,10 +507,10 @@ wi_detach(device_t dev) > } > > static struct ieee80211vap * > -wi_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]) > +wi_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac[IEEE80211_ADDR_LEN]) > { > struct wi_softc *sc = ic->ic_ifp->if_softc; > struct wi_vap *wvp; > > Modified: head/sys/dev/wpi/if_wpi.c > ============================================================================== > --- head/sys/dev/wpi/if_wpi.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/dev/wpi/if_wpi.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -157,9 +157,9 @@ static const struct wpi_ident wpi_ident_ > }; > > static struct ieee80211vap *wpi_vap_create(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, int opmode, > - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > static void wpi_vap_delete(struct ieee80211vap *); > static int wpi_dma_contig_alloc(struct wpi_softc *, struct wpi_dma_info *, > void **, bus_size_t, bus_size_t, int); > @@ -760,10 +760,10 @@ wpi_detach(device_t dev) > } > > static struct ieee80211vap * > -wpi_vap_create(struct ieee80211com *ic, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t mac[IEEE80211_ADDR_LEN]) > +wpi_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > + const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t mac[IEEE80211_ADDR_LEN]) > { > struct wpi_vap *wvp; > struct ieee80211vap *vap; > > Modified: head/sys/net80211/ieee80211.c > ============================================================================== > --- head/sys/net80211/ieee80211.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/net80211/ieee80211.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -384,9 +384,9 @@ default_reset(struct ieee80211vap *vap, > */ > int > ieee80211_vap_setup(struct ieee80211com *ic, struct ieee80211vap *vap, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t macaddr[IEEE80211_ADDR_LEN]) > + const char name[IFNAMSIZ], int unit, enum ieee80211_opmode opmode, > + int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], > + const uint8_t macaddr[IEEE80211_ADDR_LEN]) > { > struct ifnet *ifp; > > @@ -447,6 +447,8 @@ ieee80211_vap_setup(struct ieee80211com > } > break; > #endif > + default: > + break; > } > /* auto-enable s/w beacon miss support */ > if (flags & IEEE80211_CLONE_NOBEACONS) > @@ -1008,7 +1010,8 @@ ieee80211_media_setup(struct ieee80211co > struct ifmedia *media, int caps, int addsta, > ifm_change_cb_t media_change, ifm_stat_cb_t media_stat) > { > - int i, j, mode, rate, maxrate, mword, r; > + int i, j, rate, maxrate, mword, r; > + enum ieee80211_phymode mode; > const struct ieee80211_rateset *rs; > struct ieee80211_rateset allrates; > > @@ -1137,7 +1140,8 @@ void > ieee80211_announce(struct ieee80211com *ic) > { > struct ifnet *ifp = ic->ic_ifp; > - int i, mode, rate, mword; > + int i, rate, mword; > + enum ieee80211_phymode mode; > const struct ieee80211_rateset *rs; > > /* NB: skip AUTO since it has no rates */ > > Modified: head/sys/net80211/ieee80211_ht.c > ============================================================================== > --- head/sys/net80211/ieee80211_ht.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/net80211/ieee80211_ht.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -307,7 +307,8 @@ ieee80211_ht_vdetach(struct ieee80211vap > } > > static int > -ht_getrate(struct ieee80211com *ic, int index, int mode, int ratetype) > +ht_getrate(struct ieee80211com *ic, int index, enum ieee80211_phymode mode, > + int ratetype) > { > int mword, rate; > > @@ -350,7 +351,7 @@ static struct printranges { > }; > > static void > -ht_rateprint(struct ieee80211com *ic, int mode, int ratetype) > +ht_rateprint(struct ieee80211com *ic, enum ieee80211_phymode mode, int ratetype) > { > struct ifnet *ifp = ic->ic_ifp; > int minrate, maxrate; > @@ -379,7 +380,7 @@ ht_rateprint(struct ieee80211com *ic, in > } > > static void > -ht_announce(struct ieee80211com *ic, int mode) > +ht_announce(struct ieee80211com *ic, enum ieee80211_phymode mode) > { > struct ifnet *ifp = ic->ic_ifp; > const char *modestr = ieee80211_phymode_name[mode]; > > Modified: head/sys/net80211/ieee80211_ioctl.c > ============================================================================== > --- head/sys/net80211/ieee80211_ioctl.c Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/net80211/ieee80211_ioctl.c Sat Dec 17 10:23:17 2011 (r228621) > @@ -2737,7 +2737,7 @@ ieee80211_ioctl_set80211(struct ieee8021 > case IEEE80211_IOC_PROTMODE: > if (ireq->i_val > IEEE80211_PROT_RTSCTS) > return EINVAL; > - ic->ic_protmode = ireq->i_val; > + ic->ic_protmode = (enum ieee80211_protmode)ireq->i_val; > /* NB: if not operating in 11g this can wait */ > if (ic->ic_bsschan != IEEE80211_CHAN_ANYC && > IEEE80211_IS_CHAN_ANYG(ic->ic_bsschan)) > @@ -2756,7 +2756,7 @@ ieee80211_ioctl_set80211(struct ieee8021 > if (!(IEEE80211_ROAMING_DEVICE <= ireq->i_val && > ireq->i_val <= IEEE80211_ROAMING_MANUAL)) > return EINVAL; > - vap->iv_roaming = ireq->i_val; > + vap->iv_roaming = (enum ieee80211_roamingmode)ireq->i_val; > /* XXXX reset? */ > break; > case IEEE80211_IOC_PRIVACY: > > Modified: head/sys/net80211/ieee80211_var.h > ============================================================================== > --- head/sys/net80211/ieee80211_var.h Sat Dec 17 06:57:35 2011 (r228620) > +++ head/sys/net80211/ieee80211_var.h Sat Dec 17 10:23:17 2011 (r228621) > @@ -228,10 +228,10 @@ struct ieee80211com { > > /* virtual ap create/delete */ > struct ieee80211vap* (*ic_vap_create)(struct ieee80211com *, > - const char name[IFNAMSIZ], int unit, > - int opmode, int flags, > - const uint8_t bssid[IEEE80211_ADDR_LEN], > - const uint8_t macaddr[IEEE80211_ADDR_LEN]); > + const char [IFNAMSIZ], int, > + enum ieee80211_opmode, int, > + const uint8_t [IEEE80211_ADDR_LEN], > + const uint8_t [IEEE80211_ADDR_LEN]); > void (*ic_vap_delete)(struct ieee80211vap *); > /* operating mode attachment */ > ieee80211vap_attach ic_vattach[IEEE80211_OPMODE_MAX]; > @@ -662,7 +662,8 @@ void ieee80211_ifattach(struct ieee80211 > const uint8_t macaddr[IEEE80211_ADDR_LEN]); > void ieee80211_ifdetach(struct ieee80211com *); > int ieee80211_vap_setup(struct ieee80211com *, struct ieee80211vap *, > - const char name[IFNAMSIZ], int unit, int opmode, int flags, > + const char name[IFNAMSIZ], int unit, > + enum ieee80211_opmode opmode, int flags, > const uint8_t bssid[IEEE80211_ADDR_LEN], > const uint8_t macaddr[IEEE80211_ADDR_LEN]); > int ieee80211_vap_attach(struct ieee80211vap *,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111217105405.GA18782>