Hello @Ethan_L
To send a VLAN frame, you can add VLAN tag into the frame array before calling Ethernet frame sending service. Something like below:
VlanTag[0U] = 0x81U; /*TPID = 0x8100 */
VlanTag[1U] = 0x00U;
VlanTag[2U] = 0x00U;
VlanTag[3U] = 0x05U;
/* add vlan tag */
for (frameByteIdx = 12U; frameByteIdx < 16U; frameByteIdx++) {
txBuff.data[frameByteIdx] = VlanTag[frameByteIdx%12U];
}
status = Gmac_Ip_SendFrame(instance, ring, &txBuff, NULL_PTR);
Best Regards,
Nam