2 * Copyright 2009, Colin Günther, coling@gmx.de.
3 * All Rights Reserved. Distributed under the terms of the MIT License.
8 #include <sys/kernel.h>
10 #include <machine/bus.h>
13 #include <net/if_media.h>
15 #include <net80211/ieee80211_var.h>
17 #include <dev/iwi/if_iwireg.h>
18 #include <dev/iwi/if_iwivar.h>
21 HAIKU_FBSD_WLAN_DRIVER_GLUE(iprowifi2200
, iwi
, pci
)
22 NO_HAIKU_FBSD_MII_DRIVER();
23 HAIKU_DRIVER_REQUIREMENTS(FBSD_TASKQUEUES
| FBSD_WLAN
);
24 HAIKU_FIRMWARE_VERSION(300);
25 HAIKU_FIRMWARE_NAME_MAP(3) = {{"iwi_bss", "ipw2200-bss.fw"},
26 {"iwi_ibss", "ipw2200-ibss.fw"}, {"iwi_monitor", "ipw2200-sniffer.fw"}};
30 HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev
)
32 struct iwi_softc
* sc
= (struct iwi_softc
*)device_get_softc(dev
);
35 r
= CSR_READ_4(sc
, IWI_CSR_INTR
);
36 if (r
== 0 || r
== 0xffffffff)
39 atomic_set((int32
*)&sc
->sc_intr_status
, r
);
41 CSR_WRITE_4(sc
, IWI_CSR_INTR_MASK
, 0);
48 HAIKU_REENABLE_INTERRUPTS(device_t dev
)
50 struct iwi_softc
* sc
= (struct iwi_softc
*)device_get_softc(dev
);
52 CSR_WRITE_4(sc
, IWI_CSR_INTR_MASK
, IWI_INTR_MASK
);
53 // reenable interrupts