aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-device-cdev.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-02-16 17:34:51 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-09 16:03:04 -0500
commit98b6cbe83b6e8db54638746c9040c7962d96b322 (patch)
treead9d7587a5dde5510b402da8681e8c3d150d7ca5 /drivers/firewire/fw-device-cdev.c
parent21efb3cfc6ed49991638000f58bb23b838c76e25 (diff)
firewire: Implement sync and tag matching for isochronous receive.
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-device-cdev.c')
-rw-r--r--drivers/firewire/fw-device-cdev.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/firewire/fw-device-cdev.c b/drivers/firewire/fw-device-cdev.c
index 5c876188677f..33fe5768a078 100644
--- a/drivers/firewire/fw-device-cdev.c
+++ b/drivers/firewire/fw-device-cdev.c
@@ -416,6 +416,12 @@ static int ioctl_create_iso_context(struct client *client, void __user *arg)
416 if (request.channel > 63) 416 if (request.channel > 63)
417 return -EINVAL; 417 return -EINVAL;
418 418
419 if (request.sync > 15)
420 return -EINVAL;
421
422 if (request.tags == 0 || request.tags > 15)
423 return -EINVAL;
424
419 if (request.speed > SCODE_3200) 425 if (request.speed > SCODE_3200)
420 return -EINVAL; 426 return -EINVAL;
421 427
@@ -424,6 +430,8 @@ static int ioctl_create_iso_context(struct client *client, void __user *arg)
424 request.channel, 430 request.channel,
425 request.speed, 431 request.speed,
426 request.header_size, 432 request.header_size,
433 request.sync,
434 request.tags,
427 iso_callback, client); 435 iso_callback, client);
428 if (IS_ERR(client->iso_context)) 436 if (IS_ERR(client->iso_context))
429 return PTR_ERR(client->iso_context); 437 return PTR_ERR(client->iso_context);
@@ -495,7 +503,7 @@ static int ioctl_queue_iso(struct client *client, void __user *arg)
495 if (__copy_from_user 503 if (__copy_from_user
496 (u.packet.header, p->header, header_length)) 504 (u.packet.header, p->header, header_length))
497 return -EFAULT; 505 return -EFAULT;
498 if (u.packet.skip && 506 if (u.packet.skip && ctx->type == FW_ISO_CONTEXT_TRANSMIT &&
499 u.packet.header_length + u.packet.payload_length > 0) 507 u.packet.header_length + u.packet.payload_length > 0)
500 return -EINVAL; 508 return -EINVAL;
501 if (payload + u.packet.payload_length > payload_end) 509 if (payload + u.packet.payload_length > payload_end)