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 her...
details: https://anonhg.NetBSD.org/src/rev/df59a2e1123c
branches: trunk
changeset: 1008354:df59a2e1123c
user: sevan <sevan%NetBSD.org@localhost>
date: Fri Mar 20 16:35:41 2020 +0000
description:
Apply the same change as for if_iwi.c r1.114 here, as part of kern/55090.
This driver sleeps during iwn_media_change(), and thus requires an adaptive
mutex for the media lock.
diffstat:
sys/dev/pci/if_iwn.c | 10 +++++++---
sys/dev/pci/if_iwnvar.h | 4 +++-
2 files changed, 10 insertions(+), 4 deletions(-)
diffs (49 lines):
diff -r 36ca8cd1d548 -r df59a2e1123c sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c Fri Mar 20 13:33:23 2020 +0000
+++ b/sys/dev/pci/if_iwn.c Fri Mar 20 16:35:41 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwn.c,v 1.93 2020/01/30 06:03:34 thorpej Exp $ */
+/* $NetBSD: if_iwn.c,v 1.94 2020/03/20 16:35:41 sevan Exp $ */
/* $OpenBSD: if_iwn.c,v 1.135 2014/09/10 07:22:09 dcoppa Exp $ */
/*-
@@ -22,7 +22,7 @@
* adapters.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.93 2020/01/30 06:03:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.94 2020/03/20 16:35:41 sevan Exp $");
#define IWN_USE_RBUF /* Use local storage for RX */
#undef IWN_HWCRYPTO /* XXX does not even compile yet */
@@ -614,7 +614,11 @@
/* Override 802.11 state transition machine. */
sc->sc_newstate = ic->ic_newstate;
ic->ic_newstate = iwn_newstate;
- ieee80211_media_init(ic, iwn_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,
+ iwn_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 36ca8cd1d548 -r df59a2e1123c sys/dev/pci/if_iwnvar.h
--- a/sys/dev/pci/if_iwnvar.h Fri Mar 20 13:33:23 2020 +0000
+++ b/sys/dev/pci/if_iwnvar.h Fri Mar 20 16:35:41 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwnvar.h,v 1.21 2019/10/05 23:27:20 mrg Exp $ */
+/* $NetBSD: if_iwnvar.h,v 1.22 2020/03/20 16:35:41 sevan Exp $ */
/* $OpenBSD: if_iwnvar.h,v 1.28 2014/09/09 18:55:08 sthen Exp $ */
/*-
@@ -324,6 +324,8 @@
struct bpf_if * sc_drvbpf;
+ kmutex_t sc_media_mtx; /* XXX */
+
union {
struct iwn_rx_radiotap_header th;
uint8_t pad[IEEE80211_RADIOTAP_HDRLEN];
Home |
Main Index |
Thread Index |
Old Index