Big style cleanup. While there remove references to FreeBSD versions

older than 6.0.

Submitted by:	Paul B Mahol <onemda at gmail.com>
This commit is contained in:
Rui Paulo 2009-11-02 11:07:42 +00:00
parent eabd1bcb21
commit 99081d1c61
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=198786
9 changed files with 426 additions and 806 deletions

View File

@ -193,7 +193,6 @@ static void
ndis_sendrsrcavail_func(adapter)
ndis_handle adapter;
{
return;
}
static void
@ -212,7 +211,6 @@ ndis_status_func(adapter, status, sbuf, slen)
ifp = sc->ifp;
if (ifp->if_flags & IFF_DEBUG)
device_printf(sc->ndis_dev, "status: %x\n", status);
return;
}
static void
@ -228,7 +226,6 @@ ndis_statusdone_func(adapter)
ifp = sc->ifp;
if (ifp->if_flags & IFF_DEBUG)
device_printf(sc->ndis_dev, "status complete\n");
return;
}
static void
@ -241,7 +238,6 @@ ndis_setdone_func(adapter, status)
block->nmb_setstat = status;
KeSetEvent(&block->nmb_setevent, IO_NO_INCREMENT, FALSE);
return;
}
static void
@ -254,7 +250,6 @@ ndis_getdone_func(adapter, status)
block->nmb_getstat = status;
KeSetEvent(&block->nmb_getevent, IO_NO_INCREMENT, FALSE);
return;
}
static void
@ -272,8 +267,6 @@ ndis_resetdone_func(ndis_handle adapter, ndis_status status,
if (ifp->if_flags & IFF_DEBUG)
device_printf(sc->ndis_dev, "reset done...\n");
KeSetEvent(&block->nmb_resetevent, IO_NO_INCREMENT, FALSE);
return;
}
int
@ -488,8 +481,6 @@ ndis_return(dobj, arg)
KeAcquireSpinLock(&block->nmb_returnlock, &irql);
}
KeReleaseSpinLock(&block->nmb_returnlock, irql);
return;
}
void
@ -522,8 +513,6 @@ ndis_return_packet(buf, arg)
IoQueueWorkItem(block->nmb_returnitem,
(io_workitem_func)kernndis_functbl[7].ipt_wrap,
WORKQUEUE_CRITICAL, block);
return;
}
void
@ -540,8 +529,6 @@ ndis_free_bufs(b0)
IoFreeMdl(b0);
b0 = next;
}
return;
}
void
@ -553,7 +540,6 @@ ndis_free_packet(p)
ndis_free_bufs(p->np_private.npp_head);
NdisFreePacket(p);
return;
}
int
@ -567,20 +553,12 @@ ndis_convert_res(arg)
device_t dev;
struct resource_list *brl;
struct resource_list_entry *brle;
#if __FreeBSD_version < 600022
struct resource_list brl_rev;
struct resource_list_entry *n;
#endif
int error = 0;
sc = arg;
block = sc->ndis_block;
dev = sc->ndis_dev;
#if __FreeBSD_version < 600022
SLIST_INIT(&brl_rev);
#endif
rl = malloc(sizeof(ndis_resource_list) +
(sizeof(cm_partial_resource_desc) * (sc->ndis_rescnt - 1)),
M_DEVBUF, M_NOWAIT|M_ZERO);
@ -597,37 +575,7 @@ ndis_convert_res(arg)
if (brl != NULL) {
#if __FreeBSD_version < 600022
/*
* We have a small problem. Some PCI devices have
* multiple I/O ranges. Windows orders them starting
* from lowest numbered BAR to highest. We discover
* them in that order too, but insert them into a singly
* linked list head first, which means when time comes
* to traverse the list, we enumerate them in reverse
* order. This screws up some drivers which expect the
* BARs to be in ascending order so that they can choose
* the "first" one as their register space. Unfortunately,
* in order to fix this, we have to create our own
* temporary list with the entries in reverse order.
*/
SLIST_FOREACH(brle, brl, link) {
n = malloc(sizeof(struct resource_list_entry),
M_TEMP, M_NOWAIT);
if (n == NULL) {
error = ENOMEM;
goto bad;
}
bcopy((char *)brle, (char *)n,
sizeof(struct resource_list_entry));
SLIST_INSERT_HEAD(&brl_rev, n, link);
}
SLIST_FOREACH(brle, &brl_rev, link) {
#else
STAILQ_FOREACH(brle, brl, link) {
#endif
switch (brle->type) {
case SYS_RES_IOPORT:
prd->cprd_type = CmResourceTypePort;
@ -671,16 +619,6 @@ ndis_convert_res(arg)
block->nmb_rlist = rl;
#if __FreeBSD_version < 600022
bad:
while (!SLIST_EMPTY(&brl_rev)) {
n = SLIST_FIRST(&brl_rev);
SLIST_REMOVE_HEAD(&brl_rev, link);
free (n, M_TEMP);
}
#endif
return (error);
}
@ -1262,7 +1200,7 @@ ndis_init_nic(arg)
NDIS_LOCK(sc);
sc->ndis_block->nmb_miniportadapterctx = NULL;
NDIS_UNLOCK(sc);
return(ENXIO);
return (status);
}
/*
@ -1305,8 +1243,6 @@ ndis_intrsetup(dpc, dobj, ip, sc)
if (KeInsertQueueDpc(&intr->ni_dpc, NULL, NULL) == TRUE)
intr->ni_dpccnt++;
KeReleaseSpinLockFromDpcLevel(&intr->ni_dpccountlock);
return;
}
int

View File

@ -482,8 +482,6 @@ windrv_destroy_pdo(drv, bsddev)
mtx_lock(&drvdb_mtx);
IoDeleteDevice(pdo);
mtx_unlock(&drvdb_mtx);
return;
}
/*
@ -695,8 +693,6 @@ ctxsw_utow(void)
x86_critical_exit();
/* Now entering Windows land, population: you. */
return;
}
/*
@ -722,7 +718,6 @@ ctxsw_wtou(void)
if (t->tid_cpu != curthread->td_oncpu)
panic("ctxsw GOT MOVED TO OTHER CPU!");
#endif
return;
}
static int windrv_wrap_stdcall(funcptr, funcptr *, int);
@ -909,8 +904,6 @@ x86_oldldt(dummy)
x86_setldt(&gtable, ltable);
mtx_unlock_spin(&dt_lock);
return;
}
static void
@ -959,8 +952,6 @@ x86_newldt(dummy)
mtx_unlock_spin(&dt_lock);
/* Whew. */
return;
}
#endif /* __i386__ */

View File

