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:50 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-09 16:03:03 -0500
commit21efb3cfc6ed49991638000f58bb23b838c76e25 (patch)
tree30b1b0ed02082b09fa844abf5888b4d3fbdadbe7 /drivers/firewire/fw-device-cdev.c
parente364cf4e0aa245ba2ce5942289e8a43935505e53 (diff)
firewire: Configure channel and speed at context creation time.
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>
Diffstat (limited to 'drivers/firewire/fw-device-cdev.c')
-rw-r--r--drivers/firewire/fw-device-cdev.c11
1 files changed, 9 insertions, 2 deletions
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)
413 if (request.type > FW_ISO_CONTEXT_RECEIVE) 413 if (request.type > FW_ISO_CONTEXT_RECEIVE)
414 return -EINVAL; 414 return -EINVAL;
415 415
416 if (request.channel > 63)
417 return -EINVAL;
418
419 if (request.speed > SCODE_3200)
420 return -EINVAL;
421
416 client->iso_context = fw_iso_context_create(client->device->card, 422 client->iso_context = fw_iso_context_create(client->device->card,
417 request.type, 423 request.type,
424 request.channel,
425 request.speed,
418 request.header_size, 426 request.header_size,
419 iso_callback, client); 427 iso_callback, client);
420 if (IS_ERR(client->iso_context)) 428 if (IS_ERR(client->iso_context))
@@ -519,8 +527,7 @@ static int ioctl_start_iso(struct client *client, void __user *arg)
519 if (copy_from_user(&request, arg, sizeof request)) 527 if (copy_from_user(&request, arg, sizeof request))
520 return -EFAULT; 528 return -EFAULT;
521 529
522 return fw_iso_context_start(client->iso_context, request.channel, 530 return fw_iso_context_start(client->iso_context, request.cycle);
523 request.speed, request.cycle);
524} 531}
525 532
526static int ioctl_stop_iso(struct client *client, void __user *arg) 533static int ioctl_stop_iso(struct client *client, void __user *arg)