/* Functions for managing QoS list Overwrites the old entry or makes a new one.  */
struct atm_mpoa_qos* atm_mpoa_add_qos(__be32 dst_ip, struct atm_qos *qos)
/* Functions for managing QoS list Overwrites the old entry or makes a new one.  */
struct atm_mpoa_qos* atm_mpoa_add_qos(__be32 dst_ip, struct atm_qos *qos)
{
	struct atm_mpoa_qos *entry;
	entry = atm_mpoa_search_qos(dst_ip);
	if (entry != NULL) {
		entry->qos = *qos;
		return entry;
	}
	entry = kmalloc(sizeof(struct atm_mpoa_qos), GFP_KERNEL);
	if (entry == NULL) {
		printk("mpoa: atm_mpoa_add_qos: out of memory\n");
		return entry;
	}
	entry->ipaddr = dst_ip;
	entry->qos = *qos;
	entry->next = qos_head;
	qos_head = entry;
	return entry;
}