diff options
-rw-r--r-- | sys/dev/usb/wlan/if_urtwn.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/usb/wlan/if_urtwn.c b/sys/dev/usb/wlan/if_urtwn.c index 6b712b3dbcb6..eb077cbea062 100644 --- a/sys/dev/usb/wlan/if_urtwn.c +++ b/sys/dev/usb/wlan/if_urtwn.c @@ -1513,7 +1513,7 @@ urtwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { struct urtwn_vap *uvp = URTWN_VAP(vap); struct ieee80211com *ic = vap->iv_ic; - struct urtwn_softc *sc = ic->ic_ifp->if_softc; + struct urtwn_softc *sc = ic->ic_softc; struct ieee80211_node *ni; enum ieee80211_state ostate; uint32_t reg; @@ -1989,8 +1989,8 @@ urtwn_start_locked(struct ifnet *ifp, struct urtwn_softc *sc) static int urtwn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { - struct urtwn_softc *sc = ifp->if_softc; struct ieee80211com *ic = ifp->if_l2com; + struct urtwn_softc *sc = ic->ic_softc; struct ifreq *ifr = (struct ifreq *) data; int error = 0, startall = 0; @@ -2004,7 +2004,7 @@ urtwn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { - urtwn_init(ifp->if_softc); + urtwn_init(sc); startall = 1; } } else { @@ -3134,7 +3134,7 @@ urtwn_scan_end(struct ieee80211com *ic) static void urtwn_set_channel(struct ieee80211com *ic) { - struct urtwn_softc *sc = ic->ic_ifp->if_softc; + struct urtwn_softc *sc = ic->ic_softc; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); URTWN_LOCK(sc); @@ -3524,7 +3524,7 @@ urtwn_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, { struct ieee80211com *ic = ni->ni_ic; struct ifnet *ifp = ic->ic_ifp; - struct urtwn_softc *sc = ifp->if_softc; + struct urtwn_softc *sc = ic->ic_softc; struct urtwn_data *bf; /* prevent management frames from being sent if we're not ready */ |