/* @virt_addr: index into EDA cache used to determine which element to execute the function on @dev_addr: device address of element in cache will be returned using @dev_addr @function: function to execute on element of cache (must be atomic) @priv: private data of function  */
int wlp_eda_for_virtual(struct wlp_eda *eda, const unsigned char virt_addr[ETH_ALEN], struct uwb_dev_addr *dev_addr, wlp_eda_for_each_f function, void *priv)
/* @virt_addr: index into EDA cache used to determine which element to execute the function on @dev_addr: device address of element in cache will be returned using @dev_addr @function: function to execute on element of cache (must be atomic) @priv: private data of function  */
int wlp_eda_for_virtual(struct wlp_eda *eda, const unsigned char virt_addr[ETH_ALEN], struct uwb_dev_addr *dev_addr, wlp_eda_for_each_f function, void *priv)
{
	int result = 0;
	struct wlp *wlp = container_of(eda, struct wlp, eda);
	struct wlp_eda_node *itr;
	unsigned long flags;
	int found = 0;
	spin_lock_irqsave(&eda->lock, flags);
	list_for_each_entry(itr, &eda->cache, list_node) {
		if (!memcmp(itr->virt_addr, virt_addr,
			   sizeof(itr->virt_addr))) {
			result = (*function)(wlp, itr, priv);
			*dev_addr = itr->dev_addr;
			found = 1;
			break;
		}
	}
	if (!found)
		result = -ENODEV;
	spin_unlock_irqrestore(&eda->lock, flags);
	return result;
}