FreeBSD kernel MWL device code
if_mwl_pci.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/module.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/mutex.h>
#include <sys/errno.h>
#include <machine/bus.h>
#include <machine/resource.h>
#include <sys/bus.h>
#include <sys/rman.h>
#include <sys/socket.h>
#include <net/ethernet.h>
#include <net/if.h>
#include <net/if_media.h>
#include <net/if_arp.h>
#include <net/route.h>
#include <net80211/ieee80211_var.h>
#include <dev/mwl/if_mwlvar.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
Include dependency graph for if_mwl_pci.c:

Go to the source code of this file.

Data Structures

struct  mwl_pci_softc
 
struct  mwl_pci_ident
 

Macros

#define BS_BAR0   0x10
 
#define BS_BAR1   0x14
 

Functions

 __FBSDID ("$FreeBSD$")
 
static const struct mwl_pci_identmwl_pci_lookup (int vendor, int device)
 
static int mwl_pci_probe (device_t dev)
 
static int mwl_pci_attach (device_t dev)
 
static int mwl_pci_detach (device_t dev)
 
static int mwl_pci_shutdown (device_t dev)
 
static int mwl_pci_suspend (device_t dev)
 
static int mwl_pci_resume (device_t dev)
 
 DRIVER_MODULE (mwl, pci, mwl_pci_driver, mwl_devclass, 0, 0)
 
 MODULE_VERSION (mwl, 1)
 
 MODULE_DEPEND (mwl, wlan, 1, 1, 1)
 
 MODULE_DEPEND (mwl, firmware, 1, 1, 1)
 

Variables

static const struct mwl_pci_ident mwl_pci_ids []
 
static device_method_t mwl_pci_methods []
 
static driver_t mwl_pci_driver
 
static devclass_t mwl_devclass
 

Macro Definition Documentation

◆ BS_BAR0

#define BS_BAR0   0x10

Definition at line 84 of file if_mwl_pci.c.

◆ BS_BAR1

#define BS_BAR1   0x14

Definition at line 85 of file if_mwl_pci.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ DRIVER_MODULE()

DRIVER_MODULE ( mwl  ,
pci  ,
mwl_pci_driver  ,
mwl_devclass  ,
,
 
)

◆ MODULE_DEPEND() [1/2]

MODULE_DEPEND ( mwl  ,
firmware  ,
,
,
 
)

◆ MODULE_DEPEND() [2/2]

MODULE_DEPEND ( mwl  ,
wlan  ,
,
,
 
)

◆ MODULE_VERSION()

MODULE_VERSION ( mwl  ,
 
)

◆ mwl_pci_attach()

◆ mwl_pci_detach()

static int mwl_pci_detach ( device_t  dev)
static

◆ mwl_pci_lookup()

static const struct mwl_pci_ident * mwl_pci_lookup ( int  vendor,
int  device 
)
static

Definition at line 105 of file if_mwl_pci.c.

References mwl_pci_ident::device, mwl_pci_ids, mwl_pci_ident::name, and mwl_pci_ident::vendor.

Referenced by mwl_pci_probe().

Here is the caller graph for this function:

◆ mwl_pci_probe()

static int mwl_pci_probe ( device_t  dev)
static

Definition at line 116 of file if_mwl_pci.c.

References mwl_pci_lookup(), and mwl_pci_ident::name.

Here is the call graph for this function:

◆ mwl_pci_resume()

static int mwl_pci_resume ( device_t  dev)
static

Definition at line 263 of file if_mwl_pci.c.

References mwl_resume(), and mwl_pci_softc::sc_sc.

Here is the call graph for this function:

◆ mwl_pci_shutdown()

static int mwl_pci_shutdown ( device_t  dev)
static

Definition at line 244 of file if_mwl_pci.c.

References mwl_shutdown(), and mwl_pci_softc::sc_sc.

Here is the call graph for this function:

◆ mwl_pci_suspend()

static int mwl_pci_suspend ( device_t  dev)
static

Definition at line 253 of file if_mwl_pci.c.

References mwl_suspend(), and mwl_pci_softc::sc_sc.

Here is the call graph for this function:

Variable Documentation

◆ mwl_devclass

devclass_t mwl_devclass
static

Definition at line 289 of file if_mwl_pci.c.

◆ mwl_pci_driver

driver_t mwl_pci_driver
static
Initial value:
= {
"mwl",
sizeof (struct mwl_pci_softc)
}
static device_method_t mwl_pci_methods[]
Definition: if_mwl_pci.c:274

Definition at line 284 of file if_mwl_pci.c.

◆ mwl_pci_ids

const struct mwl_pci_ident mwl_pci_ids[]
static
Initial value:
= {
{ 0x11ab, 0x2a02, "Marvell 88W8363" },
{ 0x11ab, 0x2a03, "Marvell 88W8363" },
{ 0x11ab, 0x2a0a, "Marvell 88W8363" },
{ 0x11ab, 0x2a0b, "Marvell 88W8363" },
{ 0x11ab, 0x2a0c, "Marvell 88W8363" },
{ 0x11ab, 0x2a21, "Marvell 88W8363" },
{ 0x11ab, 0x2a24, "Marvell 88W8363" },
{ 0, 0, NULL }
}

Definition at line 93 of file if_mwl_pci.c.

Referenced by mwl_pci_lookup().

◆ mwl_pci_methods

device_method_t mwl_pci_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, mwl_pci_probe),
DEVMETHOD(device_attach, mwl_pci_attach),
DEVMETHOD(device_detach, mwl_pci_detach),
DEVMETHOD(device_shutdown, mwl_pci_shutdown),
DEVMETHOD(device_suspend, mwl_pci_suspend),
DEVMETHOD(device_resume, mwl_pci_resume),
{ 0,0 }
}
static int mwl_pci_suspend(device_t dev)
Definition: if_mwl_pci.c:253
static int mwl_pci_shutdown(device_t dev)
Definition: if_mwl_pci.c:244
static int mwl_pci_probe(device_t dev)
Definition: if_mwl_pci.c:116
static int mwl_pci_detach(device_t dev)
Definition: if_mwl_pci.c:220
static int mwl_pci_attach(device_t dev)
Definition: if_mwl_pci.c:129
static int mwl_pci_resume(device_t dev)
Definition: if_mwl_pci.c:263

Definition at line 274 of file if_mwl_pci.c.