* Driver marv88w8363 now links. Can't test it as I don't own this hardware.
* Firmware is needed:
a) Download the firmware files from FreeBSD 8
here http://svn.freebsd.org/viewvc/base/release/8.0.0/sys/contrib/dev/mwl/mw88W8363.fw.uu?view=log
and here http://svn.freebsd.org/viewvc/base/release/8.0.0/sys/contrib/dev/mwl/mwlboot.fw.uu?view=log
b) Use the tool uudecode <firmware-file> to convert both files into their
binary format.
c) Copy both files to /system/data/firmware/marv88w8363/
d) Rename first file to mw88W8363fw and the second to mwlboot
e) Copy the License from http://svn.freebsd.org/viewvc/base/head/sys/contrib/dev/mwl/LICENSE?view=markup&pathrev=193240
into this directory, too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34475 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -21,6 +21,7 @@ KernelAddon marv88w8363 :
|
|||||||
if_mwl.c
|
if_mwl.c
|
||||||
if_mwl_pci.c
|
if_mwl_pci.c
|
||||||
mwlhal.c
|
mwlhal.c
|
||||||
|
glue.c
|
||||||
:
|
:
|
||||||
libfreebsd_wlan.a
|
libfreebsd_wlan.a
|
||||||
libfreebsd_network.a
|
libfreebsd_network.a
|
||||||
|
|||||||
@@ -821,21 +821,11 @@ mwl_intr(void *arg)
|
|||||||
struct mwl_softc *sc = arg;
|
struct mwl_softc *sc = arg;
|
||||||
struct mwl_hal *mh = sc->sc_mh;
|
struct mwl_hal *mh = sc->sc_mh;
|
||||||
uint32_t status;
|
uint32_t status;
|
||||||
|
HAIKU_INTR_REGISTER_STATE;
|
||||||
|
|
||||||
if (sc->sc_invalid) {
|
HAIKU_INTR_REGISTER_ENTER();
|
||||||
/*
|
status = sc->sc_lastisr;
|
||||||
* The hardware is not ready/present, don't touch anything.
|
HAIKU_INTR_REGISTER_LEAVE();
|
||||||
* Note this can happen early on if the IRQ is shared.
|
|
||||||
*/
|
|
||||||
DPRINTF(sc, MWL_DEBUG_ANY, "%s: invalid; ignored\n", __func__);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* Figure out the reason(s) for the interrupt.
|
|
||||||
*/
|
|
||||||
mwl_hal_getisr(mh, &status); /* NB: clears ISR too */
|
|
||||||
if (status == 0) /* must be a shared irq */
|
|
||||||
return;
|
|
||||||
|
|
||||||
DPRINTF(sc, MWL_DEBUG_INTR, "%s: status 0x%x imask 0x%x\n",
|
DPRINTF(sc, MWL_DEBUG_INTR, "%s: status 0x%x imask 0x%x\n",
|
||||||
__func__, status, sc->sc_imask);
|
__func__, status, sc->sc_imask);
|
||||||
|
|||||||
@@ -331,6 +331,8 @@ struct mwl_softc {
|
|||||||
|
|
||||||
struct mwl_tx_radiotap_header sc_tx_th;
|
struct mwl_tx_radiotap_header sc_tx_th;
|
||||||
struct mwl_rx_radiotap_header sc_rx_th;
|
struct mwl_rx_radiotap_header sc_rx_th;
|
||||||
|
|
||||||
|
uint32_t sc_lastisr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MWL_LOCK_INIT(_sc) \
|
#define MWL_LOCK_INIT(_sc) \
|
||||||
|
|||||||
@@ -0,0 +1,77 @@
|
|||||||
|
/*
|
||||||
|
* 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 <net/if.h>
|
||||||
|
#include <net/if_media.h>
|
||||||
|
|
||||||
|
#include <net80211/ieee80211_var.h>
|
||||||
|
|
||||||
|
#include <machine/bus.h>
|
||||||
|
|
||||||
|
#include <dev/mwl/if_mwlvar.h>
|
||||||
|
|
||||||
|
|
||||||
|
HAIKU_FBSD_WLAN_DRIVER_GLUE(marv88w8363, mwl, pci)
|
||||||
|
NO_HAIKU_FBSD_MII_DRIVER();
|
||||||
|
HAIKU_DRIVER_REQUIREMENTS(FBSD_TASKQUEUES|FBSD_WLAN);
|
||||||
|
HAIKU_FIRMWARE_VERSION(0);
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
|
||||||
|
{
|
||||||
|
struct mwl_softc* sc = (struct mwl_softc*)device_get_softc(dev);
|
||||||
|
struct mwl_hal* mh = sc->sc_mh;
|
||||||
|
HAIKU_INTR_REGISTER_STATE;
|
||||||
|
|
||||||
|
if (sc->sc_invalid) {
|
||||||
|
/*
|
||||||
|
* The hardware is not ready/present, don't touch anything.
|
||||||
|
* Note this can happen early on if the IRQ is shared.
|
||||||
|
*/
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
HAIKU_INTR_REGISTER_ENTER();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We have to save the isr status right now.
|
||||||
|
* Some devices don't like having the interrupt disabled
|
||||||
|
* before accessing the isr status.
|
||||||
|
*
|
||||||
|
* Those devices return status 0, when status access
|
||||||
|
* occurs after disabling the interrupts with mwl_hal_intrset.
|
||||||
|
*
|
||||||
|
* Note: This glue.c is based on the one for the atheros wlan driver.
|
||||||
|
* So the comment above isn't based on tests on real marvell hardware.
|
||||||
|
* But due to the similarities in both drivers I just go the safe
|
||||||
|
* route here. It doesn't do any harm, but may prevent hard to spot
|
||||||
|
* bugs.
|
||||||
|
*/
|
||||||
|
mwl_hal_getisr(mh, &sc->sc_lastisr); /* NB: clears ISR too */
|
||||||
|
if (sc->sc_lastisr == 0) { /* must be a shared irq */
|
||||||
|
HAIKU_INTR_REGISTER_LEAVE();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
mwl_hal_intrset(mh, 0); // disable further intr's
|
||||||
|
|
||||||
|
HAIKU_INTR_REGISTER_LEAVE();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
HAIKU_REENABLE_INTERRUPTS(device_t dev)
|
||||||
|
{
|
||||||
|
struct mwl_softc* sc = (struct mwl_softc*)device_get_softc(dev);
|
||||||
|
struct mwl_hal* mh = sc->sc_mh;
|
||||||
|
|
||||||
|
mwl_hal_intrset(mh, sc->sc_imask);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user