Enabling linkage of the iprowifi2100 driver.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34392 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -17,6 +17,7 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) dev ipw ] ;
|
|||||||
|
|
||||||
KernelAddon iprowifi2100 :
|
KernelAddon iprowifi2100 :
|
||||||
if_ipw.c
|
if_ipw.c
|
||||||
|
glue.c
|
||||||
:
|
:
|
||||||
libfreebsd_wlan.a
|
libfreebsd_wlan.a
|
||||||
libfreebsd_network.a
|
libfreebsd_network.a
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* 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 <machine/bus.h>
|
||||||
|
|
||||||
|
#include <net/if.h>
|
||||||
|
#include <net/if_media.h>
|
||||||
|
|
||||||
|
#include <net80211/ieee80211_var.h>
|
||||||
|
|
||||||
|
#include <dev/ipw/if_ipwreg.h>
|
||||||
|
#include <dev/ipw/if_ipwvar.h>
|
||||||
|
|
||||||
|
|
||||||
|
HAIKU_FBSD_WLAN_DRIVER_GLUE(iprowifi2100, ipw, pci)
|
||||||
|
NO_HAIKU_FBSD_MII_DRIVER();
|
||||||
|
HAIKU_DRIVER_REQUIREMENTS(FBSD_TASKQUEUES|FBSD_WLAN);
|
||||||
|
HAIKU_FIRMWARE_VERSION(130);
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
|
||||||
|
{
|
||||||
|
struct ipw_softc* sc = (struct ipw_softc*)device_get_softc(dev);
|
||||||
|
uint32 r;
|
||||||
|
HAIKU_INTR_REGISTER_STATE;
|
||||||
|
|
||||||
|
HAIKU_INTR_REGISTER_ENTER();
|
||||||
|
if ((r = CSR_READ_4(sc, IPW_CSR_INTR)) == 0 || r == 0xffffffff) {
|
||||||
|
HAIKU_INTR_REGISTER_LEAVE();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* disable interrupts */
|
||||||
|
CSR_WRITE_4(sc, IPW_CSR_INTR_MASK, 0);
|
||||||
|
|
||||||
|
HAIKU_INTR_REGISTER_LEAVE();
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
HAIKU_REENABLE_INTERRUPTS(device_t dev)
|
||||||
|
{
|
||||||
|
struct ipw_softc* sc = (struct ipw_softc*)device_get_softc(dev);
|
||||||
|
|
||||||
|
/* enable interrupts */
|
||||||
|
CSR_WRITE_4(sc, IPW_CSR_INTR_MASK, IPW_INTR_MASK);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user