iprowifi3945 now links. Still needs to be tested as I don't own the needed
hardware. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34411 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
aa068fb982
commit
86a3b75e8a
@ -16,6 +16,7 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) dev wpi ] ;
|
||||
|
||||
KernelAddon iprowifi3945 :
|
||||
if_wpi.c
|
||||
glue.c
|
||||
:
|
||||
libfreebsd_wlan.a
|
||||
libfreebsd_network.a
|
||||
|
55
src/add-ons/kernel/drivers/network/wlan/iprowifi3945/glue.c
Normal file
55
src/add-ons/kernel/drivers/network/wlan/iprowifi3945/glue.c
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009, Colin Günther, coling@gmx.de.
|
||||
* All Rights Reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#include <sys/bus.h>
|
||||
#include <sys/kernel.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_media.h>
|
||||
|
||||
#include <net80211/ieee80211_var.h>
|
||||
|
||||
#include <dev/wpi/if_wpireg.h>
|
||||
#include <dev/wpi/if_wpivar.h>
|
||||
|
||||
|
||||
HAIKU_FBSD_WLAN_DRIVER_GLUE(iprowifi3945, wpi, pci)
|
||||
NO_HAIKU_FBSD_MII_DRIVER();
|
||||
HAIKU_DRIVER_REQUIREMENTS(FBSD_TASKQUEUES|FBSD_WLAN);
|
||||
HAIKU_FIRMWARE_VERSION(2144);
|
||||
|
||||
|
||||
int
|
||||
HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
|
||||
{
|
||||
struct wpi_softc* sc = (struct wpi_softc*)device_get_softc(dev);
|
||||
uint32 r;
|
||||
HAIKU_INTR_REGISTER_STATE;
|
||||
|
||||
HAIKU_INTR_REGISTER_ENTER();
|
||||
if ((r = WPI_READ(sc, WPI_INTR)) == 0 || r == 0xffffffff) {
|
||||
HAIKU_INTR_REGISTER_LEAVE();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* disable interrupts */
|
||||
WPI_WRITE(sc, WPI_MASK, 0);
|
||||
|
||||
HAIKU_INTR_REGISTER_LEAVE();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HAIKU_REENABLE_INTERRUPTS(device_t dev)
|
||||
{
|
||||
struct wpi_softc* sc = (struct wpi_softc*)device_get_softc(dev);
|
||||
|
||||
/* enable interrupts */
|
||||
WPI_WRITE(sc, WPI_MASK, WPI_INTR_MASK);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user