drivers: ieee802154: uart: Do not send FCS bytes to peer
No need to send FCS bytes as the monitor_15_4 is configured to not expect them. If we change the monitor_15_4 to use them, then we would need to put correct values into these two FCS bytes. So cleanest solution is not to send FCS bytes at all. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
9544b7eca4
commit
dc3f2455d7
1 changed files with 3 additions and 8 deletions
|
|
@ -68,8 +68,8 @@ static u8_t *upipe_rx(u8_t *buf, size_t *off)
|
|||
|
||||
net_pkt_frag_insert(pkt, frag);
|
||||
|
||||
memcpy(frag->data, upipe->rx_buf, upipe->rx_len - 2);
|
||||
net_buf_add(frag, upipe->rx_len - 2);
|
||||
memcpy(frag->data, upipe->rx_buf, upipe->rx_len);
|
||||
net_buf_add(frag, upipe->rx_len);
|
||||
|
||||
if (ieee802154_radio_handle_ack(upipe->iface, pkt) == NET_OK) {
|
||||
SYS_LOG_DBG("ACK packet handled");
|
||||
|
|
@ -152,18 +152,13 @@ static int upipe_tx(struct device *dev,
|
|||
data = UART_PIPE_RADIO_15_4_FRAME_TYPE;
|
||||
uart_pipe_send(&data, 1);
|
||||
|
||||
data = len + 2;
|
||||
data = len;
|
||||
uart_pipe_send(&data, 1);
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
uart_pipe_send(pkt_buf+i, 1);
|
||||
}
|
||||
|
||||
/* The 2 dummy bytes representing FCS */
|
||||
data = 0xFF;
|
||||
uart_pipe_send(&data, 1);
|
||||
uart_pipe_send(&data, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue