From 21efb3cfc6ed49991638000f58bb23b838c76e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 16 Feb 2007 17:34:50 -0500 Subject: firewire: Configure channel and speed at context creation time. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Stefan Richter --- drivers/firewire/fw-device-cdev.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'drivers/firewire/fw-device-cdev.c') diff --git a/drivers/firewire/fw-device-cdev.c b/drivers/firewire/fw-device-cdev.c index 6545fb8214d8..5c876188677f 100644 --- a/drivers/firewire/fw-device-cdev.c +++ b/drivers/firewire/fw-device-cdev.c @@ -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) -- cgit v1.2.2