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 Fix definition and use of iwm_init same as...
details: https://anonhg.NetBSD.org/src-all/rev/02a7aa03e7f8
branches: trunk
changeset: 949662:02a7aa03e7f8
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Sun Oct 04 17:58:28 2020 +1100
description:
Fix definition and use of iwm_init same as what is done for iwn.
diffstat:
sys/dev/pci/if_iwm.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diffs (63 lines):
diff -r f3f0c54989ee -r 02a7aa03e7f8 sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c Sun Oct 04 17:57:24 2020 +1100
+++ b/sys/dev/pci/if_iwm.c Sun Oct 04 17:58:28 2020 +1100
@@ -482,7 +482,7 @@
static int iwm_send_update_mcc_cmd(struct iwm_softc *, const char *);
static void iwm_tt_tx_backoff(struct iwm_softc *, uint32_t);
static int iwm_init_hw(struct iwm_softc *);
-static int iwm_init(struct iwm_softc *);
+static int iwm_init(struct ifnet *ifp);
static void iwm_start(struct iwm_softc *);
static void iwm_stop(struct iwm_softc *);
#ifdef notyet
@@ -6230,7 +6230,7 @@
*/
if (nstate != IEEE80211_S_INIT) {
iwm_stop(sc);
- iwm_init(sc);
+ iwm_init(vap->iv_ifp);
return 0;
}
@@ -6821,8 +6821,11 @@
}
static int
-iwm_init(struct iwm_softc *sc)
-{
+iwm_init(struct ifnet *ifp)
+{
+ struct ieee80211vap *vap = ifp->if_softc;
+ struct ieee80211com *ic = vap->iv_ic;
+ struct iwm_softc *sc = ic->ic_softc;
int err;
if (ISSET(sc->sc_flags, IWM_FLAG_HW_INITED))
@@ -6838,6 +6841,11 @@
}
SET(sc->sc_flags, IWM_FLAG_HW_INITED);
+ 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);
+
return 0;
}
@@ -8275,6 +8283,7 @@
static void
iwm_parent(struct ieee80211com *ic)
{
+#if 0
struct iwm_softc *sc = ic->ic_softc;
bool startall = false;
@@ -8291,6 +8300,7 @@
if (startall)
ieee80211_start_all(ic);
+#endif
}
static struct ieee80211vap *
Home |
Main Index |
Thread Index |
Old Index