Commit 6040e771 authored by Alessandro Rubini's avatar Alessandro Rubini

host: obey vlan in tx path

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <>
parent 4cb4375c
......@@ -165,14 +165,21 @@ int minic_tx_frame(struct wr_ethhdr_vlan *hdr, uint8_t * payload, uint32_t size,
struct hw_timestamp *hwts)
unsigned char frame[1500];
int hsize;
if (hdr->ethtype == htons(0x8100))
hsize = sizeof(struct wr_ethhdr_vlan);
hsize = sizeof(struct wr_ethhdr);
printf("%s\n", __func__);
dumpstruct(stdout, "tx header", hdr, 14);
dumpstruct(stdout, "tx header", hdr, hsize);
dumpstruct(stdout, "tx payload", payload, size);
memcpy(frame, hdr, 14);
memcpy(frame + 14, payload, size);
return send(sock, frame, size + 14, 0);
memcpy(frame, hdr, hsize);
memcpy(frame + hsize, payload, size);
return send(sock, frame, size + hsize, 0);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment