Skip to content

Commit

Permalink
sys/net: remove nordic softdevice specific handling
Browse files Browse the repository at this point in the history
  • Loading branch information
aabadie committed Oct 29, 2020
1 parent ada0e15 commit 68d3f2e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
4 changes: 2 additions & 2 deletions sys/net/gnrc/netif/gnrc_netif_device_type.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ netopt_t gnrc_netif_get_l2addr_opt(const gnrc_netif_t *netif)

switch (netif->device_type) {
#if defined(MODULE_NETDEV_IEEE802154) || defined(MODULE_XBEE) || \
defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF)
defined(MODULE_NIMBLE_NETIF)
case NETDEV_TYPE_IEEE802154:
case NETDEV_TYPE_BLE: {
netdev_t *dev = netif->dev;
Expand Down Expand Up @@ -180,7 +180,7 @@ void gnrc_netif_ipv6_init_mtu(gnrc_netif_t *netif)
#endif
break;
#endif
#if defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF)
#if defined(MODULE_NIMBLE_NETIF)
case NETDEV_TYPE_BLE:
netif->ipv6.mtu = IPV6_MIN_MTU;
#ifdef MODULE_GNRC_SIXLOWPAN_IPHC
Expand Down
5 changes: 0 additions & 5 deletions sys/net/gnrc/netif/init_devs/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,6 @@ void gnrc_netif_init_devs(void)
auto_init_socket_zep();
}

if (IS_USED(MODULE_NORDIC_SOFTDEVICE_BLE)) {
extern void gnrc_nordic_ble_6lowpan_init(void);
gnrc_nordic_ble_6lowpan_init();
}

if (IS_USED(MODULE_NRFMIN)) {
extern void gnrc_nrfmin_init(void);
gnrc_nrfmin_init();
Expand Down
16 changes: 8 additions & 8 deletions sys/net/link_layer/l2util/l2util.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int l2util_eui64_from_addr(int dev_type, const uint8_t *addr, size_t addr_len,
{
switch (dev_type) {
#if defined(MODULE_NETDEV_ETH) || defined(MODULE_ESP_NOW) || \
defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF)
defined(MODULE_NIMBLE_NETIF)
case NETDEV_TYPE_ETHERNET:
case NETDEV_TYPE_ESP_NOW:
case NETDEV_TYPE_BLE:
Expand All @@ -53,7 +53,7 @@ int l2util_eui64_from_addr(int dev_type, const uint8_t *addr, size_t addr_len,
return -EINVAL;
}
#endif /* defined(MODULE_NETDEV_ETH) || defined(MODULE_ESP_NOW) \
defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF) */
defined(MODULE_NIMBLE_NETIF) */
#if defined(MODULE_NETDEV_IEEE802154) || defined(MODULE_XBEE)
case NETDEV_TYPE_IEEE802154:
switch (addr_len) {
Expand Down Expand Up @@ -119,11 +119,11 @@ int l2util_ipv6_iid_from_addr(int dev_type,
return -EINVAL;
}
#endif /* defined(MODULE_CC110X) || defined(MODULE_NRFMIN) */
#if defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF)
#if defined(MODULE_NIMBLE_NETIF)
case NETDEV_TYPE_BLE:
/* for BLE we don't flip the universal/local flag... */
return l2util_eui64_from_addr(dev_type, addr, addr_len, iid);
#endif /* defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF) */
#endif /* defined(MODULE_NIMBLE_NETIF) */
default: {
int res = l2util_eui64_from_addr(dev_type, addr, addr_len, iid);
if (res == sizeof(eui64_t)) {
Expand All @@ -144,7 +144,7 @@ int l2util_ipv6_iid_to_addr(int dev_type, const eui64_t *iid, uint8_t *addr)
eui48_from_ipv6_iid((eui48_t *)addr, iid);
return sizeof(eui48_t);
#endif /* defined(MODULE_NETDEV_ETH) || defined(MODULE_ESP_NOW) */
#if defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF)
#if defined(MODULE_NIMBLE_NETIF)
case NETDEV_TYPE_BLE:
addr[0] = iid->uint8[0];
addr[1] = iid->uint8[1];
Expand All @@ -153,7 +153,7 @@ int l2util_ipv6_iid_to_addr(int dev_type, const eui64_t *iid, uint8_t *addr)
addr[4] = iid->uint8[6];
addr[5] = iid->uint8[7];
return sizeof(eui48_t);
#endif /* defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF) */
#endif /* defined(MODULE_NIMBLE_NETIF) */
#if defined(MODULE_NETDEV_IEEE802154) || defined(MODULE_XBEE)
case NETDEV_TYPE_IEEE802154:
/* assume address was based on EUI-64
Expand Down Expand Up @@ -196,7 +196,7 @@ int l2util_ndp_addr_len_from_l2ao(int dev_type,
return sizeof(uint8_t);
#endif /* MODULE_CC110X */
#if defined(MODULE_NETDEV_ETH) || defined(MODULE_ESP_NOW) || \
defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF)
defined(MODULE_NIMBLE_NETIF)
case NETDEV_TYPE_ETHERNET:
case NETDEV_TYPE_ESP_NOW:
case NETDEV_TYPE_BLE:
Expand All @@ -208,7 +208,7 @@ int l2util_ndp_addr_len_from_l2ao(int dev_type,
return -EINVAL;
}
#endif /* defined(MODULE_NETDEV_ETH) || defined(MODULE_ESP_NOW) \
defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF) */
defined(MODULE_NIMBLE_NETIF) */
#ifdef MODULE_NRFMIN
case NETDEV_TYPE_NRFMIN:
(void)opt;
Expand Down

0 comments on commit 68d3f2e

Please sign in to comment.