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 Init hw in iwn_parent.



details:   https://anonhg.NetBSD.org/src-all/rev/d814193ac57b
branches:  trunk
changeset: 375666:d814193ac57b
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Mon Jan 11 22:18:06 2021 +1100

description:
Init hw in iwn_parent.

Device uP runs and iwn can scan again.

diffstat:

 sys/dev/pci/if_iwn.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r ebad5523535d -r d814193ac57b sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c      Mon Jan 11 12:22:03 2021 +1100
+++ b/sys/dev/pci/if_iwn.c      Mon Jan 11 22:18:06 2021 +1100
@@ -946,10 +946,14 @@ static void
 iwn_parent(struct ieee80211com *ic)
 {
        struct iwn_softc *sc __unused = ic->ic_softc;
+       struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
+
        bool startall = false;
 
        if (ic->ic_nrunning > 0) {
-               if ((sc->sc_flags & IWN_FLAG_STARTED) == 0) {
+               if ((sc->sc_flags & (IWN_FLAG_ATTACHED | IWN_FLAG_STARTED)) ==
+                   IWN_FLAG_ATTACHED) {
+                       iwn_init(vap->iv_ifp);
                        sc->sc_flags |= IWN_FLAG_STARTED;
                        startall = true;
                } else {



Home | Main Index | Thread Index | Old Index