Skip to content

Commit

Permalink
drivers: ethernet: Fix assert on receiving large PDUs
Browse files Browse the repository at this point in the history
This patch fixes an assert in net_buf_simple_add() function when the
lan_9250 driver would add previously added data to the net buffer
on receiving large (>128 bytes) packat. This fix was to use the frags
field of the net_buf structure instead.

Tested with a nRF54L15 DK and eth3 click board (with nordic connect sdk
2.8.0 and this patch).

Signed-off-by: Balaji Srinivasan <[email protected]>
  • Loading branch information
balaji-srin authored and kartben committed Dec 19, 2024
1 parent 982402a commit a627ffc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ethernet/eth_lan9250.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ static int lan9250_rx(const struct device *dev)

lan9250_read_buf(dev, data_ptr, data_len);
net_buf_add(pkt_buf, data_len);

pkt_buf = pkt_buf->frags;
} while (pkt_len > 0);

lan9250_read_sys_reg(dev, LAN9250_RX_DATA_FIFO, &tmp);
Expand Down

0 comments on commit a627ffc

Please sign in to comment.