Bill Paul 55ad415824 When ndis_attach() runs, it has to very briefly initialize the card
in order to query the underlying Windows driver for the station address
and some other properties. There is a slim chance that the card may
receive a packet and indicate it up to us before ndis_attach() can call
ndis_halt_nic(). This is bad, because both the softc structure and
the ifnet structure aren't fully initialized yet: many pointers are
still NULL, so if we make it into ndis_rxeof(), we will panic.

To fix this, we need to do the following:

- Move the calls to IoAllocateWorkItem() to before the call to ndis_init_nic().
- Move the initialization of the RX DPC and status callback function pointers
  to before ndis_init_nic() as well.
- Modify ndis_rxeof() to check if the IFF_DRV_RUNNING flag is set. If it
  isn't, we return any supplied NDIS_PACKETs to the NIC without processing
  them.

This fixes a crash than can occur when activating a wireless NIC in
close proximity to a very busy wireless network, reported by Ryan
Beasley (ryan%^$!ATgoddamnbastard-****!!!DOTorg.

MFC after:	3 days
2006-02-04 19:42:49 +00:00
..
2005-12-28 21:18:55 +00:00
2005-12-04 02:12:43 +00:00
2006-02-02 17:51:47 +00:00
2005-12-04 02:12:43 +00:00
2005-12-17 07:09:17 +00:00
2005-12-28 18:00:37 +00:00
2005-10-19 00:25:39 +00:00
2005-09-11 18:39:03 +00:00
2005-12-04 02:12:43 +00:00
2006-01-17 16:53:50 +00:00
2006-01-29 12:03:03 +00:00
2005-11-23 18:51:34 +00:00
2005-11-12 19:14:21 +00:00
2005-12-08 13:31:52 +00:00
2005-12-20 21:41:52 +00:00
2005-12-07 07:23:53 +00:00
2005-09-21 22:45:14 +00:00