diff --git a/drivers/include/xbee.h b/drivers/include/xbee.h index ff1d8ea6ab3777180e2cc9a9f849abf8d0db4193..5f5bec545a0a26e3e6da303c781ccd807b074a1c 100644 --- a/drivers/include/xbee.h +++ b/drivers/include/xbee.h @@ -33,7 +33,7 @@ #include "net/ieee802154.h" #ifdef __cplusplus - extern "C" { +extern "C" { #endif /** diff --git a/drivers/kw2xrf/kw2xrf.c b/drivers/kw2xrf/kw2xrf.c index 9f8bc5c5bffd2b097135b769053aeb11817a8a00..b41ed5fc5e2c70d94c0753bf52190b9332bb538d 100644 --- a/drivers/kw2xrf/kw2xrf.c +++ b/drivers/kw2xrf/kw2xrf.c @@ -216,8 +216,8 @@ void kw2xrf_set_sequence(kw2xrf_t *dev, kw2xrf_physeq_t seq) /* TODO: This should only used in combination with * an CSMA-MAC layer. Currently not working */ - /*if((seq == XCVSEQ_TRANSMIT) || (seq == XCVSEQ_TX_RX)) { - if((dev->option) & KW2XRF_OPT_AUTOACK) { + /*if ((seq == XCVSEQ_TRANSMIT) || (seq == XCVSEQ_TX_RX)) { + if ((dev->option) & KW2XRF_OPT_AUTOACK) { seq = XCVSEQ_TX_RX; } else { @@ -1060,7 +1060,7 @@ int _assemble_tx_buf(kw2xrf_t *dev, ng_pktsnip_t *pkt) * since this is a soft_mac device this has to be * handled in a upcoming CSMA-MAC layer. */ - /*if(dev->option & KW2XRF_OPT_AUTOACK) { + /*if (dev->option & KW2XRF_OPT_AUTOACK) { dev->buf[1] = 0x61; } else { diff --git a/drivers/xbee/xbee.c b/drivers/xbee/xbee.c index 0b132b8e5b5f19190061282f00d28ad282c8384b..344fa1bf5d75daf3d313d877fd328490d581c8c3 100644 --- a/drivers/xbee/xbee.c +++ b/drivers/xbee/xbee.c @@ -458,7 +458,7 @@ int xbee_init(xbee_t *dev, uart_t uart, uint32_t baudrate, hwtimer_wait(HWTIMER_TICKS(RESET_DELAY)); gpio_set(reset_pin); } - /* put the XBee device into command mode */ + /* put the XBee device into command mode */ hwtimer_wait(HWTIMER_TICKS(ENTER_CMD_MODE_DELAY)); _at_cmd(dev, "+++"); hwtimer_wait(HWTIMER_TICKS(ENTER_CMD_MODE_DELAY)); @@ -487,7 +487,8 @@ int xbee_init(xbee_t *dev, uart_t uart, uint32_t baudrate, return 0; } -static inline bool _is_broadcast(ng_netif_hdr_t *hdr) { +static inline bool _is_broadcast(ng_netif_hdr_t *hdr) +{ /* IEEE 802.15.4 does not support multicast so we need to check both flags */ return (bool)(hdr->flags & (NG_NETIF_HDR_FLAGS_BROADCAST | NG_NETIF_HDR_FLAGS_MULTICAST)); @@ -544,7 +545,8 @@ static int _send(ng_netdev_t *netdev, ng_pktsnip_t *pkt) dev->tx_buf[3] = API_ID_TX_SHORT_ADDR; memcpy(dev->tx_buf + 5, ng_netif_hdr_get_dst_addr(hdr), 2); pos = 7; - } else { + } + else { dev->tx_buf[1] = (uint8_t)((size + 11) >> 8); dev->tx_buf[2] = (uint8_t)(size + 11); dev->tx_buf[3] = API_ID_TX_LONG_ADDR; diff --git a/sys/include/net/ieee802154.h b/sys/include/net/ieee802154.h index df1164610acb3f373246fe07bca597d637346d96..f84b36541a78b2f2fb49edfd159dba4aa0fbde2c 100644 --- a/sys/include/net/ieee802154.h +++ b/sys/include/net/ieee802154.h @@ -81,7 +81,7 @@ extern "C" { * @return NULL, if @p addr_len was of illegal length. */ static inline eui64_t *ieee802154_get_iid(eui64_t *eui64, uint8_t *addr, - size_t addr_len) + size_t addr_len) { int i = 0; diff --git a/sys/net/network_layer/ng_sixlowpan/iphc/ng_sixlowpan_iphc.c b/sys/net/network_layer/ng_sixlowpan/iphc/ng_sixlowpan_iphc.c index a87973ea3b11d9cbcc64975b1afbc930de376e22..b9c6b6ada604b4371a647ba91179f21d1367d79e 100644 --- a/sys/net/network_layer/ng_sixlowpan/iphc/ng_sixlowpan_iphc.c +++ b/sys/net/network_layer/ng_sixlowpan/iphc/ng_sixlowpan_iphc.c @@ -202,8 +202,8 @@ bool ng_sixlowpan_iphc_decode(ng_pktsnip_t *pkt) case IPHC_SAC_SAM_L2: ieee802154_get_iid((eui64_t *)(&ipv6_hdr->src.u64[1]), - ng_netif_hdr_get_src_addr(netif_hdr), - netif_hdr->src_l2addr_len); + ng_netif_hdr_get_src_addr(netif_hdr), + netif_hdr->src_l2addr_len); ng_ipv6_addr_set_link_local_prefix(&ipv6_hdr->src); break; @@ -229,8 +229,8 @@ bool ng_sixlowpan_iphc_decode(ng_pktsnip_t *pkt) case IPHC_SAC_SAM_CTX_L2: ieee802154_get_iid((eui64_t *)(&ipv6_hdr->src.u64[1]), - ng_netif_hdr_get_src_addr(netif_hdr), - netif_hdr->src_l2addr_len); + ng_netif_hdr_get_src_addr(netif_hdr), + netif_hdr->src_l2addr_len); ng_ipv6_addr_init_prefix(&ipv6_hdr->src, &ctx->prefix, ctx->prefix_len); break; @@ -277,8 +277,8 @@ bool ng_sixlowpan_iphc_decode(ng_pktsnip_t *pkt) case IPHC_M_DAC_DAM_U_L2: ieee802154_get_iid((eui64_t *)(&ipv6_hdr->dst.u64[1]), - ng_netif_hdr_get_dst_addr(netif_hdr), - netif_hdr->dst_l2addr_len); + ng_netif_hdr_get_dst_addr(netif_hdr), + netif_hdr->dst_l2addr_len); ng_ipv6_addr_set_link_local_prefix(&ipv6_hdr->dst); break; @@ -300,8 +300,8 @@ bool ng_sixlowpan_iphc_decode(ng_pktsnip_t *pkt) case IPHC_M_DAC_DAM_U_CTX_L2: ieee802154_get_iid((eui64_t *)(&ipv6_hdr->dst.u64[1]), - ng_netif_hdr_get_dst_addr(netif_hdr), - netif_hdr->dst_l2addr_len); + ng_netif_hdr_get_dst_addr(netif_hdr), + netif_hdr->dst_l2addr_len); ng_ipv6_addr_init_prefix(&ipv6_hdr->dst, &ctx->prefix, ctx->prefix_len); break; @@ -511,7 +511,7 @@ bool ng_sixlowpan_iphc_encode(ng_pktsnip_t *pkt) (netif_hdr->src_l2addr_len == 8)) { /* prefer to create IID from netif header if available */ ieee802154_get_iid(&iid, ng_netif_hdr_get_src_addr(netif_hdr), - netif_hdr->src_l2addr_len); + netif_hdr->src_l2addr_len); } else { /* but take from driver otherwise */ @@ -620,7 +620,7 @@ bool ng_sixlowpan_iphc_encode(ng_pktsnip_t *pkt) eui64_t iid; ieee802154_get_iid(&iid, ng_netif_hdr_get_dst_addr(netif_hdr), - netif_hdr->dst_l2addr_len); + netif_hdr->dst_l2addr_len); if ((ipv6_hdr->dst.u64[1].u64 == iid.uint64.u64) || _context_overlaps_iid(dst_ctx, &(ipv6_hdr->dst), &iid)) {