Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ethernet: eth_stellaris: data_len should not include header size #15241

Merged
merged 1 commit into from
Apr 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions drivers/ethernet/eth_stellaris.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ static int eth_stellaris_send(struct device *dev, struct net_pkt *pkt)
u16_t i, data_len;

/* Frame transmission
* First two bytes are data_len for frame,
* Initially send the data_len
*
* First two bytes is the length of the frame, exclusive of
* the header length.
*/
data_len = net_pkt_get_len(pkt);
data_len = net_pkt_get_len(pkt) - sizeof(struct net_eth_hdr);
eth_stellaris_send_byte(dev, data_len & 0xff);
eth_stellaris_send_byte(dev, (data_len & 0xff00) >> 8);

Expand Down