From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 09:15:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 605551065673; Sat, 28 Apr 2012 09:15:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4257E8FC18; Sat, 28 Apr 2012 09:15:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S9F2GC051839; Sat, 28 Apr 2012 09:15:02 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S9F1VD051812; Sat, 28 Apr 2012 09:15:01 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204280915.q3S9F1VD051812@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Apr 2012 09:15:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234753 - in stable/9/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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 09:15:02 -0000 Author: dim Date: Sat Apr 28 09:15:01 2012 New Revision: 234753 URL: http://svn.freebsd.org/changeset/base/234753 Log: MFC r225941: Fix an unaligned access issue; tidy up OFDM/DS rate decoding from the PLCP. This fixes a panic on PPC. Submitted by: novel Obtained from: OpenBSD, sys/dev/ic/bwi.c r1.89 MFC r226181: Update from OpenBSD: Include 0x4402 in the bbp id mapping table used on older devices. http://bcm-specs.sipsolutions.net/BackPlane agrees. Obtained from: OpenBSD, sys/dev/ic/bwi.c r1.88 MFC r226182: Fix an incorrect use of sizeof(). Obtained from: OpenBSD sys/dev/ic/bwi.c r1.87 MFC r228621: 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@ Modified: stable/9/sys/dev/an/if_an.c stable/9/sys/dev/ath/if_ath.c stable/9/sys/dev/bwi/bwiphy.c stable/9/sys/dev/bwi/if_bwi.c stable/9/sys/dev/bwn/if_bwn.c stable/9/sys/dev/if_ndis/if_ndis.c stable/9/sys/dev/ipw/if_ipw.c stable/9/sys/dev/iwi/if_iwi.c stable/9/sys/dev/iwn/if_iwn.c stable/9/sys/dev/malo/if_malo.c stable/9/sys/dev/mwl/if_mwl.c stable/9/sys/dev/ral/rt2560.c stable/9/sys/dev/ral/rt2661.c stable/9/sys/dev/usb/wlan/if_rum.c stable/9/sys/dev/usb/wlan/if_run.c stable/9/sys/dev/usb/wlan/if_uath.c stable/9/sys/dev/usb/wlan/if_upgt.c stable/9/sys/dev/usb/wlan/if_ural.c stable/9/sys/dev/usb/wlan/if_urtw.c stable/9/sys/dev/usb/wlan/if_zyd.c stable/9/sys/dev/wi/if_wi.c stable/9/sys/dev/wpi/if_wpi.c stable/9/sys/net80211/ieee80211.c stable/9/sys/net80211/ieee80211_ht.c stable/9/sys/net80211/ieee80211_ioctl.c stable/9/sys/net80211/ieee80211_var.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/an/if_an.c ============================================================================== --- stable/9/sys/dev/an/if_an.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/an/if_an.c Sat Apr 28 09:15:01 2012 (r234753) @@ -796,7 +796,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 ? " " : ""), @@ -3298,7 +3298,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: stable/9/sys/dev/ath/if_ath.c ============================================================================== --- stable/9/sys/dev/ath/if_ath.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/ath/if_ath.c Sat Apr 28 09:15:01 2012 (r234753) @@ -119,9 +119,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 *); @@ -849,16 +849,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: stable/9/sys/dev/bwi/bwiphy.c ============================================================================== --- stable/9/sys/dev/bwi/bwiphy.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/bwi/bwiphy.c Sat Apr 28 09:15:01 2012 (r234753) @@ -796,7 +796,7 @@ bwi_phy_config_11g(struct bwi_mac *mac) bwi_tbl_write_2(mac, BWI_PHYTBL_RSSI + i, i); /* Fill noise table */ - for (i = 0; i < sizeof(bwi_phy_noise_11g); ++i) { + for (i = 0; i < N(bwi_phy_noise_11g); ++i) { bwi_tbl_write_2(mac, BWI_PHYTBL_NOISE + i, bwi_phy_noise_11g[i]); } Modified: stable/9/sys/dev/bwi/if_bwi.c ============================================================================== --- stable/9/sys/dev/bwi/if_bwi.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/bwi/if_bwi.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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,8 +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_ofdm_plcp2rate(const uint32_t *); -static __inline uint8_t bwi_ds_plcp2rate(const struct ieee80211_ds_plcp_hdr *); +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); @@ -221,7 +220,7 @@ static const struct { } bwi_bbpid_map[] = { { 0x4301, 0x4301, 0x4301 }, { 0x4305, 0x4307, 0x4307 }, - { 0x4403, 0x4403, 0x4402 }, + { 0x4402, 0x4403, 0x4402 }, { 0x4610, 0x4615, 0x4610 }, { 0x4710, 0x4715, 0x4710 }, { 0x4720, 0x4725, 0x4309 } @@ -592,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; @@ -2629,7 +2628,7 @@ bwi_rxeof(struct bwi_softc *sc, int end_ struct ieee80211_frame_min *wh; struct ieee80211_node *ni; struct mbuf *m; - const void *plcp; + uint32_t plcp; uint16_t flags2; int buflen, wh_ofs, hdr_extra, rssi, noise, type, rate; @@ -2659,7 +2658,7 @@ bwi_rxeof(struct bwi_softc *sc, int end_ goto next; } - plcp = ((const uint8_t *)(hdr + 1) + hdr_extra); + bcopy((uint8_t *)(hdr + 1) + hdr_extra, &plcp, sizeof(plcp)); rssi = bwi_calc_rssi(sc, hdr); noise = bwi_calc_noise(sc); @@ -2668,13 +2667,13 @@ 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_ofdm_plcp2rate(plcp); + rate = bwi_plcp2rate(plcp, IEEE80211_T_OFDM); else - rate = bwi_ds_plcp2rate(plcp); + rate = bwi_plcp2rate(plcp, IEEE80211_T_CCK); /* RX radio tap */ if (ieee80211_radiotap_active(ic)) - bwi_rx_radiotap(sc, m, hdr, plcp, rate, rssi, noise); + bwi_rx_radiotap(sc, m, hdr, &plcp, rate, rssi, noise); m_adj(m, -IEEE80211_CRC_LEN); @@ -3802,20 +3801,10 @@ bwi_calc_noise(struct bwi_softc *sc) } static __inline uint8_t -bwi_ofdm_plcp2rate(const uint32_t *plcp0) +bwi_plcp2rate(const uint32_t plcp0, enum ieee80211_phytype type) { - uint32_t plcp; - uint8_t plcp_rate; - - plcp = le32toh(*plcp0); - plcp_rate = __SHIFTOUT(plcp, IEEE80211_OFDM_PLCP_RATE_MASK); - return ieee80211_plcp2rate(plcp_rate, IEEE80211_T_OFDM); -} - -static __inline uint8_t -bwi_ds_plcp2rate(const struct ieee80211_ds_plcp_hdr *hdr) -{ - return ieee80211_plcp2rate(hdr->i_signal, IEEE80211_T_DS); + uint32_t plcp = le32toh(plcp0) & IEEE80211_OFDM_PLCP_RATE_MASK; + return (ieee80211_plcp2rate(plcp, type)); } static void Modified: stable/9/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/9/sys/dev/bwn/if_bwn.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/bwn/if_bwn.c Sat Apr 28 09:15:01 2012 (r234753) @@ -192,8 +192,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); @@ -2926,10 +2926,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: stable/9/sys/dev/if_ndis/if_ndis.c ============================================================================== --- stable/9/sys/dev/if_ndis/if_ndis.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/if_ndis/if_ndis.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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: stable/9/sys/dev/ipw/if_ipw.c ============================================================================== --- stable/9/sys/dev/ipw/if_ipw.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/ipw/if_ipw.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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: stable/9/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/9/sys/dev/iwi/if_iwi.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/iwi/if_iwi.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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: stable/9/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/9/sys/dev/iwn/if_iwn.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/iwn/if_iwn.c Sat Apr 28 09:15:01 2012 (r234753) @@ -118,9 +118,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); @@ -847,8 +847,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: stable/9/sys/dev/malo/if_malo.c ============================================================================== --- stable/9/sys/dev/malo/if_malo.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/malo/if_malo.c Sat Apr 28 09:15:01 2012 (r234753) @@ -125,10 +125,10 @@ enum { 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: stable/9/sys/dev/mwl/if_mwl.c ============================================================================== --- stable/9/sys/dev/mwl/if_mwl.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/mwl/if_mwl.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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: stable/9/sys/dev/ral/rt2560.c ============================================================================== --- stable/9/sys/dev/ral/rt2560.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/ral/rt2560.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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: stable/9/sys/dev/ral/rt2661.c ============================================================================== --- stable/9/sys/dev/ral/rt2661.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/ral/rt2661.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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: stable/9/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_rum.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/usb/wlan/if_rum.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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: stable/9/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_run.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/usb/wlan/if_run.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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 *, @@ -742,8 +742,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: stable/9/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_uath.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/usb/wlan/if_uath.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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: stable/9/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_upgt.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/usb/wlan/if_upgt.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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: stable/9/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_ural.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/usb/wlan/if_ural.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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: stable/9/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_urtw.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/usb/wlan/if_urtw.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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: stable/9/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_zyd.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/usb/wlan/if_zyd.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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: stable/9/sys/dev/wi/if_wi.c ============================================================================== --- stable/9/sys/dev/wi/if_wi.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/wi/if_wi.c Sat Apr 28 09:15:01 2012 (r234753) @@ -108,10 +108,10 @@ __FBSDID("$FreeBSD$"); #include #include -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 *); @@ -506,10 +506,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: stable/9/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/9/sys/dev/wpi/if_wpi.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/wpi/if_wpi.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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: stable/9/sys/net80211/ieee80211.c ============================================================================== --- stable/9/sys/net80211/ieee80211.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/net80211/ieee80211.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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: stable/9/sys/net80211/ieee80211_ht.c ============================================================================== --- stable/9/sys/net80211/ieee80211_ht.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/net80211/ieee80211_ht.c Sat Apr 28 09:15:01 2012 (r234753) @@ -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: stable/9/sys/net80211/ieee80211_ioctl.c ============================================================================== --- stable/9/sys/net80211/ieee80211_ioctl.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/net80211/ieee80211_ioctl.c Sat Apr 28 09:15:01 2012 (r234753) @@ -2722,7 +2722,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)) @@ -2741,7 +2741,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: stable/9/sys/net80211/ieee80211_var.h ============================================================================== --- stable/9/sys/net80211/ieee80211_var.h Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/net80211/ieee80211_var.h Sat Apr 28 09:15:01 2012 (r234753) @@ -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]; @@ -652,7 +652,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 *,