@ -102,7 +102,6 @@ hal_libinit()
patch++;
}
return (0);
}
@ -129,7 +128,6 @@ KeStallExecutionProcessor(usecs)
uint32_t usecs;
{
DELAY(usecs);
return;
}
static void
@ -138,21 +136,18 @@ WRITE_PORT_ULONG(port, val)
uint32_t val;
{
bus_space_write_4(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val);
return;
}
static void
WRITE_PORT_USHORT(uint16_t *port, uint16_t val)
{
bus_space_write_2(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val);
return;
}
static void
WRITE_PORT_UCHAR(uint8_t *port, uint8_t val)
{
bus_space_write_1(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val);
return;
}
static void
@ -163,7 +158,6 @@ WRITE_PORT_BUFFER_ULONG(port, val, cnt)
{
bus_space_write_multi_4(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
return;
}
static void
@ -174,7 +168,6 @@ WRITE_PORT_BUFFER_USHORT(port, val, cnt)
{
bus_space_write_multi_2(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
return;
}
static void
@ -185,7 +178,6 @@ WRITE_PORT_BUFFER_UCHAR(port, val, cnt)
{
bus_space_write_multi_1(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
return;
}
static uint16_t
@ -217,7 +209,6 @@ READ_PORT_BUFFER_ULONG(port, val, cnt)
{
bus_space_read_multi_4(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
return;
}
static void
@ -228,7 +219,6 @@ READ_PORT_BUFFER_USHORT(port, val, cnt)
{
bus_space_read_multi_2(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
return;
}
static void
@ -239,7 +229,6 @@ READ_PORT_BUFFER_UCHAR(port, val, cnt)
{
bus_space_read_multi_1(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
return;
}
/*
@ -378,8 +367,6 @@ KfReleaseSpinLock(kspin_lock *lock, uint8_t newirql)
{
KeReleaseSpinLockFromDpcLevel(lock);
KeLowerIrql(newirql);
return;
}
uint8_t
@ -431,8 +418,6 @@ KfLowerIrql(uint8_t oldirql)
mtx_unlock(&disp_lock[curthread->td_oncpu]);
sched_unpin();
return;
}
static uint8_t
@ -448,13 +433,11 @@ static void
_KeLowerIrql(uint8_t oldirql)
{
KeLowerIrql(oldirql);
return;
}
static void dummy()
{
printf("hal dummy called...\n");
return;
}
image_patch_table hal_functbl[] = {

View File

@ -385,8 +385,6 @@ NdisInitializeWrapper(wrapper, drv, path, unused)
*/
drv->dro_driverext->dre_adddevicefunc = NdisAddDevice;
return;
}
static void
@ -395,7 +393,6 @@ NdisTerminateWrapper(handle, syspec)
void *syspec;
{
/* Nothing to see here, move along. */
return;
}
static ndis_status
@ -482,8 +479,6 @@ NdisFreeMemory(vaddr, len, flags)
return;
ExFreePool(vaddr);
return;
}
static ndis_status
@ -517,8 +512,6 @@ NdisOpenConfiguration(status, cfg, wrapctx)
{
*cfg = wrapctx;
*status = NDIS_STATUS_SUCCESS;
return;
}
static void
@ -530,8 +523,6 @@ NdisOpenConfigurationKeyByName(status, cfg, subkey, subhandle)
{
*subhandle = cfg;
*status = NDIS_STATUS_SUCCESS;
return;
}
static void
@ -543,8 +534,6 @@ NdisOpenConfigurationKeyByIndex(status, cfg, idx, subkey, subhandle)
ndis_handle *subhandle;
{
*status = NDIS_STATUS_FAILURE;
return;
}
static ndis_status
@ -690,8 +679,6 @@ NdisReadConfiguration(status, parm, cfg, key, type)
RtlFreeAnsiString(&as);
*status = NDIS_STATUS_FAILURE;
return;
}
static ndis_status
@ -779,7 +766,6 @@ NdisWriteConfiguration(status, cfg, key, parm)
RtlFreeAnsiString(&as);
*status = NDIS_STATUS_SUCCESS;
return;
}
static void
@ -801,8 +787,6 @@ NdisCloseConfiguration(cfg)
RtlFreeUnicodeString(&p->ncp_parmdata.ncp_stringdata);
ExFreePool(e);
}
return;
}
/*
@ -814,8 +798,6 @@ NdisAllocateSpinLock(lock)
{
KeInitializeSpinLock(&lock->nsl_spinlock);
lock->nsl_kirql = 0;
return;
}
/*
@ -834,7 +816,6 @@ NdisFreeSpinLock(lock)
KeInitializeSpinLock(&lock->nsl_spinlock);
lock->nsl_kirql = 0;
#endif
return;
}
/*
@ -846,7 +827,6 @@ NdisAcquireSpinLock(lock)
ndis_spin_lock *lock;
{
KeAcquireSpinLock(&lock->nsl_spinlock, &lock->nsl_kirql);
return;
}
/*
@ -858,7 +838,6 @@ NdisReleaseSpinLock(lock)
ndis_spin_lock *lock;
{
KeReleaseSpinLock(&lock->nsl_spinlock, lock->nsl_kirql);
return;
}
/*
@ -869,7 +848,6 @@ NdisDprAcquireSpinLock(lock)
ndis_spin_lock *lock;
{
KeAcquireSpinLockAtDpcLevel(&lock->nsl_spinlock);
return;
}
/*
@ -880,7 +858,6 @@ NdisDprReleaseSpinLock(lock)
ndis_spin_lock *lock;
{
KeReleaseSpinLockFromDpcLevel(&lock->nsl_spinlock);
return;
}
static void
@ -889,7 +866,6 @@ NdisInitializeReadWriteLock(lock)
{
KeInitializeSpinLock(&lock->nrl_spinlock);
bzero((char *)&lock->nrl_rsvd, sizeof(lock->nrl_rsvd));
return;
}
static void
@ -901,8 +877,6 @@ NdisAcquireReadWriteLock(ndis_rw_lock *lock, uint8_t writeacc,
lock->nrl_rsvd[0]++;
} else
lock->nrl_rsvd[1]++;
return;
}
static void
@ -915,8 +889,6 @@ NdisReleaseReadWriteLock(lock, state)
KeReleaseSpinLock(&lock->nrl_spinlock, state->nls_oldirql);
} else
lock->nrl_rsvd[1]--;
return;
}
static uint32_t
@ -1047,8 +1019,6 @@ NdisWriteErrorLogEntry(ndis_handle adapter, ndis_error_code code,
if (as.as_len)
RtlFreeAnsiString(&as);
return;
}
static void
@ -1072,8 +1042,6 @@ ndis_map_cb(arg, segs, nseg, error)
}
ctx->nma_cnt = nseg;
return;
}
static void
@ -1110,8 +1078,6 @@ NdisMStartBufferPhysicalMapping(ndis_handle adapter, ndis_buffer *buf,
writedev ? BUS_DMASYNC_PREWRITE : BUS_DMASYNC_PREREAD);
*arraysize = nma.nma_cnt;
return;
}
static void
@ -1139,8 +1105,6 @@ NdisMCompleteBufferPhysicalMapping(adapter, buf, mapreg)
BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(sc->ndis_mtag, map);
return;
}
/*
@ -1158,8 +1122,6 @@ NdisInitializeTimer(timer, func, ctx)
KeInitializeTimer(&timer->nt_ktimer);
KeInitializeDpc(&timer->nt_kdpc, func, ctx);
KeSetImportanceDpc(&timer->nt_kdpc, KDPC_IMPORTANCE_LOW);
return;
}
static void
@ -1183,8 +1145,6 @@ ndis_timercall(dpc, timer, sysarg1, sysarg2)
if (NDIS_SERIALIZED(timer->nmt_block))
KeReleaseSpinLockFromDpcLevel(&timer->nmt_block->nmb_lock);
return;
}
/*
@ -1250,8 +1210,6 @@ NdisSetTimer(timer, msecs)
*/
KeSetTimer(&timer->nt_ktimer,
((int64_t)msecs * -10000), &timer->nt_kdpc);
return;
}
static void
@ -1261,8 +1219,6 @@ NdisMSetPeriodicTimer(timer, msecs)
{
KeSetTimerEx(&timer->nmt_ktimer,
((int64_t)msecs * -10000), msecs, &timer->nmt_kdpc);
return;
}
/*
@ -1279,7 +1235,6 @@ NdisMCancelTimer(timer, cancelled)
{
*cancelled = KeCancelTimer(&timer->nt_ktimer);
return;
}
static void
@ -1291,7 +1246,7 @@ NdisMQueryAdapterResources(status, adapter, list, buflen)
{
ndis_miniport_block *block;
struct ndis_softc *sc;
int rsclen;
uint32_t rsclen;
block = (ndis_miniport_block *)adapter;
sc = device_get_softc(block->nmb_physdeviceobj->do_devext);
@ -1306,8 +1261,6 @@ NdisMQueryAdapterResources(status, adapter, list, buflen)
bcopy((char *)block->nmb_rlist, (char *)list, rsclen);
*status = NDIS_STATUS_SUCCESS;
return;
}
static ndis_status
@ -1345,7 +1298,6 @@ NdisMDeregisterIoPortRange(adapter, port, numports, offset)
uint32_t numports;
void *offset;
{
return;
}
static void
@ -1386,8 +1338,6 @@ NdisReadNetworkAddress(status, addr, addrlen, adapter)
*addrlen = ETHER_ADDR_LEN;
*status = NDIS_STATUS_SUCCESS;
}
return;
}
static ndis_status
@ -1451,8 +1401,6 @@ NdisMFreeMapRegisters(adapter)
free(sc->ndis_mmaps, M_DEVBUF);
bus_dma_tag_destroy(sc->ndis_mtag);
return;
}
static void
@ -1470,8 +1418,6 @@ ndis_mapshared_cb(arg, segs, nseg, error)
p = arg;
p->np_quad = segs[0].ds_addr;
return;
}
/*
@ -1556,8 +1502,6 @@ NdisMAllocateSharedMemory(ndis_handle adapter, uint32_t len, uint8_t cached,
sh->ndis_saddr = *vaddr;
InsertHeadList((&sc->ndis_shlist), (&sh->ndis_list));
NDIS_UNLOCK(sc);
return;
}
struct ndis_allocwork {
@ -1593,8 +1537,6 @@ ndis_asyncmem_complete(dobj, arg)
IoFreeWorkItem(w->na_iw);
free(w, M_DEVBUF);
return;
}
static ndis_status
@ -1683,8 +1625,6 @@ NdisMFreeSharedMemory(ndis_handle adapter, uint32_t len, uint8_t cached,
bus_dma_tag_destroy(sh->ndis_stag);
free(sh, M_DEVBUF);
return;
}
static ndis_status
@ -1712,7 +1652,6 @@ NdisMUnmapIoSpace(adapter, vaddr, len)
uint32_t len;
{
MmUnmapIoSpace(vaddr, len);
return;
}
static uint32_t
@ -1811,7 +1750,6 @@ NdisAllocatePacketPool(status, pool, descnum, protrsvdlen)
*pool = p;
*status = NDIS_STATUS_SUCCESS;
return;
}
void
@ -1866,8 +1804,6 @@ NdisFreePacketPool(pool)
ExFreePool(p->np_pktmem);
ExFreePool(p);
return;
}
void
@ -1927,8 +1863,6 @@ NdisAllocatePacket(status, packet, pool)
*packet = pkt;
*status = NDIS_STATUS_SUCCESS;
return;
}
void
@ -1955,8 +1889,6 @@ NdisFreePacket(packet)
}
KeReleaseSpinLock(&p->np_lock, irql);
#endif
return;
}
static void
@ -1980,8 +1912,6 @@ NdisUnchainBufferAtFront(packet, buf)
*buf = priv->npp_head;
priv->npp_head = (*buf)->mdl_next;
}
return;
}
static void
@ -2010,8 +1940,6 @@ NdisUnchainBufferAtBack(packet, buf)
priv->npp_tail = tmp;
tmp->mdl_next = NULL;
}
return;
}
/*
@ -2042,14 +1970,12 @@ NdisAllocateBufferPool(status, pool, descnum)
*pool = NonPagedPool;
*status = NDIS_STATUS_SUCCESS;
return;
}
static void
NdisFreeBufferPool(pool)
ndis_handle pool;
{
return;
}
static void
@ -2072,8 +1998,6 @@ NdisAllocateBuffer(status, buffer, pool, vaddr, len)
*buffer = buf;
*status = NDIS_STATUS_SUCCESS;
return;
}
static void
@ -2081,7 +2005,6 @@ NdisFreeBuffer(buf)
ndis_buffer *buf;
{
IoFreeMdl(buf);
return;
}
/* Aw c'mon. */
@ -2107,8 +2030,6 @@ NdisQueryBuffer(buf, vaddr, len)
if (vaddr != NULL)
*vaddr = MmGetMdlVirtualAddress(buf);
*len = MmGetMdlByteCount(buf);
return;
}
/* Same as above -- we don't care about the priority. */
@ -2123,8 +2044,6 @@ NdisQueryBufferSafe(buf, vaddr, len, prio)
if (vaddr != NULL)
*vaddr = MmGetMdlVirtualAddress(buf);
*len = MmGetMdlByteCount(buf);
return;
}
/* Damnit Microsoft!! How many ways can you do the same thing?! */
@ -2150,8 +2069,6 @@ NdisAdjustBufferLength(buf, len)
int len;
{
MmGetMdlByteCount(buf) = len;
return;
}
static uint32_t
@ -2180,7 +2097,6 @@ NdisInitializeEvent(event)
* not signaled state.
*/
KeInitializeEvent(&event->ne_event, EVENT_TYPE_NOTIFY, FALSE);
return;
}
static void
@ -2188,7 +2104,6 @@ NdisSetEvent(event)
ndis_event *event;
{
KeSetEvent(&event->ne_event, IO_NO_INCREMENT, FALSE);
return;
}
static void
@ -2196,7 +2111,6 @@ NdisResetEvent(event)
ndis_event *event;
{
KeResetEvent(&event->ne_event);
return;
}
static uint8_t
@ -2337,8 +2251,6 @@ ndis_intrhand(dpc, intr, sysarg1, sysarg2)
if (intr->ni_dpccnt == 0)
KeSetEvent(&intr->ni_dpcevt, IO_NO_INCREMENT, FALSE);
KeReleaseSpinLockFromDpcLevel(&intr->ni_dpccountlock);
return;
}
static ndis_status
@ -2408,8 +2320,6 @@ NdisMDeregisterInterrupt(intr)
KeWaitForSingleObject(&intr->ni_dpcevt, 0, 0, FALSE, NULL);
KeResetEvent(&intr->ni_dpcevt);
return;
}
static void
@ -2431,8 +2341,6 @@ NdisMRegisterAdapterShutdownHandler(adapter, shutdownctx, shutdownfunc)
chars->nmc_shutdown_handler = shutdownfunc;
chars->nmc_rsvd0 = shutdownctx;
return;
}
static void
@ -2452,8 +2360,6 @@ NdisMDeregisterAdapterShutdownHandler(adapter)
chars->nmc_shutdown_handler = NULL;
chars->nmc_rsvd0 = NULL;
return;
}
static uint32_t
@ -2477,7 +2383,6 @@ NdisGetBufferPhysicalArraySize(buf, pages)
return;
*pages = NDIS_BUFFER_TO_SPAN_PAGES(buf);
return;
}
static void
@ -2491,8 +2396,6 @@ NdisQueryBufferOffset(buf, off, len)
*off = MmGetMdlByteOffset(buf);
*len = MmGetMdlByteCount(buf);
return;
}
void
@ -2514,8 +2417,6 @@ NdisMSleep(usecs)
KeSetTimer(&timer, ((int64_t)usecs * -10), NULL);
KeWaitForSingleObject(&timer, 0, 0, FALSE, NULL);
}
return;
}
static uint32_t
@ -2648,7 +2549,6 @@ NdisGetCurrentSystemTime(tval)
uint64_t *tval;
{
ntoskrnl_time(tval);
return;
}
/*
@ -2662,8 +2562,6 @@ NdisGetSystemUpTime(tval)
nanouptime(&ts);
*tval = ts.tv_nsec / 1000000 + ts.tv_sec * 1000;
return;
}
static void
@ -2674,7 +2572,6 @@ NdisInitializeString(dst, src)
ansi_string as;
RtlInitAnsiString(&as, src);
RtlAnsiStringToUnicodeString(dst, &as, TRUE);
return;
}
static void
@ -2682,7 +2579,6 @@ NdisFreeString(str)
unicode_string *str;
{
RtlFreeUnicodeString(str);
return;
}
static ndis_status
@ -2698,7 +2594,6 @@ NdisInitAnsiString(dst, src)
char *src;
{
RtlInitAnsiString(dst, src);
return;
}
static void
@ -2707,7 +2602,6 @@ NdisInitUnicodeString(dst, src)
uint16_t *src;
{
RtlInitUnicodeString(dst, src);
return;
}
static void NdisMGetDeviceProperty(adapter, phydevobj,
@ -2729,8 +2623,6 @@ static void NdisMGetDeviceProperty(adapter, phydevobj,
*funcdevobj = block->nmb_deviceobj;
if (nextdevobj != NULL)
*nextdevobj = block->nmb_nextdeviceobj;
return;
}
static void
@ -2754,8 +2646,6 @@ NdisGetFirstBufferFromPacket(packet, buf, firstva, firstlen, totlen)
for (tmp = tmp->mdl_next; tmp != NULL; tmp = tmp->mdl_next)
*totlen += MmGetMdlByteCount(tmp);
}
return;
}
static void
@ -2960,8 +2850,6 @@ NdisOpenFile(status, filehandle, filelength, filename, highestaddr)
*filehandle = fh;
*filelength = fh->nf_maplen = vap->va_size & 0xFFFFFFFF;
*status = NDIS_STATUS_SUCCESS;
return;
}
static void
@ -3025,8 +2913,6 @@ NdisMapFile(status, mappedbuffer, filehandle)
*status = NDIS_STATUS_SUCCESS;
*mappedbuffer = fh->nf_map;
}
return;
}
static void
@ -3042,8 +2928,6 @@ NdisUnmapFile(filehandle)
if (fh->nf_type == NDIS_FH_TYPE_VFS)
ExFreePool(fh->nf_map);
fh->nf_map = NULL;
return;
}
static void
@ -3078,8 +2962,6 @@ NdisCloseFile(filehandle)
fh->nf_vp = NULL;
free(fh->nf_name, M_DEVBUF);
ExFreePool(fh);
return;
}
static uint8_t
@ -3103,7 +2985,6 @@ NdisMIndicateStatusComplete(adapter)
statusdonefunc = block->nmb_statusdone_func;
MSCALL1(statusdonefunc, adapter);
return;
}
static void
@ -3120,7 +3001,6 @@ NdisMIndicateStatus(adapter, status, sbuf, slen)
statusfunc = block->nmb_status_func;
MSCALL4(statusfunc, adapter, status, sbuf, slen);
return;
}
/*
@ -3244,7 +3124,6 @@ NdisCopyFromPacketToPacket(dpkt, doff, reqlen, spkt, soff, cpylen)
}
*cpylen = copied;
return;
}
static void
@ -3258,7 +3137,6 @@ NdisCopyFromPacketToPacketSafe(dpkt, doff, reqlen, spkt, soff, cpylen, prio)
uint32_t prio;
{
NdisCopyFromPacketToPacket(dpkt, doff, reqlen, spkt, soff, cpylen);
return;
}
static void
@ -3324,14 +3202,12 @@ NdisMRegisterUnloadHandler(handle, func)
ndis_handle handle;
void *func;
{
return;
}
static void
dummy()
{
printf("NDIS dummy called...\n");
return;
}
/*

View File

@ -550,7 +550,6 @@ RtlCopyUnicodeString(dest, src)
else
dest->us_len = dest->us_maxlen;
memcpy(dest->us_buf, src->us_buf, dest->us_len);
return;
}
static void
@ -567,8 +566,6 @@ ntoskrnl_ascii_to_unicode(ascii, unicode, len)
*ustr = (uint16_t)ascii[i];
ustr++;
}
return;
}
static void
@ -585,8 +582,6 @@ ntoskrnl_unicode_to_ascii(unicode, ascii, len)
*astr = (uint8_t)unicode[i];
astr++;
}
return;
}
uint32_t
@ -662,7 +657,6 @@ ExFreePool(buf)
void *buf;
{
free(buf, M_DEVBUF);
return;
}
uint32_t
@ -824,8 +818,6 @@ IoDeleteDevice(dev)
}
ExFreePool(dev);
return;
}
device_object *
@ -1062,7 +1054,6 @@ IoFreeIrp(ip)
irp *ip;
{
ExFreePool(ip);
return;
}
static void
@ -1075,8 +1066,6 @@ IoInitializeIrp(irp *io, uint16_t psize, uint8_t ssize)
InitializeListHead(&io->irp_thlist);
io->irp_tail.irp_overlay.irp_csl =
(io_stack_location *)(io + 1) + ssize;
return;
}
static void
@ -1090,22 +1079,18 @@ IoReuseIrp(ip, status)
IoInitializeIrp(ip, ip->irp_size, ip->irp_stackcnt);
ip->irp_iostat.isb_status = status;
ip->irp_allocflags = allocflags;
return;
}
void
IoAcquireCancelSpinLock(uint8_t *irql)
{
KeAcquireSpinLock(&ntoskrnl_cancellock, irql);
return;
}
void
IoReleaseCancelSpinLock(uint8_t irql)
{
KeReleaseSpinLock(&ntoskrnl_cancellock, irql);
return;
}
uint8_t
@ -1230,8 +1215,6 @@ IofCompleteRequest(irp *ip, uint8_t prioboost)
IoFreeMdl(ip->irp_mdl);
IoFreeIrp(ip);
}
return;
}
void
@ -1253,8 +1236,6 @@ ntoskrnl_intr(arg)
l = l->nle_flink;
}
KeReleaseSpinLock(&ntoskrnl_intlock, irql);
return;
}
uint8_t
@ -1270,7 +1251,6 @@ void
KeReleaseInterruptSpinLock(kinterrupt *iobj, uint8_t irql)
{
KeReleaseSpinLock(&ntoskrnl_intlock, irql);
return;
}
uint8_t
@ -1345,8 +1325,6 @@ IoDisconnectInterrupt(iobj)
KeReleaseSpinLock(&ntoskrnl_intlock, irql);
ExFreePool(iobj);
return;
}
device_object *
@ -1392,8 +1370,6 @@ IoDetachDevice(topdev)
}
mtx_unlock(&ntoskrnl_dispatchlock);
return;
}
/*
@ -1460,8 +1436,6 @@ ntoskrnl_satisfy_wait(obj, td)
default:
break;
}
return;
}
static void
@ -1479,8 +1453,6 @@ ntoskrnl_satisfy_multiple_waits(wb)
cur->wb_awakened = TRUE;
cur = cur->wb_next;
} while (cur != wb);
return;
}
/* Always called with dispatcher lock held. */
@ -1562,8 +1534,6 @@ ntoskrnl_waittest(obj, increment)
e = e->nle_flink;
}
return;
}
/*
@ -1579,8 +1549,6 @@ ntoskrnl_time(tval)
nanotime(&ts);
*tval = (uint64_t)ts.tv_nsec / 100 + (uint64_t)ts.tv_sec * 10000000 +
11644473600 * 10000000; /* 100ns ticks from 1601 to 1970 */
return;
}
static void
@ -1966,7 +1934,6 @@ static void
WRITE_REGISTER_USHORT(uint16_t *reg, uint16_t val)
{
bus_space_write_2(NDIS_BUS_SPACE_MEM, 0x0, (bus_size_t)reg, val);
return;
}
static uint16_t
@ -1982,7 +1949,6 @@ WRITE_REGISTER_ULONG(reg, val)
uint32_t val;
{
bus_space_write_4(NDIS_BUS_SPACE_MEM, 0x0, (bus_size_t)reg, val);
return;
}
static uint32_t
@ -2002,7 +1968,6 @@ static void
WRITE_REGISTER_UCHAR(uint8_t *reg, uint8_t val)
{
bus_space_write_1(NDIS_BUS_SPACE_MEM, 0x0, (bus_size_t)reg, val);
return;
}
static int64_t
@ -2167,8 +2132,6 @@ ExInitializePagedLookasideList(paged_lookaside_list *lookaside,
lookaside->nll_l.gl_type = NonPagedPool;
lookaside->nll_l.gl_depth = depth;
lookaside->nll_l.gl_maxdepth = LOOKASIDE_DEPTH;
return;
}
static void
@ -2181,8 +2144,6 @@ ExDeletePagedLookasideList(lookaside)
freefunc = lookaside->nll_l.gl_freefunc;
while((buf = ntoskrnl_popsl(&lookaside->nll_l.gl_listhead)) != NULL)
MSCALL1(freefunc, buf);
return;
}
static void
@ -2216,8 +2177,6 @@ ExInitializeNPagedLookasideList(npaged_lookaside_list *lookaside,
lookaside->nll_l.gl_type = NonPagedPool;
lookaside->nll_l.gl_depth = depth;
lookaside->nll_l.gl_maxdepth = LOOKASIDE_DEPTH;
return;
}
static void
@ -2230,8 +2189,6 @@ ExDeleteNPagedLookasideList(lookaside)
freefunc = lookaside->nll_l.gl_freefunc;
while((buf = ntoskrnl_popsl(&lookaside->nll_l.gl_listhead)) != NULL)
MSCALL1(freefunc, buf);
return;
}
slist_entry *
@ -2296,8 +2253,6 @@ KeInitializeSpinLock(lock)
kspin_lock *lock;
{
*lock = 0;
return;
}
#ifdef __i386__
@ -2317,8 +2272,6 @@ KefAcquireSpinLockAtDpcLevel(lock)
panic("DEADLOCK!");
#endif
}
return;
}
void
@ -2326,8 +2279,6 @@ KefReleaseSpinLockFromDpcLevel(lock)
kspin_lock *lock;
{
atomic_store_rel_int((volatile u_int *)lock, 0);
return;
}
uint8_t
@ -2349,16 +2300,12 @@ KeAcquireSpinLockAtDpcLevel(kspin_lock *lock)
{
while (atomic_cmpset_acq_int((volatile u_int *)lock, 0, 1) == 0)
/* sit and spin */;
return;
}
void
KeReleaseSpinLockFromDpcLevel(kspin_lock *lock)
{
atomic_store_rel_int((volatile u_int *)lock, 0);
return;
}
#endif /* __i386__ */
@ -2401,8 +2348,6 @@ ExInterlockedAddLargeStatistic(addend, inc)
mtx_lock_spin(&ntoskrnl_interlock);
*addend += inc;
mtx_unlock_spin(&ntoskrnl_interlock);
return;
};
mdl *
@ -2462,8 +2407,6 @@ IoFreeMdl(m)
uma_zfree(mdl_zone, m);
else
ExFreePool(m);
return;
}
static void *
@ -2551,8 +2494,6 @@ MmBuildMdlForNonPagedPool(m)
m->mdl_flags |= MDL_SOURCE_IS_NONPAGED_POOL;
m->mdl_mappedsystemva = MmGetMdlVirtualAddress(m);
return;
}
static void *
@ -2575,7 +2516,6 @@ MmUnmapLockedPages(vaddr, buf)
mdl *buf;
{
buf->mdl_flags &= ~MDL_MAPPED_TO_SYSTEM_VA;
return;
}
/*
@ -2640,7 +2580,6 @@ MmUnmapIoSpace(vaddr, len)
void *vaddr;
size_t len;
{
return;
}
@ -2782,8 +2721,6 @@ ntoskrnl_destroy_workitem_threads(void)
while (kq->kq_exit)
tsleep(kq->kq_td->td_proc, PWAIT, "waitiw", hz/10);
}
return;
}
io_workitem *
@ -2812,7 +2749,6 @@ IoFreeWorkItem(iw)
io_workitem *iw;
{
uma_zfree(iw_zone, iw);
return;
}
void
@ -2855,8 +2791,6 @@ IoQueueWorkItem(iw, iw_func, qtype, ctx)
KeReleaseSpinLock(&kq->kq_lock, irql);
KeSetEvent(&kq->kq_proc, IO_NO_INCREMENT, FALSE);
return;
}
static void
@ -2873,8 +2807,6 @@ ntoskrnl_workitem(dobj, arg)
f = (work_item_func)w->wqi_func;
uma_zfree(iw_zone, iw);
MSCALL2(f, w, w->wqi_ctx);
return;
}
/*
@ -2945,8 +2877,6 @@ ExQueueWorkItem(w, qtype)
iw->iw_idx = WORKITEM_LEGACY_THREAD;
iwf = (io_workitem_func)ntoskrnl_findwrap((funcptr)ntoskrnl_workitem);
IoQueueWorkItem(iw, iwf, qtype, iw);
return;
}
static void
@ -2955,7 +2885,6 @@ RtlZeroMemory(dst, len)
size_t len;
{
bzero(dst, len);
return;
}
static void
@ -2965,7 +2894,6 @@ RtlCopyMemory(dst, src, len)
size_t len;
{
bcopy(src, dst, len);
return;
}
static size_t
@ -3004,8 +2932,6 @@ RtlInitAnsiString(dst, src)
a->as_buf = src;
a->as_len = a->as_maxlen = strlen(src);
}
return;
}
void
@ -3029,8 +2955,6 @@ RtlInitUnicodeString(dst, src)
u->us_buf = src;
u->us_len = u->us_maxlen = i * 2;
}
return;
}
ndis_status
@ -3095,7 +3019,6 @@ RtlFreeUnicodeString(ustr)
return;
ExFreePool(ustr->us_buf);
ustr->us_buf = NULL;
return;
}
void
@ -3106,7 +3029,6 @@ RtlFreeAnsiString(astr)
return;
ExFreePool(astr->as_buf);
astr->as_buf = NULL;
return;
}
static int
@ -3138,7 +3060,6 @@ srand(seed)
unsigned int seed;
{
srandom(seed);
return;
}
static uint8_t
@ -3198,7 +3119,6 @@ KeInitializeMutex(kmutex, level)
kmutex->km_header.dh_type = DISP_TYPE_MUTANT;
kmutex->km_header.dh_size = sizeof(kmutant) / sizeof(uint32_t);
kmutex->km_ownerthread = NULL;
return;
}
static uint32_t
@ -3243,7 +3163,6 @@ KeInitializeEvent(nt_kevent *kevent, uint32_t type, uint8_t state)
else
kevent->k_header.dh_type = DISP_TYPE_SYNCHRONIZATION_EVENT;
kevent->k_header.dh_size = sizeof(nt_kevent) / sizeof(uint32_t);
return;
}
uint32_t
@ -3318,7 +3237,6 @@ KeClearEvent(kevent)
nt_kevent *kevent;
{
kevent->k_header.dh_sigstate = FALSE;
return;
}
uint32_t
@ -3393,8 +3311,6 @@ ObfDereferenceObject(object)
nr = object;
TAILQ_REMOVE(&ntoskrnl_reflist, nr, link);
free(nr, M_DEVBUF);
return;
}
static uint32_t
@ -3625,8 +3541,6 @@ ntoskrnl_timercall(arg)
if (dpc != NULL)
KeInsertQueueDpc(dpc, NULL, NULL);
return;
}
#ifdef NTOSKRNL_DEBUG_TIMERS
@ -3661,8 +3575,6 @@ ntoskrnl_show_timers()
printf("timer cancels: %qu\n", ntoskrnl_timer_cancels);
printf("timer fires: %qu\n", ntoskrnl_timer_fires);
printf("\n");
return;
}
#endif
@ -3700,8 +3612,6 @@ ntoskrnl_insert_timer(timer, ticks)
callout_init(c, CALLOUT_MPSAFE);
callout_reset(c, ticks, ntoskrnl_timercall, timer);
return;
}
static void
@ -3716,8 +3626,6 @@ ntoskrnl_remove_timer(timer)
mtx_lock_spin(&ntoskrnl_calllock);
InsertHeadList((&ntoskrnl_calllist), (&e->ce_list));
mtx_unlock_spin(&ntoskrnl_calllock);
return;
}
void
@ -3728,8 +3636,6 @@ KeInitializeTimer(timer)
return;
KeInitializeTimerEx(timer, EVENT_TYPE_NOTIFY);
return;
}
void
@ -3749,8 +3655,6 @@ KeInitializeTimerEx(timer, type)
else
timer->k_header.dh_type = DISP_TYPE_SYNCHRONIZATION_TIMER;
timer->k_header.dh_size = sizeof(ktimer) / sizeof(uint32_t);
return;
}
/*
@ -3867,8 +3771,6 @@ ntoskrnl_destroy_dpc_threads(void)
while (kq->kq_exit)
tsleep(kq->kq_td->td_proc, PWAIT, "dpcw", hz/10);
}
return;
}
static uint8_t
@ -3910,8 +3812,6 @@ KeInitializeDpc(dpc, dpcfunc, dpcctx)
dpc->k_num = KDPC_CPU_DEFAULT;
dpc->k_importance = KDPC_IMPORTANCE_MEDIUM;
InitializeListHead((&dpc->k_dpclistentry));
return;
}
uint8_t
@ -4007,7 +3907,6 @@ KeSetImportanceDpc(dpc, imp)
return;
dpc->k_importance = (uint8_t)imp;
return;
}
void
@ -4017,7 +3916,6 @@ KeSetTargetProcessorDpc(kdpc *dpc, uint8_t cpu)
return;
dpc->k_num = cpu;
return;
}
void
@ -4040,8 +3938,6 @@ KeFlushQueuedDpcs(void)
KeSetEvent(&kq->kq_proc, IO_NO_INCREMENT, FALSE);
KeWaitForSingleObject(&kq->kq_done, 0, 0, TRUE, NULL);
}
return;
}
uint32_t
@ -4223,7 +4119,6 @@ static void
dummy()
{
printf("ntoskrnl dummy called...\n");
return;
}

View File

@ -589,7 +589,7 @@ usbd_func_selconf(ip)
intf->uii_len);
}
return USBD_STATUS_SUCCESS;
return (USBD_STATUS_SUCCESS);
}
static usb_error_t
@ -1348,10 +1348,10 @@ USBD_CreateConfigurationRequest(conf, len)
-1, -1, -1, -1, -1);
urb = USBD_CreateConfigurationRequestEx(conf, list);
if (urb == NULL)
return NULL;
return (NULL);
*len = urb->uu_selconf.usc_hdr.uuh_len;
return urb;
return (urb);
}
static union usbd_urb *
@ -1375,7 +1375,7 @@ USBD_CreateConfigurationRequestEx(conf, list)
selconf = ExAllocatePoolWithTag(NonPagedPool, size, 0);
if (selconf == NULL)
return NULL;
return (NULL);
selconf->usc_hdr.uuh_func = URB_FUNCTION_SELECT_CONFIGURATION;
selconf->usc_hdr.uuh_len = size;
selconf->usc_handle = conf;
@ -1421,8 +1421,6 @@ USBD_GetUSBDIVersion(ui)
ui->uvi_usbdi_vers = USBDI_VERSION;
ui->uvi_supported_vers = USB_VER_2_0;
return;
}
static usb_interface_descriptor_t *
@ -1473,7 +1471,6 @@ static void
dummy(void)
{
printf("USBD dummy called\n");
return;
}
image_patch_table usbd_functbl[] = {

View File

@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$");
#include <sys/sysctl.h>
#include <sys/kthread.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <net/ethernet.h>
@ -137,7 +136,6 @@ static void ndis_linksts (ndis_handle, ndis_status, void *, uint32_t);
static void ndis_linksts_done (ndis_handle);
/* We need to wrap these functions for amd64. */
static funcptr ndis_txeof_wrap;
static funcptr ndis_rxeof_wrap;
static funcptr ndis_rxeof_eth_wrap;
@ -210,7 +208,6 @@ static int ndisdrv_loaded = 0;
* image, and create a Windows driver object which will be
* saved in our driver database.
*/
int
ndisdrv_modevent(mod, cmd, arg)
module_t mod;
@ -352,8 +349,6 @@ ndis_setmulti(sc)
&sc->ndis_filter, &len);
if (error)
device_printf(sc->ndis_dev, "set multi failed: %d\n", error);
return;
}
static int
@ -659,7 +654,6 @@ ndis_attach(dev)
* If this is a deserialized miniport, we don't have
* to honor the OID_GEN_MAXIMUM_SEND_PACKETS result.
*/
if (!NDIS_SERIALIZED(sc->ndis_block))
sc->ndis_maxpkts = NDIS_TXPKTS;
@ -698,12 +692,11 @@ ndis_attach(dev)
* supported by this driver. If it is, then this an 802.11
* wireless driver, and we should set up media for wireless.
*/
for (i = 0; i < sc->ndis_oidcnt; i++) {
for (i = 0; i < sc->ndis_oidcnt; i++)
if (sc->ndis_oids[i] == OID_802_11_CONFIGURATION) {
sc->ndis_80211++;
break;
}
}
if (sc->ndis_80211)
ifp = if_alloc(IFT_IEEE80211);
@ -1160,7 +1153,6 @@ ndis_resume(dev)
* serialized miniports, or IRQL <= DISPATCH_LEVEL for deserialized
* miniports.
*/
static void
ndis_rxeof_eth(adapter, ctx, addr, hdr, hdrlen, lookahead, lookaheadlen, pktlen)
ndis_handle adapter;
@ -1230,8 +1222,6 @@ ndis_rxeof_eth(adapter, ctx, addr, hdr, hdrlen, lookahead, lookaheadlen, pktlen)
if (!NDIS_SERIALIZED(block))
KeReleaseSpinLock(&block->nmb_lock, irql);
return;
}
/*
@ -1239,7 +1229,6 @@ ndis_rxeof_eth(adapter, ctx, addr, hdr, hdrlen, lookahead, lookaheadlen, pktlen)
* for serialized miniports, or IRQL <= DISPATCH_LEVEL for deserialized
* miniports.
*/
static void
ndis_rxeof_done(adapter)
ndis_handle adapter;
@ -1254,8 +1243,6 @@ ndis_rxeof_done(adapter)
sc = device_get_softc(block->nmb_physdeviceobj->do_devext);
KeInsertQueueDpc(&sc->ndis_rxdpc, NULL, NULL);
return;
}
/*
@ -1330,8 +1317,6 @@ ndis_rxeof_xfr(dpc, adapter, sysarg1, sysarg2)
}
KeReleaseSpinLockFromDpcLevel(&block->nmb_lock);
return;
}
/*
@ -1370,8 +1355,6 @@ ndis_rxeof_xfr_done(adapter, packet, status, len)
IoQueueWorkItem(sc->ndis_inputitem,
(io_workitem_func)ndis_inputtask_wrap,
WORKQUEUE_CRITICAL, ifp);
return;
}
/*
* A frame has been uploaded: pass the resulting mbuf chain up to
@ -1416,7 +1399,6 @@ ndis_rxeof(adapter, packets, pktcnt)
* before we're completely ready to handle them. If we detect this,
* we need to return them to the miniport and ignore them.
*/
if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
for (i = 0; i < pktcnt; i++) {
p = packets[i];
@ -1498,8 +1480,6 @@ ndis_rxeof(adapter, packets, pktcnt)
WORKQUEUE_CRITICAL, ifp);
}
}
return;
}
/*
@ -1508,7 +1488,6 @@ ndis_rxeof(adapter, packets, pktcnt)
* with any locks held (at DISPATCH_LEVEL, we'll be holding the
* 'dispatch level' per-cpu sleep lock).
*/
static void
ndis_inputtask(dobj, arg)
device_object *dobj;
@ -1541,8 +1520,6 @@ ndis_inputtask(dobj, arg)
KeAcquireSpinLock(&sc->ndis_rxlock, &irql);
}
KeReleaseSpinLock(&sc->ndis_rxlock, irql);
return;
}
/*
@ -1591,8 +1568,6 @@ ndis_txeof(adapter, packet, status)
IoQueueWorkItem(sc->ndis_startitem,
(io_workitem_func)ndis_starttask_wrap,
WORKQUEUE_CRITICAL, ifp);
return;
}
static void
@ -1633,8 +1608,6 @@ ndis_linksts(adapter, status, sbuf, slen)
sc->ndis_evt[sc->ndis_evtpidx].ne_len = slen;
NDIS_EVTINC(sc->ndis_evtpidx);
NDIS_UNLOCK(sc);
return;
}
static void
@ -1674,8 +1647,6 @@ ndis_linksts_done(adapter)
/* Notify possible listners of interface change. */
rt_ifmsg(ifp);
return;
}
static void
@ -1765,8 +1736,6 @@ ndis_ticktask(d, xsc)
}
NDIS_UNLOCK(sc);
return;
}
static void
@ -1792,8 +1761,6 @@ ndis_map_sclist(arg, segs, nseg, mapsize, error)
sclist->nsl_elements[i].nse_addr.np_quad = segs[i].ds_addr;
sclist->nsl_elements[i].nse_len = segs[i].ds_len;
}
return;
}
static int
@ -1803,7 +1770,7 @@ ndis_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
/* no support; just discard */
m_freem(m);
ieee80211_free_node(ni);
return 0;
return (0);
}
static void
@ -1831,7 +1798,6 @@ ndis_starttask(d, arg)
if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
ndis_start(ifp);
return;
}
/*
@ -1846,7 +1812,6 @@ ndis_starttask(d, arg)
* we need to perform busdma work here. Those that use map registers
* will do the mapping themselves on a buffer by buffer basis.
*/
static void
ndis_start(ifp)
struct ifnet *ifp;
@ -1860,7 +1825,6 @@ ndis_start(ifp)
sc = ifp->if_softc;
NDIS_LOCK(sc);
if (!sc->ndis_link || ifp->if_drv_flags & IFF_DRV_OACTIVE) {
NDIS_UNLOCK(sc);
return;
@ -1933,7 +1897,6 @@ ndis_start(ifp)
* If there's a BPF listener, bounce a copy of this frame
* to him.
*/
if (!sc->ndis_80211) /* XXX handle 80211 */
BPF_MTAP(ifp, m);
@ -1944,7 +1907,6 @@ ndis_start(ifp)
* so the this batch of packets can be transmitted, then
* wait for txeof to ask us to send the rest.
*/
if (sc->ndis_txidx == 0)
break;
}
@ -1970,7 +1932,6 @@ ndis_start(ifp)
* a MiniportSend() routine (which sends just a single
* packet).
*/
if (sc->ndis_chars->nmc_sendmulti_func != NULL)
ndis_send_packets(sc, p0, pcnt);
else
@ -2034,7 +1995,6 @@ ndis_init(xsc)
/*
* Set lookahead.
*/
i = ifp->if_mtu;
len = sizeof(i);
ndis_set_info(sc, OID_GEN_CURRENT_LOOKAHEAD, &i, &len);
@ -2105,7 +2065,7 @@ ndis_ifmedia_sts(ifp, ifmr)
struct ndis_softc *sc;
uint32_t media_info;
ndis_media_state linkstate;
int error, len;
int len;
ifmr->ifm_status = IFM_AVALID;
ifmr->ifm_active = IFM_ETHER;
@ -2115,11 +2075,11 @@ ndis_ifmedia_sts(ifp, ifmr)
return;
len = sizeof(linkstate);
error = ndis_get_info(sc, OID_GEN_MEDIA_CONNECT_STATUS,
ndis_get_info(sc, OID_GEN_MEDIA_CONNECT_STATUS,
(void *)&linkstate, &len);
len = sizeof(media_info);
error = ndis_get_info(sc, OID_GEN_LINK_SPEED,
ndis_get_info(sc, OID_GEN_LINK_SPEED,
(void *)&media_info, &len);
if (linkstate == nmc_connected)
@ -2139,8 +2099,6 @@ ndis_ifmedia_sts(ifp, ifmr)
device_printf(sc->ndis_dev, "unknown speed: %d\n", media_info);
break;
}
return;
}
static int
@ -2200,7 +2158,6 @@ ndis_set_cipher(sc, cipher)
* of the WPA authentication modes isn't enabled, the driver
* might not permit the TKIP or AES ciphers to be selected.
*/
static int
ndis_set_wpa(sc, ie, ielen)
struct ndis_softc *sc;
@ -2301,7 +2258,6 @@ ndis_setstate_80211(sc)
}
/* Disassociate and turn off radio. */
len = sizeof(arg);
arg = 1;
ndis_set_info(sc, OID_802_11_DISASSOCIATE, &arg, &len);
@ -2320,7 +2276,6 @@ ndis_setstate_80211(sc)
device_printf (sc->ndis_dev, "set infra failed: %d\n", rval);
/* Set power management */
len = sizeof(arg);
if (vap->iv_flags & IEEE80211_F_PMGTON)
arg = NDIS_80211_POWERMODE_FAST_PSP;
@ -2340,7 +2295,6 @@ ndis_setstate_80211(sc)
* Default encryption mode to off, authentication
* to open and privacy to 'accept everything.'
*/
len = sizeof(arg);
arg = NDIS_80211_WEPSTAT_DISABLED;
ndis_set_info(sc, OID_802_11_ENCRYPTION_STATUS, &arg, &len);
@ -2350,7 +2304,7 @@ ndis_setstate_80211(sc)
ndis_set_info(sc, OID_802_11_AUTHENTICATION_MODE, &arg, &len);
/*
* Note that OID_80211_PRIVACY_FILTER is optional:
* Note that OID_802_11_PRIVACY_FILTER is optional:
* not all drivers implement it.
*/
len = sizeof(arg);
@ -2407,7 +2361,6 @@ ndis_setstate_80211(sc)
if (rval)
device_printf(sc->ndis_dev,
"setting BSSID failed: %d\n", rval);
}
static void
@ -2484,9 +2437,9 @@ ndis_auth_and_assoc(sc, vap)
/*
* 5, 13 and 16 are the only valid
* only valid key lengths. Anything
* in between will be zero padded out to
* the next highest boundary.
* key lengths. Anything in between
* will be zero padded out to the
* next highest boundary.
*/
if (vap->iv_nw_keys[i].wk_keylen < 5)
wep.nw_keylen = 5;
@ -2787,10 +2740,8 @@ ndis_getstate_80211(sc)
free(bs, M_TEMP);
/*
* Determine current authentication mode. Note: authmode
* reporting isn't supported prior to FreeBSD 6.x.
* Determine current authentication mode.
*/
len = sizeof(arg);
rval = ndis_get_info(sc, OID_802_11_AUTHENTICATION_MODE, &arg, &len);
if (rval)
@ -2836,7 +2787,6 @@ ndis_getstate_80211(sc)
vap->iv_flags |= IEEE80211_F_PRIVACY|IEEE80211_F_DROPUNENC;
else
vap->iv_flags &= ~(IEEE80211_F_PRIVACY|IEEE80211_F_DROPUNENC);
return;
}
static int
@ -3081,7 +3031,6 @@ ndis_del_key(vap, key)
* only use it for WPA TKIP or AES keys. These need to be
* set after initial authentication with the AP.
*/
static int
ndis_add_key(vap, key, mac)
struct ieee80211vap *vap;
@ -3173,7 +3122,6 @@ ndis_resettask(d, arg)
sc = arg;
ndis_reset_nic(sc);
return;
}
/*
@ -3214,8 +3162,6 @@ ndis_stop(sc)
sc->ndis_evtcidx = 0;
sc->ndis_evtpidx = 0;
NDIS_UNLOCK(sc);
return;
}
/*
@ -3230,8 +3176,6 @@ ndis_shutdown(dev)
sc = device_get_softc(dev);
ndis_stop(sc);
return;
}
static int
@ -3426,8 +3370,7 @@ ndis_scan_start(struct ieee80211com *ic)
DPRINTF(("%s: set ESSID failed\n", __func__));
len = 0;
error = ndis_set_info(sc, OID_802_11_BSSID_LIST_SCAN,
NULL, &len);
error = ndis_set_info(sc, OID_802_11_BSSID_LIST_SCAN, NULL, &len);
if (error) {
DPRINTF(("%s: scan command failed\n", __func__));
ieee80211_cancel_scan(vap);
@ -3460,4 +3403,3 @@ ndis_scan_end(struct ieee80211com *ic)
{
/* ignore */
}

View File

@ -194,9 +194,9 @@ ndisusb_attach(device_t self)
}
if (ndis_attach(self) != 0)
return ENXIO;
return (ENXIO);
return 0;
return (0);
}
static int