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/325c6ccf9722
branches:  trunk
changeset: 986709:325c6ccf9722
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 9024641a55b2 -r 325c6ccf9722 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 @@
            (IFF_UP | IFF_RUNNING)) {
                iwn_stop(ifp, 0);
                error = iwn_init(ifp);
+               ieee80211_init(ifp);
        }
        return 0;
 }
@@ -3532,8 +3533,10 @@
                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 @@
                    (IFF_UP | IFF_RUNNING)) {
 //                     iwn_stop(ifp, 0);
                        iwn_init(ifp);
+                       ieee80211_init(ifp);
                }
                error = 0;
        }
@@ -6660,7 +6664,6 @@
                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