/* The discovery of one neighbor does not affect the other, but if the discovery of a neighbor fails it is removed from the neighborhood cache.  */
static int wlp_discover_all_neighbors(struct wlp *wlp)
/* The discovery of one neighbor does not affect the other, but if the discovery of a neighbor fails it is removed from the neighborhood cache.  */
static int wlp_discover_all_neighbors(struct wlp *wlp)
{
	int result = 0;
	struct device *dev = &wlp->rc->uwb_dev.dev;
	struct wlp_neighbor_e *neighbor, *next;
	list_for_each_entry_safe(neighbor, next, &wlp->neighbors, node) {
		result = wlp_discover_neighbor(wlp, neighbor);
		if (result < 0) {
			dev_err(dev, "WLP: Unable to discover neighbor "
				"%02x:%02x, removing from neighborhood. \n",
				neighbor->uwb_dev->dev_addr.data[1],
				neighbor->uwb_dev->dev_addr.data[0]);
			__wlp_neighbor_release(neighbor);
		}
	}
	return result;
}