diff --git a/drivers/enc28j60/enc28j60.c b/drivers/enc28j60/enc28j60.c index 2b9dd9312d..a70729977b 100644 --- a/drivers/enc28j60/enc28j60.c +++ b/drivers/enc28j60/enc28j60.c @@ -454,6 +454,14 @@ static int nd_get(netdev_t *netdev, netopt_t opt, void *value, size_t max_len) assert(max_len >= ETHERNET_ADDR_LEN); mac_get(dev, (uint8_t *)value); return ETHERNET_ADDR_LEN; + case NETOPT_LINK_CONNECTED: + if (cmd_r_phy(dev, REG_PHY_PHSTAT2) & PHSTAT2_LSTAT) { + *((netopt_enable_t *)value) = NETOPT_ENABLE; + } + else { + *((netopt_enable_t *)value) = NETOPT_DISABLE; + } + return sizeof(netopt_enable_t); default: return netdev_eth_get(netdev, opt, value, max_len); }