Source-Changes-HG archive

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

[src-draft/trunk]: src/sys/net80211 Initialze callouts. Fixes crashes with u...



details:   https://anonhg.NetBSD.org/src-all/rev/a0b2f1a858f2
branches:  trunk
changeset: 1026954:a0b2f1a858f2
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Sun Aug 16 08:24:28 2020 +1000

description:
Initialze callouts.  Fixes crashes with urtwn detach/reattach.

diffstat:

 sys/net80211/ieee80211_dfs.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r d33da106f500 -r a0b2f1a858f2 sys/net80211/ieee80211_dfs.c
--- a/sys/net80211/ieee80211_dfs.c      Sun Aug 16 07:11:57 2020 +1000
+++ b/sys/net80211/ieee80211_dfs.c      Sun Aug 16 08:24:28 2020 +1000
@@ -119,11 +119,14 @@
 void
 ieee80211_dfs_attach(struct ieee80211com *ic)
 {
-#ifdef __FreeBSD__
        struct ieee80211_dfs_state *dfs = &ic->ic_dfs;
 
+#ifdef __FreeBSD__
        callout_init_mtx(&dfs->nol_timer, IEEE80211_LOCK_OBJ(ic), 0);
        callout_init_mtx(&dfs->cac_timer, IEEE80211_LOCK_OBJ(ic), 0);
+#else
+       callout_init(&dfs->nol_timer, 0);
+       callout_init(&dfs->cac_timer, 0);
 #endif
 
        ic->ic_set_quiet = null_set_quiet;



Home | Main Index | Thread Index | Old Index