aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/firewire-cdev.h
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2009-03-10 16:02:21 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2009-03-24 15:56:50 -0400
commit18e9b10fcdc090d3a38606958167d5923c7099b7 (patch)
treefd83055d908e8786afc9b3fbc791b57b2ba10c33 /include/linux/firewire-cdev.h
parent664d8010b170ae8b3ce9268b4f4da934d27b0491 (diff)
firewire: cdev: add closure to async stream ioctl
This changes the as yet unreleased FW_CDEV_IOC_SEND_STREAM_PACKET ioctl to generate an fw_cdev_event_response event just like the other two ioctls for asynchronous request transmission do. This way, clients get feedback on successful or unsuccessful transmission. This also adds input validation for length, tag, channel, sy, speed. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'include/linux/firewire-cdev.h')
-rw-r--r--include/linux/firewire-cdev.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h
index 25bc82726ef7..c6b3ca3af6df 100644
--- a/include/linux/firewire-cdev.h
+++ b/include/linux/firewire-cdev.h
@@ -606,28 +606,29 @@ struct fw_cdev_allocate_iso_resource {
606 606
607/** 607/**
608 * struct fw_cdev_send_stream_packet - send an asynchronous stream packet 608 * struct fw_cdev_send_stream_packet - send an asynchronous stream packet
609 * @generation: Bus generation where the packet is valid 609 * @length: Length of outgoing payload, in bytes
610 * @speed: Speed code to send the packet at 610 * @tag: Data format tag
611 * @channel: Channel to send the packet on 611 * @channel: Isochronous channel to transmit to
612 * @sy: Four-bit sy code for the packet 612 * @sy: Synchronization code
613 * @tag: Two-bit tag field to use for the packet 613 * @closure: Passed back to userspace in the response event
614 * @size: Size of the packet's data payload 614 * @data: Userspace pointer to payload
615 * @data: Userspace pointer to the payload 615 * @generation: The bus generation where packet is valid
616 * @speed: Speed to transmit at
616 * 617 *
617 * The %FW_CDEV_IOC_SEND_STREAM_PACKET ioctl sends an asynchronous stream packet 618 * The %FW_CDEV_IOC_SEND_STREAM_PACKET ioctl sends an asynchronous stream packet
618 * to every device (that is listening to the specified channel) on the 619 * to every device which is listening to the specified channel. The kernel
619 * firewire bus. It is the applications's job to ensure 620 * writes an &fw_cdev_event_response event which indicates success or failure of
620 * that the intended device(s) will be able to receive the packet at the chosen 621 * the transmission.
621 * transmit speed.
622 */ 622 */
623struct fw_cdev_send_stream_packet { 623struct fw_cdev_send_stream_packet {
624 __u32 generation; 624 __u32 length;
625 __u32 speed; 625 __u32 tag;
626 __u32 channel; 626 __u32 channel;
627 __u32 sy; 627 __u32 sy;
628 __u32 tag; 628 __u64 closure;
629 __u32 size;
630 __u64 data; 629 __u64 data;
630 __u32 generation;
631 __u32 speed;
631}; 632};
632 633
633#endif /* _LINUX_FIREWIRE_CDEV_H */ 634#endif /* _LINUX_FIREWIRE_CDEV_H */