Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/dev/pci Fix ic_softc variable botches.



details:   https://anonhg.NetBSD.org/src-all/rev/342ab82081cb
branches:  trunk
changeset: 989328:342ab82081cb
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Thu Sep 03 21:16:14 2020 +1000

description:
Fix ic_softc variable botches.

diffstat:

 sys/dev/pci/if_iwm.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (58 lines):

diff -r 669291225d60 -r 342ab82081cb sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c      Thu Sep 03 21:07:30 2020 +1000
+++ b/sys/dev/pci/if_iwm.c      Thu Sep 03 21:16:14 2020 +1000
@@ -2890,7 +2890,7 @@
     uint8_t tid)
 {
        struct ieee80211_rx_ba *ba = &ni->ni_rx_ba[tid];
-       struct iwm_softc *sc = ic->if_softc;
+       struct iwm_softc *sc = ic->ic_softc;
 
        if (sc->sc_rx_ba_sessions >= IWM_MAX_RX_BA_SESSIONS)
                return ENOSPC;
@@ -2911,7 +2911,7 @@
 iwm_ampdu_rx_stop(struct ieee80211com *ic, struct ieee80211_node *ni,
     uint8_t tid)
 {
-       struct iwm_softc *sc = ic->if_softc;
+       struct iwm_softc *sc = ic->ic_softc;
 
        sc->ba_start = 0;
        sc->ba_tid = tid;
@@ -6707,8 +6707,8 @@
 static int
 iwm_init_hw(struct ieee80211vap *vap)
 {
-       struct ieee80211com *ic = &vap->iv_ic;
-       struct iwm_softc *sc = &ic->ic_softc;
+       struct ieee80211com *ic = vap->iv_ic;
+       struct iwm_softc *sc = ic->ic_softc;
        int err, i, ac;
 
 #if 0
@@ -6899,7 +6899,7 @@
 iwm_init(struct ifnet *ifp)
 {
        struct ieee80211vap *vap = ifp->if_softc;
-       struct iwm_softc *sc = vap->if_softc;
+       struct iwm_softc *sc = vap->iv_ic->ic_softc;
        int err;
 
        if (ISSET(sc->sc_flags, IWM_FLAG_HW_INITED))
@@ -7378,7 +7378,7 @@
 static void
 iwm_notif_intr(struct ieee80211vap *vap)
 {
-       struct iwm_softc = vap->if_softc->if_softc;
+       struct iwm_softc *sc = vap->iv_ic->ic_softc;
        uint16_t hw;
 
        bus_dmamap_sync(sc->sc_dmat, sc->rxq.stat_dma.map,
@@ -7691,7 +7691,6 @@
 iwm_softintr(void *arg)
 {
        struct iwm_softc *sc = arg;
-       struct iwm_softc *sc = ic->ic_softc;
        struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
        struct ifnet *ifp = vap->iv_ifp);
        uint32_t r1, r2;



Home | Main Index | Thread Index | Old Index