Add missing cprd_flags member to partial resource structure in
resource_var.h. In kern_ndis.c:ndis_convert_res(), fill in the cprd_flags and cprd_sharedisp fields as best we can. In if_ndis.c:ndis_setmulti(), don't bother updating the multicast filter if our multicast address list is empty. Add some missing updates to ndis_var.h and ntoskrnl_var.h that I forgot to check in when I added the KeDpc stuff.
This commit is contained in:
parent
24b5b08280
commit
6ea748c0f1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=127552
@ -824,18 +824,28 @@ ndis_convert_res(arg)
|
||||
switch (brle->type) {
|
||||
case SYS_RES_IOPORT:
|
||||
prd->cprd_type = CmResourceTypePort;
|
||||
prd->cprd_flags = CM_RESOURCE_PORT_IO;
|
||||
prd->cprd_sharedisp =
|
||||
CmResourceShareDeviceExclusive;
|
||||
prd->u.cprd_port.cprd_start.np_quad =
|
||||
brle->start;
|
||||
prd->u.cprd_port.cprd_len = brle->count;
|
||||
break;
|
||||
case SYS_RES_MEMORY:
|
||||
prd->cprd_type = CmResourceTypeMemory;
|
||||
prd->cprd_flags =
|
||||
CM_RESOURCE_MEMORY_READ_WRITE;
|
||||
prd->cprd_sharedisp =
|
||||
CmResourceShareDeviceExclusive;
|
||||
prd->u.cprd_port.cprd_start.np_quad =
|
||||
brle->start;
|
||||
prd->u.cprd_port.cprd_len = brle->count;
|
||||
break;
|
||||
case SYS_RES_IRQ:
|
||||
prd->cprd_type = CmResourceTypeInterrupt;
|
||||
prd->cprd_flags = 0;
|
||||
prd->cprd_sharedisp =
|
||||
CmResourceShareDeviceExclusive;
|
||||
prd->u.cprd_intr.cprd_level = brle->start;
|
||||
prd->u.cprd_intr.cprd_vector = brle->start;
|
||||
prd->u.cprd_intr.cprd_affinity = 0;
|
||||
|
@ -1512,6 +1512,7 @@ extern int ndis_create_sysctls(void *);
|
||||
extern int ndis_add_sysctl(void *, char *, char *, char *, int);
|
||||
extern int ndis_flush_sysctls(void *);
|
||||
extern int ndis_sched(void (*)(void *), void *, int);
|
||||
extern int ndis_unsched(void (*)(void *), void *, int);
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _NDIS_VAR_H_ */
|
||||
|
@ -261,7 +261,7 @@ struct kdpc {
|
||||
void *k_deferredctx;
|
||||
void *k_sysarg1;
|
||||
void *k_sysarg2;
|
||||
uint32_t *k_lock;
|
||||
register_t k_lock;
|
||||
};
|
||||
|
||||
typedef struct kdpc kdpc;
|
||||
@ -480,6 +480,8 @@ __BEGIN_DECLS
|
||||
extern int ntoskrnl_libinit(void);
|
||||
extern int ntoskrnl_libfini(void);
|
||||
__stdcall extern void ntoskrnl_init_dpc(kdpc *, void *, void *);
|
||||
__stdcall extern uint8_t ntoskrnl_queue_dpc(kdpc *, void *, void *);
|
||||
__stdcall extern uint8_t ntoskrnl_dequeue_dpc(kdpc *);
|
||||
__stdcall extern void ntoskrnl_init_timer(ktimer *);
|
||||
__stdcall extern void ntoskrnl_init_timer_ex(ktimer *, uint32_t);
|
||||
__stdcall extern uint8_t ntoskrnl_set_timer(ktimer *, int64_t, kdpc *);
|
||||
|
@ -97,6 +97,7 @@ typedef enum cm_share_disposition cm_share_disposition;
|
||||
struct cm_partial_resource_desc {
|
||||
uint8_t cprd_type;
|
||||
uint8_t cprd_sharedisp;
|
||||
uint16_t cprd_flags;
|
||||
union {
|
||||
struct {
|
||||
physaddr cprd_start;
|
||||
|
@ -153,6 +153,8 @@ ndis_setmulti(sc)
|
||||
return;
|
||||
}
|
||||
|
||||
if (TAILQ_EMPTY(&ifp->if_multiaddrs))
|
||||
return;
|
||||
|
||||
len = sizeof(mclistsz);
|
||||
ndis_get_info(sc, OID_802_3_MAXIMUM_LIST_SIZE, &mclistsz, &len);
|
||||
|
Loading…
Reference in New Issue
Block a user