Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Apply the same change as for if_iwi.c r1.114 here.
details: https://anonhg.NetBSD.org/src/rev/600b64d1c2a8
branches: trunk
changeset: 970322:600b64d1c2a8
user: sevan <sevan%NetBSD.org@localhost>
date: Fri Mar 20 17:19:25 2020 +0000
description:
Apply the same change as for if_iwi.c r1.114 here.
This driver sleeps during wpi_media_change(), and thus requires an adaptive
mutex for the media lock.
diffstat:
sys/dev/pci/if_wpi.c | 10 +++++++---
sys/dev/pci/if_wpivar.h | 4 +++-
2 files changed, 10 insertions(+), 4 deletions(-)
diffs (49 lines):
diff -r d85940545d7e -r 600b64d1c2a8 sys/dev/pci/if_wpi.c
--- a/sys/dev/pci/if_wpi.c Fri Mar 20 17:07:17 2020 +0000
+++ b/sys/dev/pci/if_wpi.c Fri Mar 20 17:19:25 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wpi.c,v 1.88 2020/01/30 06:10:26 thorpej Exp $ */
+/* $NetBSD: if_wpi.c,v 1.89 2020/03/20 17:19:25 sevan Exp $ */
/*-
* Copyright (c) 2006, 2007
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.88 2020/01/30 06:10:26 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.89 2020/03/20 17:19:25 sevan Exp $");
/*
* Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
@@ -387,7 +387,11 @@
/* override state transition machine */
sc->sc_newstate = ic->ic_newstate;
ic->ic_newstate = wpi_newstate;
- ieee80211_media_init(ic, wpi_media_change, ieee80211_media_status);
+
+ /* XXX media locking needs revisiting */
+ mutex_init(&sc->sc_media_mtx, MUTEX_DEFAULT, IPL_SOFTNET);
+ ieee80211_media_init_with_lock(ic,
+ wpi_media_change, ieee80211_media_status, &sc->sc_media_mtx);
sc->amrr.amrr_min_success_threshold = 1;
sc->amrr.amrr_max_success_threshold = 15;
diff -r d85940545d7e -r 600b64d1c2a8 sys/dev/pci/if_wpivar.h
--- a/sys/dev/pci/if_wpivar.h Fri Mar 20 17:07:17 2020 +0000
+++ b/sys/dev/pci/if_wpivar.h Fri Mar 20 17:19:25 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wpivar.h,v 1.22 2018/08/20 04:50:56 riastradh Exp $ */
+/* $NetBSD: if_wpivar.h,v 1.23 2020/03/20 17:19:25 sevan Exp $ */
/*-
* Copyright (c) 2006
@@ -172,6 +172,8 @@
struct bpf_if * sc_drvbpf;
+ kmutex_t sc_media_mtx; /* XXX */
+
union {
struct wpi_rx_radiotap_header th;
uint8_t pad[IEEE80211_RADIOTAP_HDRLEN];
Home |
Main Index |
Thread Index |
Old Index