Cody style cleanup. Thanx Axel for the headup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34817 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Colin Günther
2009-12-29 22:56:24 +00:00
parent f9ee2947df
commit f8762ee71c
4 changed files with 14 additions and 6 deletions
@@ -27,14 +27,16 @@ HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
struct ath_hal* ah = sc->sc_ah;
HAL_INT intr_status;
if (sc->sc_invalid)
if (sc->sc_invalid) {
// The hardware is not ready/present, don't touch anything.
// Note this can happen early on if the IRQ is shared.
return 0;
}
if (!ath_hal_intrpend(ah))
if (!ath_hal_intrpend(ah)) {
// shared irq, not for us
return 0;
}
// We have to save the isr status right now.
// Some devices don't like having the interrupt disabled
@@ -3,6 +3,7 @@
* All Rights Reserved. Distributed under the terms of the MIT License.
*/
#include <sys/bus.h>
#include <sys/kernel.h>
@@ -25,6 +26,7 @@ NO_HAIKU_REENABLE_INTERRUPTS();
HAIKU_DRIVER_REQUIREMENTS(FBSD_TASKQUEUES | FBSD_WLAN);
HAIKU_FIRMWARE_VERSION(0);
int
HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
{
@@ -37,9 +39,10 @@ HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
return 0;
intr_status = CSR_READ_4(sc, BWI_MAC_INTR_STATUS);
if (intr_status == 0xffffffff)
if (intr_status == 0xffffffff) {
// Not for us
return 0;
}
atomic_set((int32*)&sc->sc_intr_status, intr_status);
@@ -41,9 +41,10 @@ HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
return 0;
}
if (r1 == 0xffffffff)
if (r1 == 0xffffffff) {
// hardware gone
return 0;
}
atomic_set((int32*)&sc->sc_intr_status_1, r1);
atomic_set((int32*)&sc->sc_intr_status_2, r2);
@@ -30,17 +30,19 @@ HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
struct mwl_hal* mh = sc->sc_mh;
uint32_t intr_status;
if (sc->sc_invalid)
if (sc->sc_invalid) {
// The hardware is not ready/present, don't touch anything.
// Note this can happen early on if the IRQ is shared.
return 0;
}
mwl_hal_getisr(mh, &intr_status);
// NB: clears ISR too
if (intr_status == 0)
if (intr_status == 0) {
// must be a shared irq
return 0;
}
atomic_set((int32*)&sc->sc_intr_status, intr_status);