1/*
2 * Copyright 2009, Colin G��nther, coling@gmx.de.
3 * All Rights Reserved. Distributed under the terms of the MIT License.
4 */
5
6
7#include <sys/bus.h>
8#include <sys/kernel.h>
9#include <sys/rman.h>
10
11#include <net/if.h>
12#include <net/ethernet.h>
13#include <net/if_media.h>
14
15#include <net80211/ieee80211_var.h>
16
17#include <machine/bus.h>
18
19#include <dev/an/if_aironet_ieee.h>
20#include <dev/an/if_anreg.h>
21
22
23// Netgraph function variables.
24void (*ng_ether_attach_p)(struct ifnet *ifp) = NULL;
25void (*ng_ether_detach_p)(struct ifnet *ifp) = NULL;
26
27
28HAIKU_FBSD_WLAN_DRIVER_GLUE(aironetwifi, an, pci)
29NO_HAIKU_FBSD_MII_DRIVER();
30NO_HAIKU_REENABLE_INTERRUPTS();
31HAIKU_DRIVER_REQUIREMENTS(0);
32
33
34int
35HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
36{
37	struct an_softc* sc = (struct an_softc*)device_get_softc(dev);
38
39	if (sc->an_gone)
40		return 0;
41
42	CSR_WRITE_2(sc, AN_INT_EN(sc->mpi350), 0);
43		// Disable interrupts.
44
45	return 1;
46}
47