cvs commit: src/sys/compat/ndis kern_ndis.c ndis_var.h src/sys/dev/if_ndis if_ndis.c if_ndisvar.h

Bill Paul wpaul at FreeBSD.org
Sat May 14 21:28:00 PDT 2005


wpaul       2005-05-15 04:27:59 UTC

  FreeBSD src repository

  Modified files:
    sys/compat/ndis      kern_ndis.c ndis_var.h 
    sys/dev/if_ndis      if_ndis.c if_ndisvar.h 
  Log:
  Add support for NdisMEthIndicateReceive() and MiniportTransferData().
  The Ralink RT2500 driver uses this API instead of NdisMIndicateReceivePacket().
  
  Drivers use NdisMEthIndicateReceive() when they know they support
  802.3 media and expect to hand their packets only protocols that want
  to deal with that particular media type. With this API, the driver does
  not manage its own NDIS_PACKET/NDIS_BUFFER structures. Instead, it
  lets bound protocols have a peek at the data, and then they supply
  an NDIS_PACKET/NDIS_BUFFER combo to the miniport driver, into which
  it copies the packet data.
  
  Drivers use NdisMIndicateReceivePacket() to allow their packets to
  be read by any protocol, not just those bound to 802.3 media devices.
  
  To make this work, we need an internal pool of NDIS_PACKETS for
  receives. Currently, we check to see if the driver exports a
  MiniportTransferData() method in its characteristics structure,
  and only allocate the pool for drivers that have this method.
  
  This should allow the RT2500 driver to work correctly, though I
  still have to fix ndiscvt(8) to parse its .inf file properly.
  
  Also, change kern_ndis.c:ndis_halt_nic() to reap timers before
  acquiring NDIS_LOCK(), since the reaping process might entail sleeping
  briefly (and we can't sleep with a lock held).
  
  Revision  Changes    Path
  1.81      +29 -9     src/sys/compat/ndis/kern_ndis.c
  1.40      +18 -1     src/sys/compat/ndis/ndis_var.h
  1.93      +225 -0    src/sys/dev/if_ndis/if_ndis.c
  1.22      +1 -0      src/sys/dev/if_ndis/if_ndisvar.h


More information about the cvs-src mailing list