/* @dev_addr: index to EDA cache @eda_entry: pointer to where contents of EDA cache will be copied  */
int wlp_copy_eda_node(struct wlp_eda *eda, struct uwb_dev_addr *dev_addr, struct wlp_eda_node *eda_entry)
/* @dev_addr: index to EDA cache @eda_entry: pointer to where contents of EDA cache will be copied  */
int wlp_copy_eda_node(struct wlp_eda *eda, struct uwb_dev_addr *dev_addr, struct wlp_eda_node *eda_entry)
{
	int result = -ENOENT;
	struct wlp_eda_node *itr;
	unsigned long flags;
	spin_lock_irqsave(&eda->lock, flags);
	list_for_each_entry(itr, &eda->cache, list_node) {
		if (!memcmp(&itr->dev_addr, dev_addr, sizeof(itr->dev_addr))) {
			*eda_entry = *itr;
			result = 0;
			goto out_unlock;
		}
	}
out_unlock:
	spin_unlock_irqrestore(&eda->lock, flags);
	return result;
}