gnrc: piggy-back some code style changes

dev/timer
Martine Lenders 8 years ago
parent 9cf5e5fb6a
commit e8d5d5576a

@ -33,7 +33,7 @@
#include "net/ieee802154.h"
#ifdef __cplusplus
extern "C" {
extern "C" {
#endif
/**

@ -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 {

@ -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;

@ -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;

@ -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)) {

Loading…
Cancel
Save