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 Use same state transition in iwn_init as u...
details: https://anonhg.NetBSD.org/src-all/rev/46d8ccba8b9e
branches: trunk
changeset: 933437:46d8ccba8b9e
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Sat May 16 11:49:37 2020 +1000
description:
Use same state transition in iwn_init as urtwn.
diffstat:
sys/dev/pci/if_iwn.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r 397ffcc3a0d1 -r 46d8ccba8b9e sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c Sat May 16 11:33:12 2020 +1000
+++ b/sys/dev/pci/if_iwn.c Sat May 16 11:49:37 2020 +1000
@@ -6588,6 +6588,7 @@
struct ieee80211vap *vap = ifp->if_softc;
struct ieee80211com *ic = vap->iv_ic;
struct iwn_softc *sc = ic->ic_softc;
+ struct ifmediareq imr;
int error;
printf("HERE\n");
@@ -6643,10 +6644,17 @@
ifp->if_flags &= ~IFF_OACTIVE;
ifp->if_flags |= IFF_RUNNING;
- if (ic->ic_opmode != IEEE80211_M_MONITOR)
+ if (ic->ic_opmode == IEEE80211_M_MONITOR)
+ ieee80211_new_state(vap, IEEE80211_S_RUN, -1);
+ else if (vap->iv_roaming != IEEE80211_ROAMING_MANUAL)
ieee80211_new_state(vap, IEEE80211_S_SCAN, -1);
- else
- ieee80211_new_state(vap, IEEE80211_S_RUN, -1);
+
+ iwn_init_channels(ic);
+ ieee80211_chan_init(ic);
+ ieee80211_media_status(ifp, &imr);
+ imr.ifm_active &= ~(IFM_MMASK | IFM_IEEE80211_TURBO);
+ imr.ifm_active |= IFM_AUTO;
+ ifmedia_set(&vap->iv_media, imr.ifm_active);
sc->sc_flags |= IWN_FLAG_HW_INITED;
out:
Home |
Main Index |
Thread Index |
Old Index