1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00

Merge pull request #12716 from miri64/gnrc_netif/enh/use-netif_hdr-setter

nimble/netif: use gnrc_netif_hdr_set_netif()
This commit is contained in:
Martine Lenders 2020-01-15 18:18:20 +01:00 committed by GitHub
commit 04a673fc8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -293,8 +293,7 @@ static void _on_data(nimble_netif_conn_t *conn, struct ble_l2cap_event *event)
}
/* we need to add the device PID to the netif header */
gnrc_netif_hdr_t *netif_hdr = (gnrc_netif_hdr_t *)if_snip->data;
netif_hdr->if_pid = _nimble_netif->pid;
gnrc_netif_hdr_set_netif(if_snip->data, _nimble_netif);
/* allocate space in the pktbuf to store the packet */
gnrc_pktsnip_t *payload = gnrc_pktbuf_add(if_snip, NULL, rx_len, _nettype);