mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
sys/net: remove nordic softdevice specific handling
This commit is contained in:
parent
ada0e157b4
commit
68d3f2ee6c
@ -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;
|
||||
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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:
|
||||
@ -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) {
|
||||
@ -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)) {
|
||||
@ -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];
|
||||
@ -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
|
||||
@ -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:
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user