mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #1948 from OlegHahm/netif_byteorder
Netif fix byteorder
This commit is contained in:
commit
8f93b5cee7
@ -335,7 +335,8 @@ int net_if_send_packet(int if_id, uint16_t target, const void *payload,
|
||||
p.frame.fcf.frame_pend = 0;
|
||||
|
||||
p.frame.dest_pan_id = net_if_get_pan_id(if_id);
|
||||
memcpy(p.frame.dest_addr, &target, 2);
|
||||
uint16_t target_h = NTOHS(target);
|
||||
memcpy(p.frame.dest_addr, &target_h, 2);
|
||||
response = net_if_transceiver_get_set_handler(if_id, SND_PKT, (void *)&p);
|
||||
}
|
||||
else {
|
||||
@ -378,7 +379,8 @@ int net_if_send_packet_long(int if_id, net_if_eui64_t *target,
|
||||
p.frame.fcf.frame_type = IEEE_802154_DATA_FRAME;
|
||||
p.frame.fcf.frame_pend = 0;
|
||||
p.frame.dest_pan_id = net_if_get_pan_id(if_id);
|
||||
memcpy(p.frame.dest_addr, target, 8);
|
||||
uint64_t target_h = NTOHLL(target->uint64);
|
||||
memcpy(p.frame.dest_addr, &target_h, 8);
|
||||
response = net_if_transceiver_get_set_handler(if_id, SND_PKT, (void *)&p);
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user