Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src-draft/trunk]: src/sys/dev/usb We can not usbwifi_lock_ic() before ieee80...
details: https://anonhg.NetBSD.org/src-all/rev/d249c30328dd
branches: trunk
changeset: 371631:d249c30328dd
user: Martin Husemann <martin%NetBSD.org@localhost>
date: Wed Feb 09 19:44:29 2022 +0100
description:
We can not usbwifi_lock_ic() before ieee80211_ifattach()
diffstat:
sys/dev/usb/usbwifi.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (39 lines):
diff -r 30f9ec19622a -r d249c30328dd sys/dev/usb/usbwifi.c
--- a/sys/dev/usb/usbwifi.c Wed Feb 09 11:58:30 2022 +0100
+++ b/sys/dev/usb/usbwifi.c Wed Feb 09 19:44:29 2022 +0100
@@ -625,7 +625,7 @@
{
struct usbwifi_cdata * const cd = uw_cdata(uw);
- if (cd->uwcd_rx_chains[0].uwscd_chain == NULL)
+ if (cd->uwcd_tx_chains[0].uwscd_chain == NULL)
return; /* incomplete init */
for (size_t i = 0; i < uw->uw_txpipes; i++) {
@@ -1204,9 +1204,6 @@
mutex_init(&uwp->uwp_txlock, MUTEX_DEFAULT, IPL_SOFTUSB);
mutex_init(&uwp->uwp_rxlock, MUTEX_DEFAULT, IPL_SOFTUSB);
- uw->uw_pri = uwp;
- usbwifi_lock_ic(uw);
-
uw->uw_ic.ic_txstream = num_tx_chains;
uw->uw_ic.ic_rxstream = num_rx_chains;
uw->uw_ic.ic_flags = flags;
@@ -1218,11 +1215,14 @@
* quality of service to a pipe index.
*/
for (int i = 0; i < uw->uw_ic.ic_txstream; i++) {
- uw->uw_pri->uwp_sendq[i].ifq_maxlen = ifqmaxlen;
- IFQ_LOCK_INIT(&uw->uw_pri->uwp_sendq[i]);
+ uwp->uwp_sendq[i].ifq_maxlen = ifqmaxlen;
+ IFQ_LOCK_INIT(&uwp->uwp_sendq[i]);
}
ieee80211_ifattach(&uw->uw_ic);
+
+ uw->uw_pri = uwp;
+ usbwifi_lock_ic(uw);
uw->uw_ic.ic_raw_xmit = usbwifi_raw_xmit;
usbwifi_rx_list_alloc(uw);
Home |
Main Index |
Thread Index |
Old Index