diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-03-08 12:02:42 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-03-08 12:02:42 +0000 |
commit | 75900197ea3563ad8982cb26c3337a5cee3da727 (patch) | |
tree | 41e1e9506513e4dd4262e04d6f230efea27542cb /sys/dev/pci/if_iwm.c | |
parent | 32ccc93181e4ea9624685fa972f99ce1cda42944 (diff) |
Do not clear IFF_UP, even in the error path, clearing IFF_RUNNING
is enough.
This flag should only be set by the stack, drivers shouldn't mess
with it.
Discussed with dlg@ and mikeb@, ok mikeb@, stsp@
Diffstat (limited to 'sys/dev/pci/if_iwm.c')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index f8acdfa23d5..947bd975481 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.165 2017/02/20 15:38:04 krw Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.166 2017/03/08 12:02:41 mpi Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -6151,8 +6151,6 @@ iwm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if (ifp->if_flags & IFF_UP) { if (!(ifp->if_flags & IFF_RUNNING)) { err = iwm_init(ifp); - if (err) - ifp->if_flags &= ~IFF_UP; } } else { if (ifp->if_flags & IFF_RUNNING) @@ -6801,7 +6799,6 @@ iwm_intr(void *arg) if (r1 & IWM_CSR_INT_BIT_HW_ERR) { handled |= IWM_CSR_INT_BIT_HW_ERR; printf("%s: hardware error, stopping device \n", DEVNAME(sc)); - ifp->if_flags &= ~IFF_UP; iwm_stop(ifp, 1); rv = 1; goto out; @@ -6819,7 +6816,6 @@ iwm_intr(void *arg) if (r1 & IWM_CSR_INT_BIT_RF_KILL) { handled |= IWM_CSR_INT_BIT_RF_KILL; if (iwm_check_rfkill(sc) && (ifp->if_flags & IFF_UP)) { - ifp->if_flags &= ~IFF_UP; iwm_stop(ifp, 1); } } |