firewire: Configure channel and speed at context creation time.
authorKristian Høgsberg <krh@redhat.com>
Fri, 16 Feb 2007 22:34:50 +0000 (17:34 -0500)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Fri, 9 Mar 2007 21:03:03 +0000 (22:03 +0100)
We need the channel number as we queue up iso packets for transmission
so we can fill out the header correctly.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-device-cdev.c
drivers/firewire/fw-device-cdev.h
drivers/firewire/fw-iso.c
drivers/firewire/fw-ohci.c
drivers/firewire/fw-transaction.h

index 6545fb8..5c87618 100644 (file)
@@ -413,8 +413,16 @@ static int ioctl_create_iso_context(struct client *client, void __user *arg)
        if (request.type > FW_ISO_CONTEXT_RECEIVE)
                return -EINVAL;
 
+       if (request.channel > 63)
+               return -EINVAL;
+
+       if (request.speed > SCODE_3200)
+               return -EINVAL;
+
        client->iso_context = fw_iso_context_create(client->device->card,
                                                    request.type,
+                                                   request.channel,
+                                                   request.speed,
                                                    request.header_size,
                                                    iso_callback, client);
        if (IS_ERR(client->iso_context))
@@ -519,8 +527,7 @@ static int ioctl_start_iso(struct client *client, void __user *arg)
        if (copy_from_user(&request, arg, sizeof request))
                return -EFAULT;
 
-       return fw_iso_context_start(client->iso_context, request.channel,
-                                   request.speed, request.cycle);
+       return fw_iso_context_start(client->iso_context, request.cycle);
 }
 
 static int ioctl_stop_iso(struct client *client, void __user *arg)
Simple merge
Simple merge
Simple merge
Simple merge