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 Reorder the use of ieee80211_init.



details:   https://anonhg.NetBSD.org/src-all/rev/96916bfad1af
branches:  trunk
changeset: 375441:96916bfad1af
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Tue May 12 04:04:00 2020 +1000

description:
Reorder the use of ieee80211_init.

diffstat:

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

diffs (39 lines):

diff -r b6f0cd7462a2 -r 96916bfad1af sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c      Tue May 12 04:03:03 2020 +1000
+++ b/sys/dev/pci/if_iwn.c      Tue May 12 04:04:00 2020 +1000
@@ -2084,6 +2084,7 @@ iwn_media_change(struct ifnet *ifp)
            (IFF_UP | IFF_RUNNING)) {
                iwn_stop(ifp, 0);
                error = iwn_init(ifp);
+               ieee80211_init(ifp);
        }
        return 0;
 }
@@ -3532,8 +3533,10 @@ iwn_ioctl(struct ifnet *ifp, u_long cmd,
                if ((error = ifioctl_common(ifp, cmd, data)) != 0)
                        break;
                if (ifp->if_flags & IFF_UP) {
-                       if (!(ifp->if_flags & IFF_RUNNING))
+                       if (!(ifp->if_flags & IFF_RUNNING)) {
                                error = iwn_init(ifp);
+                               ieee80211_init(ifp);
+                       }
                } else {
                        if (ifp->if_flags & IFF_RUNNING)
                                iwn_stop(ifp, 1);
@@ -3568,6 +3571,7 @@ iwn_ioctl(struct ifnet *ifp, u_long cmd,
                    (IFF_UP | IFF_RUNNING)) {
 //                     iwn_stop(ifp, 0);
                        iwn_init(ifp);
+                       ieee80211_init(ifp);
                }
                error = 0;
        }
@@ -6660,7 +6664,6 @@ iwn_init(struct ifnet *ifp)
                ieee80211_new_state(vap, IEEE80211_S_RUN, -1);
 
        sc->sc_flags |= IWN_FLAG_HW_INITED;
-       ieee80211_init(ifp);
 out:
        mutex_exit(&sc->sc_mtx);
        return 0;



Home | Main Index | Thread Index | Old Index