/* Per IrLMP 1.1, 4.3.3.2, octet-sequence are up to 1024 bytes - Jean II  */
struct ias_value* irias_new_octseq_value(__u8 *octseq, int len)
/* Per IrLMP 1.1, 4.3.3.2, octet-sequence are up to 1024 bytes - Jean II  */
struct ias_value* irias_new_octseq_value(__u8 *octseq, int len)
{
	struct ias_value *value;
	value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
	if (value == NULL) {
		IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
		return NULL;
	}
	value->type = IAS_OCT_SEQ;
	if(len > IAS_MAX_OCTET_STRING)
		len = IAS_MAX_OCTET_STRING;
	value->len = len;
	value->t.oct_seq = kmemdup(octseq, len, GFP_ATOMIC);
	if (value->t.oct_seq == NULL){
		IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
		kfree(value);
		return NULL;
	}
	return value;
}