Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
m2m_wifi_send_ethernet_pkt

Synchronous function to transmit an Ethernet packet.

The implementation of this packet is left to the application developer. The Ethernet packet composition is left to the application developer.

Functions

NMI_API sint8 m2m_wifi_send_ethernet_pkt (uint8 *pu8Packet, uint16 u16PacketSize, uint8 u8IfcId)
 

NMI_API sint8 m2m_wifi_send_ethernet_pkt ( uint8 pu8Packet,
uint16  u16PacketSize,
uint8  u8IfcId 
)
Parameters
[in]pu8PacketPointer to a buffer holding the whole Ethernet frame at an offset of M2M_ETHERNET_HDR_OFFSET + M2M_ETH_PAD_SIZE bytes. This buffer has to be aligned appropriately for DMA operations according to the host's constraints (Word Aligned, cache line aligned… etc)
[in]u16PacketSizeThe size of the whole bytes in packet.
[in]u8IfcIdThe interface selected to send Ethernet packet (AP_INTERFACE, STATION_INTERFACE OR P2P_INTERFACE)
Note
Packets are the user's responsibility.
Returns
The function returns M2M_SUCCESS for successful operations and a negative value otherwise.

References hif_send_optimized(), M2M_ERR, M2M_ETH_PAD_SIZE, M2M_ETHERNET_HDR_LEN, M2M_ETHERNET_HDR_OFFSET, M2M_HIF_HDR_OFFSET, M2M_HIF_MAX_PACKET_SIZE, M2M_REQ_DATA_PKT, M2M_REQ_GRP_WIFI, M2M_WIFI_REQ_SEND_ETHERNET_PACKET, NM_BSP_B_L_16, NULL, tstrM2MWifiTxPacketInfo::u16HeaderLength, tstrM2MWifiTxPacketInfo::u16PacketSize, and tstrM2MWifiTxPacketInfo::u8IfcId.

Referenced by iperf_tcp_task(), iperf_udp_send(), os_m2m_wifi_send_ethernet_pkt_imp(), wilc_netif_tx_from_queue(), and winc_netif_tx_from_queue().