net/gnrc/netif: Move GNRC_NETIF_DEFAULT_HL to 'CONFIG_' namespace

This commit is contained in:
PeterKietzmann 2020-01-08 10:57:19 +01:00
parent c654d1fc8b
commit b28a586702
7 changed files with 10 additions and 10 deletions

View File

@ -133,8 +133,8 @@ extern "C" {
#endif
#endif
#ifndef GNRC_NETIF_DEFAULT_HL
#define GNRC_NETIF_DEFAULT_HL (64U) /**< default hop limit */
#ifndef CONFIG_GNRC_NETIF_DEFAULT_HL
#define CONFIG_GNRC_NETIF_DEFAULT_HL (64U) /**< default hop limit */
#endif
/**

View File

@ -1329,7 +1329,7 @@ void gnrc_netif_default_init(gnrc_netif_t *netif)
#ifdef DEVELHELP
_test_options(netif);
#endif
netif->cur_hl = GNRC_NETIF_DEFAULT_HL;
netif->cur_hl = CONFIG_GNRC_NETIF_DEFAULT_HL;
#ifdef MODULE_GNRC_IPV6_NIB
gnrc_ipv6_nib_init_iface(netif);
#endif

View File

@ -354,7 +354,7 @@ static int _fill_ipv6_hdr(gnrc_netif_t *netif, gnrc_pktsnip_t *ipv6)
if (hdr->hl == 0) {
if (netif == NULL) {
hdr->hl = GNRC_NETIF_DEFAULT_HL;
hdr->hl = CONFIG_GNRC_NETIF_DEFAULT_HL;
}
else {
hdr->hl = netif->cur_hl;

View File

@ -542,7 +542,7 @@ static gnrc_pktsnip_t *_build_udp_packet(const ipv6_addr_t *dst,
ipv6_hdr = hdr->data;
ipv6_hdr->len = byteorder_htons(gnrc_pkt_len(payload));
ipv6_hdr->nh = PROTNUM_UDP;
ipv6_hdr->hl = GNRC_NETIF_DEFAULT_HL;
ipv6_hdr->hl = CONFIG_GNRC_NETIF_DEFAULT_HL;
gnrc_udp_calc_csum(payload, hdr);
payload = hdr;
hdr = gnrc_netif_hdr_build(NULL, 0, NULL, 0);

View File

@ -78,7 +78,7 @@ static void _set_up(void)
gnrc_netif_acquire(_mock_netif);
/* reset some fields not set by the nib interface initializer */
_mock_netif->ipv6.mtu = ETHERNET_DATA_LEN;
_mock_netif->cur_hl = GNRC_NETIF_DEFAULT_HL;
_mock_netif->cur_hl = CONFIG_GNRC_NETIF_DEFAULT_HL;
gnrc_netif_ipv6_addr_remove_internal(_mock_netif, &_loc_gb);
gnrc_netif_release(_mock_netif);
memset(_buffer, 0, sizeof(_buffer));

View File

@ -87,7 +87,7 @@ static void _set_up(void)
gnrc_netif_acquire(_mock_netif);
/* reset some fields not set by the nib interface initializer */
_mock_netif->ipv6.mtu = IPV6_MIN_MTU;
_mock_netif->cur_hl = GNRC_NETIF_DEFAULT_HL;
_mock_netif->cur_hl = CONFIG_GNRC_NETIF_DEFAULT_HL;
gnrc_netif_ipv6_addr_remove_internal(_mock_netif, &_loc_gb);
gnrc_netif_release(_mock_netif);
memset(_buffer, 0, sizeof(_buffer));

View File

@ -126,7 +126,7 @@ static void test_creation(void)
TEST_ASSERT_NOT_NULL(ethernet_netif->ops);
TEST_ASSERT_NOT_NULL(ethernet_netif->dev);
TEST_ASSERT_EQUAL_INT(ETHERNET_DATA_LEN, ethernet_netif->ipv6.mtu);
TEST_ASSERT_EQUAL_INT(GNRC_NETIF_DEFAULT_HL, ethernet_netif->cur_hl);
TEST_ASSERT_EQUAL_INT(CONFIG_GNRC_NETIF_DEFAULT_HL, ethernet_netif->cur_hl);
TEST_ASSERT_EQUAL_INT(NETDEV_TYPE_ETHERNET, ethernet_netif->device_type);
TEST_ASSERT(ethernet_netif->pid > KERNEL_PID_UNDEF);
#ifdef DEVELHELP
@ -147,7 +147,7 @@ static void test_creation(void)
TEST_ASSERT_EQUAL_INT(IPV6_MIN_MTU, ieee802154_netif->ipv6.mtu);
TEST_ASSERT_EQUAL_INT(TEST_IEEE802154_MAX_FRAG_SIZE,
ieee802154_netif->sixlo.max_frag_size);
TEST_ASSERT_EQUAL_INT(GNRC_NETIF_DEFAULT_HL, ieee802154_netif->cur_hl);
TEST_ASSERT_EQUAL_INT(CONFIG_GNRC_NETIF_DEFAULT_HL, ieee802154_netif->cur_hl);
TEST_ASSERT_EQUAL_INT(NETDEV_TYPE_IEEE802154,
ieee802154_netif->device_type);
TEST_ASSERT(ieee802154_netif->pid > KERNEL_PID_UNDEF);
@ -163,7 +163,7 @@ static void test_creation(void)
)));
TEST_ASSERT_NOT_NULL(netifs[i]->ops);
TEST_ASSERT_NOT_NULL(netifs[i]->dev);
TEST_ASSERT_EQUAL_INT(GNRC_NETIF_DEFAULT_HL, netifs[i]->cur_hl);
TEST_ASSERT_EQUAL_INT(CONFIG_GNRC_NETIF_DEFAULT_HL, netifs[i]->cur_hl);
TEST_ASSERT_EQUAL_INT(NETDEV_TYPE_TEST, netifs[i]->device_type);
TEST_ASSERT(netifs[i]->pid > KERNEL_PID_UNDEF);
TEST_ASSERT(thread_has_msg_queue(sched_threads[netifs[i]->pid]));