Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor10417381041738 Transmitting Packets on a Network Device Anchor10417391041739NetDev_Tx() is used to notify the Ethernet device that a new packet is available to be transmitted. It performs the following actions:

  1. Anchor10417401041740For DMA-based hardware, the driver should select the next available transmit descriptor and set the pointer to the data area equal to the address pointer pointed to by p_data. Anchor10417411041741
  2. For non-DMA hardware, the driver should call Mem_Copy() to copy the data stored in the buffer to the device’s internal memory. The address of the buffer is specified by p_data. Anchor10417421041742
  3. Once completed, the driver must configure the device with the number of bytes to transmit. This value contained in the size argument. DMA-based devices have a size field within the transmit descriptor. Non-DMA devices have a transmit size register that must be configured.
  4. Anchor10417431041743The driver then takes all necessary steps to initiate transmission of the data. Anchor10417441041744
  5. NetDev_Tx() sets perr to NET_DEV_ERR_NONE and return returns from the transmit function.