Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci iwi_newstate should work along with ieee80211_ne...



details:   https://anonhg.NetBSD.org/src/rev/a99e074d46be
branches:  trunk
changeset: 791625:a99e074d46be
user:      roy <roy%NetBSD.org@localhost>
date:      Tue Nov 26 09:46:24 2013 +0000

description:
iwi_newstate should work along with ieee80211_new_state, not always
override it.

diffstat:

 sys/dev/pci/if_iwi.c |  22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (53 lines):

diff -r afdd1650cd0e -r a99e074d46be sys/dev/pci/if_iwi.c
--- a/sys/dev/pci/if_iwi.c      Tue Nov 26 09:35:32 2013 +0000
+++ b/sys/dev/pci/if_iwi.c      Tue Nov 26 09:46:24 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_iwi.c,v 1.94 2013/11/21 21:14:05 riz Exp $  */
+/*     $NetBSD: if_iwi.c,v 1.95 2013/11/26 09:46:24 roy Exp $  */
 /*     $OpenBSD: if_iwi.c,v 1.111 2010/11/15 19:11:57 damien Exp $     */
 
 /*-
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.94 2013/11/21 21:14:05 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.95 2013/11/26 09:46:24 roy Exp $");
 
 /*-
  * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@@ -930,25 +930,25 @@
                break;
 
        case IEEE80211_S_RUN:
-               if (ic->ic_opmode == IEEE80211_M_IBSS)
-                       ieee80211_new_state(ic, IEEE80211_S_AUTH, -1);
+               if (ic->ic_opmode == IEEE80211_M_IBSS &&
+                   ic->ic_state == IEEE80211_S_SCAN)
+                       iwi_auth_and_assoc(sc);
                else if (ic->ic_opmode == IEEE80211_M_MONITOR)
                        iwi_set_chan(sc, ic->ic_ibss_chan);
-
-               return (*sc->sc_newstate)(ic, nstate,
-                   IEEE80211_FC0_SUBTYPE_ASSOC_RESP);
-
+               break;
        case IEEE80211_S_ASSOC:
                iwi_led_set(sc, IWI_LED_ASSOCIATED, 0);
+               if (ic->ic_state == IEEE80211_S_AUTH)
+                       break;
+               iwi_auth_and_assoc(sc);
                break;
 
        case IEEE80211_S_INIT:
                sc->flags &= ~IWI_FLAG_SCANNING;
-               return (*sc->sc_newstate)(ic, nstate, arg);
+               break;
        }
 
-       ic->ic_state = nstate;
-       return 0;
+       return sc->sc_newstate(ic, nstate, arg);
 }
 
 /*



Home | Main Index | Thread Index | Old Index