Lines Matching refs:tw_ioctl

651 	TW_Ioctl_Buf_Apache *tw_ioctl;  in twa_chrdev_ioctl()  local
690 tw_ioctl = (TW_Ioctl_Buf_Apache *)cpu_addr; in twa_chrdev_ioctl()
693 if (copy_from_user(tw_ioctl, argp, driver_command.buffer_length + sizeof(TW_Ioctl_Buf_Apache) - 1)) in twa_chrdev_ioctl()
708 full_command_packet = &tw_ioctl->firmware_command; in twa_chrdev_ioctl()
713 …memcpy(tw_dev->command_packet_virt[request_id], &(tw_ioctl->firmware_command), sizeof(TW_Command_F… in twa_chrdev_ioctl()
736 …memcpy(&(tw_ioctl->firmware_command), tw_dev->command_packet_virt[request_id], sizeof(TW_Command_F… in twa_chrdev_ioctl()
746 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
748 tw_compat_info = (TW_Compatibility_Info *)tw_ioctl->data_buffer; in twa_chrdev_ioctl()
754 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_AEN_CLOBBER; in twa_chrdev_ioctl()
757 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
760 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS; in twa_chrdev_ioctl()
763 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
766 memcpy(tw_ioctl->data_buffer, tw_dev->event_queue[event_index], sizeof(TW_Event)); in twa_chrdev_ioctl()
772 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_AEN_CLOBBER; in twa_chrdev_ioctl()
775 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
779 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS; in twa_chrdev_ioctl()
782 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
785 memcpy(tw_ioctl->data_buffer, tw_dev->event_queue[event_index], sizeof(TW_Event)); in twa_chrdev_ioctl()
789 event = (TW_Event *)tw_ioctl->data_buffer; in twa_chrdev_ioctl()
791 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
795 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_AEN_CLOBBER; in twa_chrdev_ioctl()
801 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS; in twa_chrdev_ioctl()
809 if (tw_ioctl->driver_command.status == TW_IOCTL_ERROR_STATUS_AEN_CLOBBER) in twa_chrdev_ioctl()
811 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS; in twa_chrdev_ioctl()
814 memcpy(tw_ioctl->data_buffer, tw_dev->event_queue[event_index], sizeof(TW_Event)); in twa_chrdev_ioctl()
818 event = (TW_Event *)tw_ioctl->data_buffer; in twa_chrdev_ioctl()
820 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
824 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_AEN_CLOBBER; in twa_chrdev_ioctl()
830 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS; in twa_chrdev_ioctl()
838 if (tw_ioctl->driver_command.status == TW_IOCTL_ERROR_STATUS_AEN_CLOBBER) in twa_chrdev_ioctl()
840 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS; in twa_chrdev_ioctl()
843 memcpy(tw_ioctl->data_buffer, tw_dev->event_queue[event_index], sizeof(TW_Event)); in twa_chrdev_ioctl()
847 tw_lock = (TW_Lock *)tw_ioctl->data_buffer; in twa_chrdev_ioctl()
854 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
857 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_LOCKED; in twa_chrdev_ioctl()
864 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
866 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NOT_LOCKED; in twa_chrdev_ioctl()
875 …if (copy_to_user(argp, tw_ioctl, sizeof(TW_Ioctl_Buf_Apache) + driver_command.buffer_length - 1) =… in twa_chrdev_ioctl()