layer2_decode_packet_header: fixed rx_seq_nr readout

This commit is contained in:
Thomas Kolb 2024-07-20 01:02:42 +02:00
parent bfe1cce6e3
commit db2700c0f7

View file

@ -60,7 +60,7 @@ bool layer2_decode_packet_header(const uint8_t *encoded, size_t encoded_len, lay
}
header->tx_seq_nr = (encoded[1] >> 4) & 0xF;
header->tx_seq_nr = (encoded[1] >> 0) & 0xF;
header->rx_seq_nr = (encoded[1] >> 0) & 0xF;
memcpy(header->src_addr.addr, encoded + 2, 2 * header->src_addr.length);
memcpy(header->dst_addr.addr, encoded + 2 + 2 * header->src_addr.length, 2 * header->dst_addr.length);