aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2009-03-10 15:59:16 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2009-03-24 15:56:49 -0400
commitc8a25900f35e575938c791507894c036c0f2ca7d (patch)
treee413f9e098dea94c74fd0aab35a511800043c97b /drivers/firewire
parent6104ee92d62ea3638b67494fcf061cb4b9b9d518 (diff)
firewire: cdev: amendment to "add ioctl to query maximum transmission speed"
The as yet unreleased FW_CDEV_IOC_GET_SPEED ioctl puts only a single integer into the parameter buffer. We can use ioctl()'s return value instead. (Also: Some whitespace change in firewire-cdev.h.) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/fw-cdev.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c
index 539dae5eb5b2..2784f91896db 100644
--- a/drivers/firewire/fw-cdev.c
+++ b/drivers/firewire/fw-cdev.c
@@ -1214,13 +1214,14 @@ static int ioctl_deallocate_iso_resource_once(struct client *client, void *buffe
1214 return init_iso_resource(client, request, ISO_RES_DEALLOC_ONCE); 1214 return init_iso_resource(client, request, ISO_RES_DEALLOC_ONCE);
1215} 1215}
1216 1216
1217/*
1218 * Returns a speed code: Maximum speed to or from this device,
1219 * limited by the device's link speed, the local node's link speed,
1220 * and all PHY port speeds between the two links.
1221 */
1217static int ioctl_get_speed(struct client *client, void *buffer) 1222static int ioctl_get_speed(struct client *client, void *buffer)
1218{ 1223{
1219 struct fw_cdev_get_speed *request = buffer; 1224 return client->device->max_speed;
1220
1221 request->max_speed = client->device->max_speed;
1222
1223 return 0;
1224} 1225}
1225 1226
1226static int ioctl_send_broadcast_request(struct client *client, void *buffer) 1227static int ioctl_send_broadcast_request(struct client *client, void *buffer)