Source-Changes-HG archive

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

[src-draft/trunk]: src/sys/dev Reoder so newstate functions are overridden co...



details:   https://anonhg.NetBSD.org/src-all/rev/882940ec66b4
branches:  trunk
changeset: 952419:882940ec66b4
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Wed May 13 12:45:22 2020 +1000

description:
Reoder so newstate functions are overridden correctly.

diffstat:

 sys/dev/pci/if_iwn.c   |  10 +++++-----
 sys/dev/usb/if_urtwn.c |  10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diffs (50 lines):

diff -r 3233b0a2f734 -r 882940ec66b4 sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c      Wed May 13 12:19:00 2020 +1000
+++ b/sys/dev/pci/if_iwn.c      Wed May 13 12:45:22 2020 +1000
@@ -801,16 +801,16 @@
        // IFQ_SET_READY(&ifp->if_snd);
        memcpy(ifp->if_xname, device_xname(sc->sc_dev), IFNAMSIZ);
 
+       /* Finish setup */
+       ieee80211_vap_attach(vap, iwn_media_change,
+           ieee80211_media_status, macaddr);
+       ic->ic_opmode = opmode;
+
        /* Override state transition machine. */
        /* NNN --- many possible newstate machines ... issue! */
        sc->sc_newstate = vap->iv_newstate;
        vap->iv_newstate = iwn_newstate;
 
-       /* Finish setup */
-       ieee80211_vap_attach(vap, iwn_media_change,
-           ieee80211_media_status, macaddr);
-       ic->ic_opmode = opmode;
-
        /* Attach the packet filter */
        bpf_attach2(vap->iv_ifp, DLT_IEEE802_11_RADIO,
            sizeof(struct ieee80211_frame) + IEEE80211_RADIOTAP_HDRLEN,
diff -r 3233b0a2f734 -r 882940ec66b4 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Wed May 13 12:19:00 2020 +1000
+++ b/sys/dev/usb/if_urtwn.c    Wed May 13 12:45:22 2020 +1000
@@ -3534,16 +3534,16 @@
 
        //ifp->if_percpuq = if_percpuq_create(ifp);
 
+       /* Finish setup */
+       ieee80211_vap_attach(vap, urtwn_media_change,
+           ieee80211_media_status, macaddr);
+       ic->ic_opmode = opmode;
+
        /* Override state transition machine. */
        /* NNN --- many possible newstate machines ... issue! */
        sc->sc_newstate = vap->iv_newstate;
        vap->iv_newstate = urtwn_newstate;
 
-       /* Finish setup */
-       ieee80211_vap_attach(vap, urtwn_media_change,
-           ieee80211_media_status, macaddr);
-       ic->ic_opmode = opmode;
-
        /* Attach the packet filter */
        bpf_attach2(vap->iv_ifp, DLT_IEEE802_11_RADIO,
            sizeof(struct ieee80211_frame) + IEEE80211_RADIOTAP_HDRLEN,



Home | Main Index | Thread Index | Old Index