* Adding the glue.c file needed to make the aironetwifi linking. The driver

is not tested, though, as I don't own the hardware.
* Note: This wifi driver is special, as it doesn't require the FBSD_WLAN flag
  set in the glue.c. This is due to the driver making little use of the
  wlan stack. Thus no initialization of wlan stuff is needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34710 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Colin Günther
2009-12-19 20:34:50 +00:00
parent 949b2ceb01
commit eb4ede2859
2 changed files with 46 additions and 0 deletions
@@ -21,6 +21,7 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) dev an ] ;
KernelAddon aironetwifi :
if_an.c
if_an_pci.c
glue.c
:
libfreebsd_wlan.a
libfreebsd_network.a
@@ -0,0 +1,45 @@
/*
* Copyright 2009, Colin Günther, [email protected].
* All Rights Reserved. Distributed under the terms of the MIT License.
*/
#include <sys/bus.h>
#include <sys/kernel.h>
#include <net/if.h>
#include <net/ethernet.h>
#include <net/if_media.h>
#include <net80211/ieee80211_var.h>
#include <machine/bus.h>
#include <dev/an/if_aironet_ieee.h>
#include <dev/an/if_anreg.h>
// Netgraph function variables.
void (*ng_ether_attach_p)(struct ifnet *ifp) = NULL;
void (*ng_ether_detach_p)(struct ifnet *ifp) = NULL;
HAIKU_FBSD_WLAN_DRIVER_GLUE(aironetwifi, an, pci)
NO_HAIKU_FBSD_MII_DRIVER();
NO_HAIKU_REENABLE_INTERRUPTS();
HAIKU_DRIVER_REQUIREMENTS(FBSD_TASKQUEUES);
int
HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
{
struct an_softc* sc = (struct an_softc*)device_get_softc(dev);
if (sc->an_gone)
return 0;
/* Disable interrupts. */
CSR_WRITE_2(sc, AN_INT_EN(sc->mpi350), 0);
return 1;
}