1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/gnrc_lorawan: use byteorder_htols()/byteorder_htoll()

This commit is contained in:
Benjamin Valentin 2020-12-08 16:29:10 +01:00
parent 7a7ebb1d5b
commit 129e9ae8a3
2 changed files with 4 additions and 4 deletions

View File

@ -67,7 +67,7 @@ void gnrc_lorawan_calculate_mic(const le_uint32_t *dev_addr, uint32_t fcnt,
memcpy(&block.dev_addr, dev_addr, sizeof(le_uint32_t));
block.fcnt = byteorder_btoll(byteorder_htonl(fcnt));
block.fcnt = byteorder_htoll(fcnt);
block.u32_pad = 0;
@ -103,7 +103,7 @@ void gnrc_lorawan_encrypt_payload(iolist_t *iolist, const le_uint32_t *dev_addr,
block->dir = dir & DIR_MASK;
block->dev_addr = *dev_addr;
block->fcnt = byteorder_btoll(byteorder_htonl(fcnt));
block->fcnt = byteorder_htoll(fcnt);
block->u32_pad = 0;

View File

@ -221,7 +221,7 @@ size_t gnrc_lorawan_build_hdr(uint8_t mtype, le_uint32_t *dev_addr,
lorawan_hdr_set_ack(lw_hdr, ack);
lorawan_hdr_set_frame_opts_len(lw_hdr, fopts_length);
lw_hdr->fcnt = byteorder_btols(byteorder_htons(fcnt));
lw_hdr->fcnt = byteorder_htols(fcnt);
buf->index += sizeof(lorawan_hdr_t);
@ -248,7 +248,7 @@ size_t gnrc_lorawan_build_uplink(gnrc_lorawan_t *mac, iolist_t *payload,
lorawan_hdr_set_ack(lw_hdr, mac->mcps.ack_requested);
lw_hdr->fcnt = byteorder_btols(byteorder_htons(mac->mcps.fcnt));
lw_hdr->fcnt = byteorder_htols(mac->mcps.fcnt);
buf.index += sizeof(lorawan_hdr_t);