/* Retrieve capability information for the specified ISDN controller or (for @contr == 0) the number of installed controllers. Return value: CAPI result code  */
u16 capi20_get_profile(u32 contr, struct capi_profile *profp)
/* Retrieve capability information for the specified ISDN controller or (for @contr == 0) the number of installed controllers. Return value: CAPI result code  */
u16 capi20_get_profile(u32 contr, struct capi_profile *profp)
{
	struct capi_ctr *card;
	if (contr == 0) {
		profp->ncontroller = ncards;
		return CAPI_NOERROR;
	}
	card = get_capi_ctr_by_nr(contr);
	if (!card || card->cardstate != CARD_RUNNING) 
		return CAPI_REGNOTINSTALLED;
	memcpy((void *) profp, &card->profile,
			sizeof(struct capi_profile));
	return CAPI_NOERROR;
}