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/003a302999a3
branches:  trunk
changeset: 952632:003a302999a3
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 c399cfe1c133 -r 003a302999a3 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
@@ -873,10 +873,14 @@
 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