Date: Mon, 25 May 2015 19:53:30 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283540 - in head/sys: dev/ath dev/bwi dev/bwn dev/if_ndis dev/iwn dev/malo dev/mwl dev/ral dev/usb/wlan dev/wi dev/wpi dev/wtap net80211 Message-ID: <201505251953.t4PJrU2E023830@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Mon May 25 19:53:29 2015 New Revision: 283540 URL: https://svnweb.freebsd.org/changeset/base/283540 Log: Change three methods in struct ieee80211com, namely ic_updateslot, ic_update_mcast and ic_update_promisc, to pass pointer to the ieee80211com, not to the ifnet. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: 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/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/ral/rt2860.c head/sys/dev/usb/wlan/if_rsu.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_urtwn.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/dev/wtap/if_wtap.c head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211_proto.c head/sys/net80211/ieee80211_var.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/ath/if_ath.c Mon May 25 19:53:29 2015 (r283540) @@ -166,9 +166,9 @@ static void ath_bmiss_proc(void *, int); static void ath_key_update_begin(struct ieee80211vap *); static void ath_key_update_end(struct ieee80211vap *); static void ath_update_mcast_hw(struct ath_softc *); -static void ath_update_mcast(struct ifnet *); -static void ath_update_promisc(struct ifnet *); -static void ath_updateslot(struct ifnet *); +static void ath_update_mcast(struct ieee80211com *); +static void ath_update_promisc(struct ieee80211com *); +static void ath_updateslot(struct ieee80211com *); static void ath_bstuck_proc(void *, int); static void ath_reset_proc(void *, int); static int ath_desc_alloc(struct ath_softc *); @@ -3547,9 +3547,9 @@ ath_key_update_end(struct ieee80211vap * } static void -ath_update_promisc(struct ifnet *ifp) +ath_update_promisc(struct ieee80211com *ic) { - struct ath_softc *sc = ifp->if_softc; + struct ath_softc *sc = ic->ic_softc; u_int32_t rfilt; /* configure rx filter */ @@ -3611,9 +3611,9 @@ ath_update_mcast_hw(struct ath_softc *sc * awake before operating. */ static void -ath_update_mcast(struct ifnet *ifp) +ath_update_mcast(struct ieee80211com *ic) { - struct ath_softc *sc = ifp->if_softc; + struct ath_softc *sc = ic->ic_softc; ATH_LOCK(sc); ath_power_set_power_state(sc, HAL_PM_AWAKE); @@ -3697,10 +3697,9 @@ ath_setslottime(struct ath_softc *sc) * slot time based on the current setting. */ static void -ath_updateslot(struct ifnet *ifp) +ath_updateslot(struct ieee80211com *ic) { - struct ath_softc *sc = ifp->if_softc; - struct ieee80211com *ic = ifp->if_l2com; + struct ath_softc *sc = ic->ic_softc; /* * When not coordinating the BSS, change the hardware Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/bwi/if_bwi.c Mon May 25 19:53:29 2015 (r283540) @@ -113,7 +113,7 @@ static void bwi_scan_start(struct ieee80 static void bwi_set_channel(struct ieee80211com *); static void bwi_scan_end(struct ieee80211com *); static int bwi_newstate(struct ieee80211vap *, enum ieee80211_state, int); -static void bwi_updateslot(struct ifnet *); +static void bwi_updateslot(struct ieee80211com *); static int bwi_media_change(struct ifnet *); static void bwi_calibrate(void *); @@ -3735,14 +3735,13 @@ bwi_set_bssid(struct bwi_softc *sc, cons } static void -bwi_updateslot(struct ifnet *ifp) +bwi_updateslot(struct ieee80211com *ic) { - struct bwi_softc *sc = ifp->if_softc; - struct ieee80211com *ic = ifp->if_l2com; + struct bwi_softc *sc = ic->ic_softc; struct bwi_mac *mac; BWI_LOCK(sc); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + if (ic->ic_ifp->if_drv_flags & IFF_DRV_RUNNING) { DPRINTF(sc, BWI_DBG_80211, "%s\n", __func__); KASSERT(sc->sc_cur_regwin->rw_type == BWI_REGWIN_T_MAC, Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/bwn/if_bwn.c Mon May 25 19:53:29 2015 (r283540) @@ -181,8 +181,8 @@ static void bwn_addchannels(struct ieee8 const struct bwn_channelinfo *, int); static int bwn_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); -static void bwn_updateslot(struct ifnet *); -static void bwn_update_promisc(struct ifnet *); +static void bwn_updateslot(struct ieee80211com *); +static void bwn_update_promisc(struct ieee80211com *); static void bwn_wme_init(struct bwn_mac *); static int bwn_wme_update(struct ieee80211com *); static void bwn_wme_clear(struct bwn_softc *); @@ -1252,7 +1252,7 @@ bwn_ioctl(struct ifnet *ifp, u_long cmd, case SIOCSIFFLAGS: startall = 0; if (IS_RUNNING(ifp)) { - bwn_update_promisc(ifp); + bwn_update_promisc(ic); } else if (ifp->if_flags & IFF_UP) { if ((sc->sc_flags & BWN_FLAG_INVALID) == 0) { bwn_init(sc); @@ -2772,14 +2772,13 @@ bwn_raw_xmit(struct ieee80211_node *ni, * like slot time and preamble. */ static void -bwn_updateslot(struct ifnet *ifp) +bwn_updateslot(struct ieee80211com *ic) { - struct bwn_softc *sc = ifp->if_softc; - struct ieee80211com *ic = ifp->if_l2com; + struct bwn_softc *sc = ic->ic_softc; struct bwn_mac *mac; BWN_LOCK(sc); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + if (ic->ic_ifp->if_drv_flags & IFF_DRV_RUNNING) { mac = (struct bwn_mac *)sc->sc_curmac; bwn_set_slot_time(mac, (ic->ic_flags & IEEE80211_F_SHSLOT) ? 9 : 20); @@ -2795,15 +2794,15 @@ bwn_updateslot(struct ifnet *ifp) * mode when operating in hostap mode to do ACS). */ static void -bwn_update_promisc(struct ifnet *ifp) +bwn_update_promisc(struct ieee80211com *ic) { - struct bwn_softc *sc = ifp->if_softc; + struct bwn_softc *sc = ic->ic_softc; struct bwn_mac *mac = sc->sc_curmac; BWN_LOCK(sc); mac = sc->sc_curmac; if (mac != NULL && mac->mac_status >= BWN_MAC_STATUS_INITED) { - if (ifp->if_flags & IFF_PROMISC) + if (ic->ic_ifp->if_flags & IFF_PROMISC) sc->sc_filters |= BWN_MACCTL_PROMISC; else sc->sc_filters &= ~BWN_MACCTL_PROMISC; Modified: head/sys/dev/if_ndis/if_ndis.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/if_ndis/if_ndis.c Mon May 25 19:53:29 2015 (r283540) @@ -159,8 +159,8 @@ static void ndis_tick (void *); static void ndis_ticktask (device_object *, void *); static int ndis_raw_xmit (struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); -static void ndis_update_mcast (struct ifnet *ifp); -static void ndis_update_promisc (struct ifnet *ifp); +static void ndis_update_mcast (struct ieee80211com *); +static void ndis_update_promisc (struct ieee80211com *); static void ndis_start (struct ifnet *); static void ndis_starttask (device_object *, void *); static void ndis_resettask (device_object *, void *); @@ -1773,15 +1773,15 @@ ndis_raw_xmit(struct ieee80211_node *ni, } static void -ndis_update_mcast(struct ifnet *ifp) +ndis_update_mcast(struct ieee80211com *ic) { - struct ndis_softc *sc = ifp->if_softc; + struct ndis_softc *sc = ic->ic_softc; ndis_setmulti(sc); } static void -ndis_update_promisc(struct ifnet *ifp) +ndis_update_promisc(struct ieee80211com *ic) { /* not supported */ } Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/iwn/if_iwn.c Mon May 25 19:53:29 2015 (r283540) @@ -247,7 +247,7 @@ static int iwn_set_link_quality(struct i struct ieee80211_node *); static int iwn_add_broadcast_node(struct iwn_softc *, int); static int iwn_updateedca(struct ieee80211com *); -static void iwn_update_mcast(struct ifnet *); +static void iwn_update_mcast(struct ieee80211com *); static void iwn_set_led(struct iwn_softc *, uint8_t, uint8_t, uint8_t); static int iwn_set_critical_temp(struct iwn_softc *); static int iwn_set_timing(struct iwn_softc *, struct ieee80211_node *); @@ -5278,7 +5278,7 @@ iwn_updateedca(struct ieee80211com *ic) } static void -iwn_update_mcast(struct ifnet *ifp) +iwn_update_mcast(struct ieee80211com *ic) { /* Ignore */ } Modified: head/sys/dev/malo/if_malo.c ============================================================================== --- head/sys/dev/malo/if_malo.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/malo/if_malo.c Mon May 25 19:53:29 2015 (r283540) @@ -133,7 +133,7 @@ static void malo_tx_cleanupq(struct malo static void malo_start(struct ifnet *); static void malo_watchdog(void *); static int malo_ioctl(struct ifnet *, u_long, caddr_t); -static void malo_updateslot(struct ifnet *); +static void malo_updateslot(struct ieee80211com *); static int malo_newstate(struct ieee80211vap *, enum ieee80211_state, int); static void malo_scan_start(struct ieee80211com *); static void malo_scan_end(struct ieee80211com *); @@ -1766,15 +1766,14 @@ malo_ioctl(struct ifnet *ifp, u_long cmd * like slot time and preamble. */ static void -malo_updateslot(struct ifnet *ifp) +malo_updateslot(struct ieee80211com *ic) { - struct malo_softc *sc = ifp->if_softc; - struct ieee80211com *ic = ifp->if_l2com; + struct malo_softc *sc = ic->ic_softc; struct malo_hal *mh = sc->malo_mh; int error; /* NB: can be called early; suppress needless cmds */ - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + if ((ic->ic_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; DPRINTF(sc, MALO_DEBUG_RESET, Modified: head/sys/dev/mwl/if_mwl.c ============================================================================== --- head/sys/dev/mwl/if_mwl.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/mwl/if_mwl.c Mon May 25 19:53:29 2015 (r283540) @@ -113,9 +113,9 @@ static int mwl_key_delete(struct ieee802 static int mwl_key_set(struct ieee80211vap *, const struct ieee80211_key *, const uint8_t mac[IEEE80211_ADDR_LEN]); static int mwl_mode_init(struct mwl_softc *); -static void mwl_update_mcast(struct ifnet *); -static void mwl_update_promisc(struct ifnet *); -static void mwl_updateslot(struct ifnet *); +static void mwl_update_mcast(struct ieee80211com *); +static void mwl_update_promisc(struct ieee80211com *); +static void mwl_updateslot(struct ieee80211com *); static int mwl_beacon_setup(struct ieee80211vap *); static void mwl_beacon_update(struct ieee80211vap *, int); #ifdef MWL_HOST_PS_SUPPORT @@ -1845,9 +1845,9 @@ mwl_mode_init(struct mwl_softc *sc) * Callback from the 802.11 layer after a multicast state change. */ static void -mwl_update_mcast(struct ifnet *ifp) +mwl_update_mcast(struct ieee80211com *ic) { - struct mwl_softc *sc = ifp->if_softc; + struct mwl_softc *sc = ic->ic_softc; mwl_setmcastfilter(sc); } @@ -1860,11 +1860,12 @@ mwl_update_mcast(struct ifnet *ifp) * mode when operating in hostap mode to do ACS). */ static void -mwl_update_promisc(struct ifnet *ifp) +mwl_update_promisc(struct ieee80211com *ic) { - struct mwl_softc *sc = ifp->if_softc; + struct mwl_softc *sc = ic->ic_softc; - mwl_hal_setpromisc(sc->sc_mh, (ifp->if_flags & IFF_PROMISC) != 0); + mwl_hal_setpromisc(sc->sc_mh, + (ic->ic_ifp->if_flags & IFF_PROMISC) != 0); } /* @@ -1874,15 +1875,14 @@ mwl_update_promisc(struct ifnet *ifp) * like slot time and preamble. */ static void -mwl_updateslot(struct ifnet *ifp) +mwl_updateslot(struct ieee80211com *ic) { - struct mwl_softc *sc = ifp->if_softc; - struct ieee80211com *ic = ifp->if_l2com; + struct mwl_softc *sc = ic->ic_softc; struct mwl_hal *mh = sc->sc_mh; int prot; /* NB: can be called early; suppress needless cmds */ - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + if ((ic->ic_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; /* @@ -1940,7 +1940,7 @@ mwl_beacon_update(struct ieee80211vap *v KASSERT(hvap != NULL, ("no beacon")); switch (item) { case IEEE80211_BEACON_ERP: - mwl_updateslot(ic->ic_ifp); + mwl_updateslot(ic); break; case IEEE80211_BEACON_HTINFO: mwl_hal_setnprotmode(hvap, Modified: head/sys/dev/ral/rt2560.c ============================================================================== --- head/sys/dev/ral/rt2560.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/ral/rt2560.c Mon May 25 19:53:29 2015 (r283540) @@ -144,14 +144,14 @@ static void rt2560_disable_rf_tune(stru static void rt2560_enable_tsf_sync(struct rt2560_softc *); static void rt2560_enable_tsf(struct rt2560_softc *); static void rt2560_update_plcp(struct rt2560_softc *); -static void rt2560_update_slot(struct ifnet *); +static void rt2560_update_slot(struct ieee80211com *); static void rt2560_set_basicrates(struct rt2560_softc *, const struct ieee80211_rateset *); static void rt2560_update_led(struct rt2560_softc *, int, int); static void rt2560_set_bssid(struct rt2560_softc *, const uint8_t *); static void rt2560_set_macaddr(struct rt2560_softc *, uint8_t *); static void rt2560_get_macaddr(struct rt2560_softc *, uint8_t *); -static void rt2560_update_promisc(struct ifnet *); +static void rt2560_update_promisc(struct ieee80211com *); static const char *rt2560_get_rf(int); static void rt2560_read_config(struct rt2560_softc *); static int rt2560_bbp_init(struct rt2560_softc *); @@ -1998,7 +1998,7 @@ rt2560_ioctl(struct ifnet *ifp, u_long c rt2560_init_locked(sc); startall = 1; } else - rt2560_update_promisc(ifp); + rt2560_update_promisc(ic); } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) rt2560_stop_locked(sc); @@ -2307,10 +2307,9 @@ rt2560_update_plcp(struct rt2560_softc * * IEEE Std 802.11-1999 pp. 85 to know how these values are computed. */ static void -rt2560_update_slot(struct ifnet *ifp) +rt2560_update_slot(struct ieee80211com *ic) { - struct rt2560_softc *sc = ifp->if_softc; - struct ieee80211com *ic = ifp->if_l2com; + struct rt2560_softc *sc = ic->ic_softc; uint8_t slottime; uint16_t tx_sifs, tx_pifs, tx_difs, eifs; uint32_t tmp; @@ -2437,21 +2436,21 @@ rt2560_get_macaddr(struct rt2560_softc * } static void -rt2560_update_promisc(struct ifnet *ifp) +rt2560_update_promisc(struct ieee80211com *ic) { - struct rt2560_softc *sc = ifp->if_softc; + struct rt2560_softc *sc = ic->ic_softc; uint32_t tmp; tmp = RAL_READ(sc, RT2560_RXCSR0); tmp &= ~RT2560_DROP_NOT_TO_ME; - if (!(ifp->if_flags & IFF_PROMISC)) + if (!(ic->ic_ifp->if_flags & IFF_PROMISC)) tmp |= RT2560_DROP_NOT_TO_ME; RAL_WRITE(sc, RT2560_RXCSR0, tmp); - DPRINTF(sc, "%s promiscuous mode\n", (ifp->if_flags & IFF_PROMISC) ? - "entering" : "leaving"); + DPRINTF(sc, "%s promiscuous mode\n", + (ic->ic_ifp->if_flags & IFF_PROMISC) ? "entering" : "leaving"); } static const char * @@ -2660,7 +2659,7 @@ rt2560_init_locked(struct rt2560_softc * /* set basic rate set (will be updated later) */ RAL_WRITE(sc, RT2560_ARSP_PLCP_1, 0x153); - rt2560_update_slot(ifp); + rt2560_update_slot(ic); rt2560_update_plcp(sc); rt2560_update_led(sc, 0, 0); Modified: head/sys/dev/ral/rt2661.c ============================================================================== --- head/sys/dev/ral/rt2661.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/ral/rt2661.c Mon May 25 19:53:29 2015 (r283540) @@ -147,9 +147,9 @@ static void rt2661_set_bssid(struct rt2 const uint8_t *); static void rt2661_set_macaddr(struct rt2661_softc *, const uint8_t *); -static void rt2661_update_promisc(struct ifnet *); +static void rt2661_update_promisc(struct ieee80211com *); static int rt2661_wme_update(struct ieee80211com *) __unused; -static void rt2661_update_slot(struct ifnet *); +static void rt2661_update_slot(struct ieee80211com *); static const char *rt2661_get_rf(int); static void rt2661_read_eeprom(struct rt2661_softc *, uint8_t macaddr[IEEE80211_ADDR_LEN]); @@ -1736,7 +1736,7 @@ rt2661_ioctl(struct ifnet *ifp, u_long c rt2661_init_locked(sc); startall = 1; } else - rt2661_update_promisc(ifp); + rt2661_update_promisc(ic); } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) rt2661_stop_locked(sc); @@ -2080,21 +2080,21 @@ rt2661_set_macaddr(struct rt2661_softc * } static void -rt2661_update_promisc(struct ifnet *ifp) +rt2661_update_promisc(struct ieee80211com *ic) { - struct rt2661_softc *sc = ifp->if_softc; + struct rt2661_softc *sc = ic->ic_softc; uint32_t tmp; tmp = RAL_READ(sc, RT2661_TXRX_CSR0); tmp &= ~RT2661_DROP_NOT_TO_ME; - if (!(ifp->if_flags & IFF_PROMISC)) + if (!(ic->ic_ifp->if_flags & IFF_PROMISC)) tmp |= RT2661_DROP_NOT_TO_ME; RAL_WRITE(sc, RT2661_TXRX_CSR0, tmp); - DPRINTF(sc, "%s promiscuous mode\n", (ifp->if_flags & IFF_PROMISC) ? - "entering" : "leaving"); + DPRINTF(sc, "%s promiscuous mode\n", + (ic->ic_ifp->if_flags & IFF_PROMISC) ? "entering" : "leaving"); } /* @@ -2144,10 +2144,9 @@ rt2661_wme_update(struct ieee80211com *i } static void -rt2661_update_slot(struct ifnet *ifp) +rt2661_update_slot(struct ieee80211com *ic) { - struct rt2661_softc *sc = ifp->if_softc; - struct ieee80211com *ic = ifp->if_l2com; + struct rt2661_softc *sc = ic->ic_softc; uint8_t slottime; uint32_t tmp; Modified: head/sys/dev/ral/rt2860.c ============================================================================== --- head/sys/dev/ral/rt2860.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/ral/rt2860.c Mon May 25 19:53:29 2015 (r283540) @@ -154,8 +154,8 @@ static void rt2860_set_leds(struct rt286 static void rt2860_set_gp_timer(struct rt2860_softc *, int); static void rt2860_set_bssid(struct rt2860_softc *, const uint8_t *); static void rt2860_set_macaddr(struct rt2860_softc *, const uint8_t *); -static void rt2860_update_promisc(struct ifnet *); -static void rt2860_updateslot(struct ifnet *); +static void rt2860_update_promisc(struct ieee80211com *); +static void rt2860_updateslot(struct ieee80211com *); static void rt2860_updateprot(struct ifnet *); static int rt2860_updateedca(struct ieee80211com *); #ifdef HW_CRYPTO @@ -2053,7 +2053,7 @@ rt2860_ioctl(struct ifnet *ifp, u_long c rt2860_init_locked(sc); startall = 1; } else - rt2860_update_promisc(ifp); + rt2860_update_promisc(ic); } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) rt2860_stop_locked(sc); @@ -3101,10 +3101,9 @@ rt2860_set_macaddr(struct rt2860_softc * } static void -rt2860_updateslot(struct ifnet *ifp) +rt2860_updateslot(struct ieee80211com *ic) { - struct rt2860_softc *sc = ifp->if_softc; - struct ieee80211com *ic = ifp->if_l2com; + struct rt2860_softc *sc = ic->ic_softc; uint32_t tmp; tmp = RAL_READ(sc, RT2860_BKOFF_SLOT_CFG); @@ -3139,14 +3138,14 @@ rt2860_updateprot(struct ifnet *ifp) } static void -rt2860_update_promisc(struct ifnet *ifp) +rt2860_update_promisc(struct ieee80211com *ic) { - struct rt2860_softc *sc = ifp->if_softc; + struct rt2860_softc *sc = ic->ic_softc; uint32_t tmp; tmp = RAL_READ(sc, RT2860_RX_FILTR_CFG); tmp &= ~RT2860_DROP_NOT_MYBSS; - if (!(ifp->if_flags & IFF_PROMISC)) + if (!(ic->ic_ifp->if_flags & IFF_PROMISC)) tmp |= RT2860_DROP_NOT_MYBSS; RAL_WRITE(sc, RT2860_RX_FILTR_CFG, tmp); } Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/usb/wlan/if_rsu.c Mon May 25 19:53:29 2015 (r283540) @@ -142,7 +142,7 @@ static void rsu_vap_delete(struct ieee80 static void rsu_scan_start(struct ieee80211com *); static void rsu_scan_end(struct ieee80211com *); static void rsu_set_channel(struct ieee80211com *); -static void rsu_update_mcast(struct ifnet *); +static void rsu_update_mcast(struct ieee80211com *); static int rsu_alloc_rx_list(struct rsu_softc *); static void rsu_free_rx_list(struct rsu_softc *); static int rsu_alloc_tx_list(struct rsu_softc *); @@ -534,7 +534,7 @@ rsu_set_channel(struct ieee80211com *ic } static void -rsu_update_mcast(struct ifnet *ifp) +rsu_update_mcast(struct ieee80211com *ic) { /* XXX do nothing? */ } Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/usb/wlan/if_rum.c Mon May 25 19:53:29 2015 (r283540) @@ -201,8 +201,8 @@ static void rum_enable_tsf(struct rum_s static void rum_update_slot(struct ifnet *); static void rum_set_bssid(struct rum_softc *, const uint8_t *); static void rum_set_macaddr(struct rum_softc *, const uint8_t *); -static void rum_update_mcast(struct ifnet *); -static void rum_update_promisc(struct ifnet *); +static void rum_update_mcast(struct ieee80211com *); +static void rum_update_promisc(struct ieee80211com *); static void rum_setpromisc(struct rum_softc *); static const char *rum_get_rf(int); static void rum_read_eeprom(struct rum_softc *); @@ -1843,11 +1843,11 @@ rum_setpromisc(struct rum_softc *sc) } static void -rum_update_promisc(struct ifnet *ifp) +rum_update_promisc(struct ieee80211com *ic) { - struct rum_softc *sc = ifp->if_softc; + struct rum_softc *sc = ic->ic_softc; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + if ((ic->ic_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; RUM_LOCK(sc); @@ -1856,12 +1856,12 @@ rum_update_promisc(struct ifnet *ifp) } static void -rum_update_mcast(struct ifnet *ifp) +rum_update_mcast(struct ieee80211com *ic) { static int warning_printed; if (warning_printed == 0) { - if_printf(ifp, "need to implement %s\n", __func__); + ic_printf(ic, "need to implement %s\n", __func__); warning_printed = 1; } } Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/usb/wlan/if_run.c Mon May 25 19:53:29 2015 (r283540) @@ -439,12 +439,12 @@ static void run_set_basicrates(struct ru static void run_set_leds(struct run_softc *, uint16_t); static void run_set_bssid(struct run_softc *, const uint8_t *); static void run_set_macaddr(struct run_softc *, const uint8_t *); -static void run_updateslot(struct ifnet *); +static void run_updateslot(struct ieee80211com *); static void run_updateslot_cb(void *); -static void run_update_mcast(struct ifnet *); +static void run_update_mcast(struct ieee80211com *); static int8_t run_rssi2dbm(struct run_softc *, uint8_t, uint8_t); -static void run_update_promisc_locked(struct ifnet *); -static void run_update_promisc(struct ifnet *); +static void run_update_promisc_locked(struct run_softc *); +static void run_update_promisc(struct ieee80211com *); static void run_rt5390_bbp_init(struct run_softc *); static int run_bbp_init(struct run_softc *); static int run_rt3070_rf_init(struct run_softc *); @@ -2139,7 +2139,7 @@ run_newstate(struct ieee80211vap *vap, e IEEE80211_LOCK(ic); return (-1); } - run_updateslot(ic->ic_ifp); + run_updateslot(ic); run_enable_mrr(sc); run_set_txpreamble(sc); run_set_basicrates(sc); @@ -3787,7 +3787,7 @@ run_ioctl(struct ifnet *ifp, u_long cmd, startall = 1; run_init_locked(sc); } else - run_update_promisc_locked(ifp); + run_update_promisc_locked(sc); } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING && (ic->ic_nrunning == 0 || sc->rvp_cnt <= 1)) { @@ -4903,7 +4903,7 @@ run_update_beacon(struct ieee80211vap *v switch (item) { case IEEE80211_BEACON_ERP: - run_updateslot(ic->ic_ifp); + run_updateslot(ic); break; case IEEE80211_BEACON_HTINFO: run_updateprot(ic); @@ -5064,33 +5064,32 @@ run_reset_livelock(struct run_softc *sc) } static void -run_update_promisc_locked(struct ifnet *ifp) +run_update_promisc_locked(struct run_softc *sc) { - struct run_softc *sc = ifp->if_softc; uint32_t tmp; run_read(sc, RT2860_RX_FILTR_CFG, &tmp); tmp |= RT2860_DROP_UC_NOME; - if (ifp->if_flags & IFF_PROMISC) + if (sc->sc_ifp->if_flags & IFF_PROMISC) tmp &= ~RT2860_DROP_UC_NOME; run_write(sc, RT2860_RX_FILTR_CFG, tmp); - DPRINTF("%s promiscuous mode\n", (ifp->if_flags & IFF_PROMISC) ? + DPRINTF("%s promiscuous mode\n", (sc->sc_ifp->if_flags & IFF_PROMISC) ? "entering" : "leaving"); } static void -run_update_promisc(struct ifnet *ifp) +run_update_promisc(struct ieee80211com *ic) { - struct run_softc *sc = ifp->if_softc; + struct run_softc *sc = ic->ic_softc; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + if ((ic->ic_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; RUN_LOCK(sc); - run_update_promisc_locked(ifp); + run_update_promisc_locked(sc); RUN_UNLOCK(sc); } @@ -5213,16 +5212,15 @@ run_set_macaddr(struct run_softc *sc, co } static void -run_updateslot(struct ifnet *ifp) +run_updateslot(struct ieee80211com *ic) { - struct run_softc *sc = ifp->if_softc; - struct ieee80211com *ic = ifp->if_l2com; + struct run_softc *sc = ic->ic_softc; uint32_t i; i = RUN_CMDQ_GET(&sc->cmdq_store); DPRINTF("cmdq_store=%d\n", i); sc->cmdq[i].func = run_updateslot_cb; - sc->cmdq[i].arg0 = ifp; + sc->cmdq[i].arg0 = ic->ic_ifp; ieee80211_runtask(ic, &sc->cmdq_task); return; @@ -5244,10 +5242,11 @@ run_updateslot_cb(void *arg) } static void -run_update_mcast(struct ifnet *ifp) +run_update_mcast(struct ieee80211com *ic) { + /* h/w filter supports getting everything or nothing */ - ifp->if_flags |= IFF_ALLMULTI; + ic->ic_ifp->if_flags |= IFF_ALLMULTI; } static int8_t Modified: head/sys/dev/usb/wlan/if_uath.c ============================================================================== --- head/sys/dev/usb/wlan/if_uath.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/usb/wlan/if_uath.c Mon May 25 19:53:29 2015 (r283540) @@ -290,8 +290,8 @@ static int uath_raw_xmit(struct ieee8021 static void uath_scan_start(struct ieee80211com *); static void uath_scan_end(struct ieee80211com *); static void uath_set_channel(struct ieee80211com *); -static void uath_update_mcast(struct ifnet *); -static void uath_update_promisc(struct ifnet *); +static void uath_update_mcast(struct ieee80211com *); +static void uath_update_promisc(struct ieee80211com *); static int uath_config(struct uath_softc *, uint32_t, uint32_t); static int uath_config_multi(struct uath_softc *, uint32_t, const void *, int); @@ -1927,13 +1927,13 @@ uath_set_rxmulti_filter(struct uath_soft return (0); } static void -uath_update_mcast(struct ifnet *ifp) +uath_update_mcast(struct ieee80211com *ic) { - struct uath_softc *sc = ifp->if_softc; + struct uath_softc *sc = ic->ic_softc; UATH_LOCK(sc); if ((sc->sc_flags & UATH_FLAG_INVALID) || - (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + (ic->ic_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { UATH_UNLOCK(sc); return; } @@ -1947,13 +1947,13 @@ uath_update_mcast(struct ifnet *ifp) } static void -uath_update_promisc(struct ifnet *ifp) +uath_update_promisc(struct ieee80211com *ic) { - struct uath_softc *sc = ifp->if_softc; + struct uath_softc *sc = ic->ic_softc; UATH_LOCK(sc); if ((sc->sc_flags & UATH_FLAG_INVALID) || - (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + (ic->ic_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { UATH_UNLOCK(sc); return; } Modified: head/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- head/sys/dev/usb/wlan/if_upgt.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/usb/wlan/if_upgt.c Mon May 25 19:53:29 2015 (r283540) @@ -142,7 +142,7 @@ static struct ieee80211vap *upgt_vap_cre 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 void upgt_update_mcast(struct ieee80211com *); static uint8_t upgt_rx_rate(struct upgt_softc *, const int); static void upgt_set_multi(void *); static void upgt_stop(struct upgt_softc *); @@ -1115,9 +1115,9 @@ upgt_vap_delete(struct ieee80211vap *vap } static void -upgt_update_mcast(struct ifnet *ifp) +upgt_update_mcast(struct ieee80211com *ic) { - struct upgt_softc *sc = ifp->if_softc; + struct upgt_softc *sc = ic->ic_softc; upgt_set_multi(sc); } Modified: head/sys/dev/usb/wlan/if_ural.c ============================================================================== --- head/sys/dev/usb/wlan/if_ural.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/usb/wlan/if_ural.c Mon May 25 19:53:29 2015 (r283540) @@ -177,7 +177,7 @@ static void ural_set_basicrates(struct const struct ieee80211_channel *); static void ural_set_bssid(struct ural_softc *, const uint8_t *); static void ural_set_macaddr(struct ural_softc *, uint8_t *); -static void ural_update_promisc(struct ifnet *); +static void ural_update_promisc(struct ieee80211com *); static void ural_setpromisc(struct ural_softc *); static const char *ural_get_rf(int); static void ural_read_eeprom(struct ural_softc *); @@ -1928,11 +1928,11 @@ ural_setpromisc(struct ural_softc *sc) } static void -ural_update_promisc(struct ifnet *ifp) +ural_update_promisc(struct ieee80211com *ic) { - struct ural_softc *sc = ifp->if_softc; + struct ural_softc *sc = ic->ic_softc; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + if ((ic->ic_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; RAL_LOCK(sc); Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/usb/wlan/if_urtw.c Mon May 25 19:53:29 2015 (r283540) @@ -663,7 +663,7 @@ static int urtw_raw_xmit(struct ieee802 static void urtw_scan_start(struct ieee80211com *); static void urtw_scan_end(struct ieee80211com *); static void urtw_set_channel(struct ieee80211com *); -static void urtw_update_mcast(struct ifnet *); +static void urtw_update_mcast(struct ieee80211com *); static int urtw_tx_start(struct urtw_softc *, struct ieee80211_node *, struct mbuf *, struct urtw_data *, int); @@ -758,7 +758,7 @@ static struct urtw_data * urtw_getbuf(struct urtw_softc *sc); static int urtw_compute_txtime(uint16_t, uint16_t, uint8_t, uint8_t); -static void urtw_updateslot(struct ifnet *); +static void urtw_updateslot(struct ieee80211com *); static void urtw_updateslottask(void *, int); static void urtw_sysctl_node(struct urtw_softc *); @@ -1663,7 +1663,7 @@ fail: } static void -urtw_update_mcast(struct ifnet *ifp) +urtw_update_mcast(struct ieee80211com *ic) { /* XXX do nothing? */ @@ -4367,10 +4367,9 @@ urtw_compute_txtime(uint16_t framelen, u * slot time based on the current setting. */ static void -urtw_updateslot(struct ifnet *ifp) +urtw_updateslot(struct ieee80211com *ic) { - struct urtw_softc *sc = ifp->if_softc; - struct ieee80211com *ic = ifp->if_l2com; + struct urtw_softc *sc = ic->ic_softc; ieee80211_runtask(ic, &sc->sc_updateslot_task); } Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/usb/wlan/if_urtwn.c Mon May 25 19:53:29 2015 (r283540) @@ -266,7 +266,7 @@ static void urtwn_set_channel(struct ie static void urtwn_set_chan(struct urtwn_softc *, struct ieee80211_channel *, struct ieee80211_channel *); -static void urtwn_update_mcast(struct ifnet *); +static void urtwn_update_mcast(struct ieee80211com *); static void urtwn_iq_calib(struct urtwn_softc *); static void urtwn_lc_calib(struct urtwn_softc *); static void urtwn_init(void *); @@ -3147,7 +3147,7 @@ urtwn_set_channel(struct ieee80211com *i } static void -urtwn_update_mcast(struct ifnet *ifp) +urtwn_update_mcast(struct ieee80211com *ic) { /* XXX do nothing? */ } Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/usb/wlan/if_zyd.c Mon May 25 19:53:29 2015 (r283540) @@ -147,7 +147,7 @@ static int zyd_set_bssid(struct zyd_soft static int zyd_switch_radio(struct zyd_softc *, int); static int zyd_set_led(struct zyd_softc *, int, int); static void zyd_set_multi(struct zyd_softc *); -static void zyd_update_mcast(struct ifnet *); +static void zyd_update_mcast(struct ieee80211com *); static int zyd_set_rxfilter(struct zyd_softc *); static void zyd_set_chan(struct zyd_softc *, struct ieee80211_channel *); static int zyd_set_beacon_interval(struct zyd_softc *, int); @@ -2046,11 +2046,11 @@ fail: } static void -zyd_update_mcast(struct ifnet *ifp) +zyd_update_mcast(struct ieee80211com *ic) { - struct zyd_softc *sc = ifp->if_softc; + struct zyd_softc *sc = ic->ic_softc; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + if ((ic->ic_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; ZYD_LOCK(sc); Modified: head/sys/dev/wi/if_wi.c ============================================================================== --- head/sys/dev/wi/if_wi.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/wi/if_wi.c Mon May 25 19:53:29 2015 (r283540) @@ -144,8 +144,8 @@ static void wi_info_intr(struct wi_softc static int wi_write_txrate(struct wi_softc *, struct ieee80211vap *); static int wi_write_wep(struct wi_softc *, struct ieee80211vap *); static int wi_write_multi(struct wi_softc *); -static void wi_update_mcast(struct ifnet *); -static void wi_update_promisc(struct ifnet *); +static void wi_update_mcast(struct ieee80211com *); +static void wi_update_promisc(struct ieee80211com *); static int wi_alloc_fid(struct wi_softc *, int, int *); static void wi_read_nicid(struct wi_softc *); static int wi_write_ssid(struct wi_softc *, int, u_int8_t *, int); @@ -1623,22 +1623,22 @@ allmulti: } static void -wi_update_mcast(struct ifnet *ifp) +wi_update_mcast(struct ieee80211com *ic) { - wi_write_multi(ifp->if_softc); + + wi_write_multi(ic->ic_softc); } static void -wi_update_promisc(struct ifnet *ifp) +wi_update_promisc(struct ieee80211com *ic) { - struct wi_softc *sc = ifp->if_softc; - struct ieee80211com *ic = ifp->if_l2com; + struct wi_softc *sc = ic->ic_softc; WI_LOCK(sc); /* XXX handle WEP special case handling? */ wi_write_val(sc, WI_RID_PROMISC, (ic->ic_opmode == IEEE80211_M_MONITOR || - (ifp->if_flags & IFF_PROMISC))); + (ic->ic_ifp->if_flags & IFF_PROMISC))); WI_UNLOCK(sc); } Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/wpi/if_wpi.c Mon May 25 19:53:29 2015 (r283540) @@ -219,8 +219,8 @@ static int wpi_add_ibss_node(struct wpi_ static void wpi_del_node(struct wpi_softc *, struct ieee80211_node *); static int wpi_updateedca(struct ieee80211com *); static void wpi_set_promisc(struct wpi_softc *); -static void wpi_update_promisc(struct ifnet *); -static void wpi_update_mcast(struct ifnet *); +static void wpi_update_promisc(struct ieee80211com *); +static void wpi_update_mcast(struct ieee80211com *); static void wpi_set_led(struct wpi_softc *, uint8_t, uint8_t, uint8_t); static int wpi_set_timing(struct wpi_softc *, struct ieee80211_node *); static void wpi_power_calibration(struct wpi_softc *); @@ -3542,9 +3542,9 @@ wpi_set_promisc(struct wpi_softc *sc) } static void -wpi_update_promisc(struct ifnet *ifp) +wpi_update_promisc(struct ieee80211com *ic) { - struct wpi_softc *sc = ifp->if_softc; + struct wpi_softc *sc = ic->ic_softc; WPI_RXON_LOCK(sc); wpi_set_promisc(sc); @@ -3557,7 +3557,7 @@ wpi_update_promisc(struct ifnet *ifp) } static void -wpi_update_mcast(struct ifnet *ifp) +wpi_update_mcast(struct ieee80211com *ic) { /* Ignore */ } Modified: head/sys/dev/wtap/if_wtap.c ============================================================================== --- head/sys/dev/wtap/if_wtap.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/dev/wtap/if_wtap.c Mon May 25 19:53:29 2015 (r283540) @@ -702,14 +702,14 @@ wtap_wme_update(struct ieee80211com *ic) } static void -wtap_update_mcast(struct ifnet *ifp) +wtap_update_mcast(struct ieee80211com *ic) { DWTAP_PRINTF("%s\n", __func__); } static void -wtap_update_promisc(struct ifnet *ifp) +wtap_update_promisc(struct ieee80211com *ic) { DWTAP_PRINTF("%s\n", __func__); @@ -829,9 +829,6 @@ wtap_attach(struct wtap_softc *sc, const /* override default methods */ ic->ic_newassoc = wtap_newassoc; -#if 0 - ic->ic_updateslot = myath_updateslot; -#endif ic->ic_wme.wme_update = wtap_wme_update; ic->ic_vap_create = wtap_vap_create; ic->ic_vap_delete = wtap_vap_delete; Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/net80211/ieee80211.c Mon May 25 19:53:29 2015 (r283540) @@ -224,15 +224,17 @@ ieee80211_chan_init(struct ieee80211com } static void -null_update_mcast(struct ifnet *ifp) +null_update_mcast(struct ieee80211com *ic) { - if_printf(ifp, "need multicast update callback\n"); + + ic_printf(ic, "need multicast update callback\n"); } static void -null_update_promisc(struct ifnet *ifp) +null_update_promisc(struct ieee80211com *ic) { - if_printf(ifp, "need promiscuous mode update callback\n"); + + ic_printf(ic, "need promiscuous mode update callback\n"); } static int Modified: head/sys/net80211/ieee80211_proto.c ============================================================================== --- head/sys/net80211/ieee80211_proto.c Mon May 25 19:48:48 2015 (r283539) +++ head/sys/net80211/ieee80211_proto.c Mon May 25 19:53:29 2015 (r283540) @@ -650,7 +650,7 @@ ieee80211_set_shortslottime(struct ieee8 ic->ic_flags &= ~IEEE80211_F_SHSLOT; /* notify driver */ if (ic->ic_updateslot != NULL) - ic->ic_updateslot(ic->ic_ifp); + ic->ic_updateslot(ic); } /* @@ -1164,18 +1164,16 @@ static void update_mcast(void *arg, int npending) { struct ieee80211com *ic = arg; - struct ifnet *parent = ic->ic_ifp; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505251953.t4PJrU2E023830>