summaryrefslogtreecommitdiff
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 22:03:04 +0100
commit98b6cbe83b6e8db54638746c9040c7962d96b322 (patch)
treead9d7587a5dde5510b402da8681e8c3d150d7ca5 /drivers/firewire/fw-device-cdev.c
parent21efb3cfc6ed49991638000f58bb23b838c76e25 (diff)
downloadlwn-98b6cbe83b6e8db54638746c9040c7962d96b322.tar.gz
lwn-98b6cbe83b6e8db54638746c9040c7962d96b322.zip
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)
if (request.channel > 63)
return -EINVAL;
+ if (request.sync > 15)
+ return -EINVAL;
+
+ if (request.tags == 0 || request.tags > 15)
+ return -EINVAL;
+
if (request.speed > SCODE_3200)
return -EINVAL;
@@ -424,6 +430,8 @@ static int ioctl_create_iso_context(struct client *client, void __user *arg)
request.channel,
request.speed,
request.header_size,
+ request.sync,
+ request.tags,
iso_callback, client);
if (IS_ERR(client->iso_context))
return PTR_ERR(client->iso_context);
@@ -495,7 +503,7 @@ static int ioctl_queue_iso(struct client *client, void __user *arg)
if (__copy_from_user
(u.packet.header, p->header, header_length))
return -EFAULT;
- if (u.packet.skip &&
+ if (u.packet.skip && ctx->type == FW_ISO_CONTEXT_TRANSMIT &&
u.packet.header_length + u.packet.payload_length > 0)
return -EINVAL;
if (payload + u.packet.payload_length > payload_end)