summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorKevin Lo <kevlo@cvs.openbsd.org>2019-04-25 01:52:15 +0000
committerKevin Lo <kevlo@cvs.openbsd.org>2019-04-25 01:52:15 +0000
commit051054e6749c6f3994c8399577bb5036d7c1f205 (patch)
treec4f46a42d5c52ed2e09d8b3ae8194c8659cacccf /sys/dev/ic
parent58fe7e6a092745e1dfaf3e133e941c8ba8579cd5 (diff)
Follow up on jmatthew's suggestion:
in x_media_change(), return the errno from ieee80211_media_change() and do the error check from x_init(). ok stsp@, jmatthew@, phessler@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/bwfm.c4
-rw-r--r--sys/dev/ic/rtwn.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/bwfm.c b/sys/dev/ic/bwfm.c
index 0174d2e603b..e0444f592fa 100644
--- a/sys/dev/ic/bwfm.c
+++ b/sys/dev/ic/bwfm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bwfm.c,v 1.59 2019/04/01 15:19:56 patrick Exp $ */
+/* $OpenBSD: bwfm.c,v 1.60 2019/04/25 01:52:13 kevlo Exp $ */
/*
* Copyright (c) 2010-2016 Broadcom Corporation
* Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se>
@@ -757,7 +757,7 @@ bwfm_media_change(struct ifnet *ifp)
bwfm_stop(ifp);
bwfm_init(ifp);
}
- return 0;
+ return error;
}
/* Chip initialization (SDIO, PCIe) */
diff --git a/sys/dev/ic/rtwn.c b/sys/dev/ic/rtwn.c
index e11771131c6..10088df332b 100644
--- a/sys/dev/ic/rtwn.c
+++ b/sys/dev/ic/rtwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtwn.c,v 1.45 2019/03/11 06:19:33 kevlo Exp $ */
+/* $OpenBSD: rtwn.c,v 1.46 2019/04/25 01:52:13 kevlo Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -745,9 +745,9 @@ rtwn_media_change(struct ifnet *ifp)
if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) ==
(IFF_UP | IFF_RUNNING)) {
rtwn_stop(ifp);
- rtwn_init(ifp);
+ error = rtwn_init(ifp);
}
- return (0);
+ return (error);
}
/*