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 Dont return early from running the state m...



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

description:
Dont return early from running the state machine callback.

diffstat:

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

diffs (29 lines):

diff -r b777c63d580d -r 1605e6898a8a sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c      Tue May 12 04:02:01 2020 +1000
+++ b/sys/dev/pci/if_iwn.c      Tue May 12 04:03:03 2020 +1000
@@ -2119,13 +2119,12 @@
 
                iwn_scan(ic);
                //ic->ic_state = nstate;
-               return 0;
+               break;
 
        case IEEE80211_S_CAC:
        case IEEE80211_S_CSA:
        case IEEE80211_S_SLEEP:
-               printf("NOT USED STATE %d\n", nstate);
-               return 0;
+               break;
        case IEEE80211_S_ASSOC:
                if (ostate != IEEE80211_S_RUN)
                        break;
@@ -2180,7 +2179,8 @@
                break;
        }
 
-       return sc->sc_newstate(vap, nstate, arg);
+       error = (*sc->sc_newstate)(vap, nstate, arg);
+       return error;
 }
 
 static void __unused



Home | Main Index | Thread Index | Old Index