Skip to content

Commit

Permalink
Merge pull request #12263 from benpicco/esp_now-fix
Browse files Browse the repository at this point in the history
esp_now: fix unused variable warning
  • Loading branch information
miri64 authored Sep 17, 2019
2 parents baebcef + 9129ea7 commit 98482b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpu/esp_common/esp-now/esp_now_gnrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ static gnrc_pktsnip_t *_recv(gnrc_netif_t *netif)
pkt = mac_hdr;
goto err;
}
esp_now_pkt_hdr_t *hdr = (esp_now_pkt_hdr_t*)esp_hdr->data;

#ifdef MODULE_L2FILTER
if (!l2filter_pass(dev->filter, mac_hdr->data, ESP_NOW_ADDR_LEN)) {
Expand All @@ -160,6 +159,8 @@ static gnrc_pktsnip_t *_recv(gnrc_netif_t *netif)
pkt->type = GNRC_NETTYPE_UNDEF;

#ifdef MODULE_GNRC_SIXLOWPAN
esp_now_pkt_hdr_t *hdr = (esp_now_pkt_hdr_t*)esp_hdr->data;

if (hdr->flags & ESP_NOW_PKT_HDR_FLAG_SIXLO) {
pkt->type = GNRC_NETTYPE_SIXLOWPAN;
}
Expand Down

0 comments on commit 98482b6

Please sign in to comment.