summaryrefslogtreecommitdiffstats
path: root/sys/compat/ndis/ndis_var.h
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2004-02-07 06:44:13 +0000
committerwpaul <wpaul@FreeBSD.org>2004-02-07 06:44:13 +0000
commitfe7c8eefc3547f53401867e00dfc83a66bb130b7 (patch)
tree41bad94309044d1fa9579a2ebc2a9789d0cc8029 /sys/compat/ndis/ndis_var.h
parent7720bf145ae3e83333c2c7a38300817781c0de19 (diff)
downloadFreeBSD-src-fe7c8eefc3547f53401867e00dfc83a66bb130b7.zip
FreeBSD-src-fe7c8eefc3547f53401867e00dfc83a66bb130b7.tar.gz
Add a whole bunch of new stuff to make the driver for the AMD Am1771/Am1772
802.11b chipset work. This chip is present on the SMC2602W version 3 NIC, which is what was used for testing. This driver creates kernel threads (12 of them!) for various purposes, and required the following routines: PsCreateSystemThread() PsTerminateSystemThread() KeInitializeEvent() KeSetEvent() KeResetEvent() KeInitializeMutex() KeReleaseMutex() KeWaitForSingleObject() KeWaitForMultipleObjects() IoGetDeviceProperty() and several more. Also, this driver abuses the fact that NDIS events and timers are actually Windows events and timers, and uses NDIS events with KeWaitForSingleObject(). The NDIS event routines have been rewritten to interface with the ntoskrnl module. Many routines with incorrect prototypes have been cleaned up. Also, this driver puts jobs on the NDIS taskqueue (via NdisScheduleWorkItem()) which block on events, and this interferes with the operation of NdisMAllocateSharedMemoryAsync(), which was also being put on the NDIS taskqueue. To avoid the deadlock, NdisMAllocateSharedMemoryAsync() is now performed in the NDIS SWI thread instead. There's still room for some cleanups here, and I really should implement KeInitializeTimer() and friends.
Diffstat (limited to 'sys/compat/ndis/ndis_var.h')
-rw-r--r--sys/compat/ndis/ndis_var.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/compat/ndis/ndis_var.h b/sys/compat/ndis/ndis_var.h
index cd03ca7..58f174f 100644
--- a/sys/compat/ndis/ndis_var.h
+++ b/sys/compat/ndis/ndis_var.h
@@ -793,12 +793,14 @@ struct ndis_config_parm {
typedef struct ndis_config_parm ndis_config_parm;
+#ifdef notdef
struct ndis_list_entry {
struct ndis_list_entry *nle_flink;
struct ndis_list_entry *nle_blink;
};
typedef struct ndis_list_entry ndis_list_entry;
+#endif
struct ndis_bind_paths {
uint32_t nbp_number;
@@ -807,19 +809,23 @@ struct ndis_bind_paths {
typedef struct ndis_bind_paths ndis_bind_paths;
+#ifdef notdef
struct dispatch_header {
uint8_t dh_type;
uint8_t dh_abs;
uint8_t dh_size;
uint8_t dh_inserted;
uint32_t dh_sigstate;
- ndis_list_entry dh_waitlisthead;
+ list_entry dh_waitlisthead;
};
+#endif
+
+#define dispatch_header nt_dispatch_header
struct ndis_ktimer {
struct dispatch_header nk_header;
uint64_t nk_duetime;
- ndis_list_entry nk_timerlistentry;
+ list_entry nk_timerlistentry;
void *nk_dpc;
uint32_t nk_period;
};
@@ -843,7 +849,7 @@ struct ndis_kdpc {
uint16_t nk_type;
uint8_t nk_num;
uint8_t nk_importance;
- ndis_list_entry nk_dpclistentry;
+ list_entry nk_dpclistentry;
ndis_kdpc_func nk_deferedfunc;
void *nk_deferredctx;
void *nk_sysarg1;
@@ -1355,7 +1361,7 @@ struct ndis_miniport_block {
ndis_miniport_interrupt *nmb_interrupt;
uint32_t nmb_flags;
uint32_t nmb_pnpflags;
- ndis_list_entry nmb_packetlist;
+ list_entry nmb_packetlist;
ndis_packet *nmb_firstpendingtxpacket;
ndis_packet *nmb_returnpacketqueue;
uint32_t nmb_requestbuffer;
@@ -1426,6 +1432,7 @@ struct ndis_miniport_block {
*/
struct ifnet *nmb_ifp;
uint8_t nmb_dummybuf[128];
+ device_object nmb_devobj;
ndis_config_parm nmb_replyparm;
int nmb_pciidx;
device_t nmb_dev;
OpenPOWER on IntegriCloud