/* Parse all parameters. If len is correct, then everything should be safe. Returns the number of bytes that was parsed  */
int irda_param_extract_all(void *self, __u8 *buf, int len, pi_param_info_t *info)
/* Parse all parameters. If len is correct, then everything should be safe. Returns the number of bytes that was parsed  */
int irda_param_extract_all(void *self, __u8 *buf, int len, pi_param_info_t *info)
{
	int ret = -1;
	int n = 0;
	IRDA_ASSERT(buf != NULL, return ret;);
	IRDA_ASSERT(info != NULL, return ret;);
	while (len > 2) {
		ret = irda_param_extract(self, buf+n, len, info);
		if (ret < 0)
			return ret;
		n += ret;
		len -= ret;
	}
	return n;
}