Lines Matching refs:tw_ioctl
648 TW_Ioctl_Buf_Apache *tw_ioctl; in twa_chrdev_ioctl() local
688 tw_ioctl = (TW_Ioctl_Buf_Apache *)cpu_addr; in twa_chrdev_ioctl()
691 if (copy_from_user(tw_ioctl, argp, sizeof(TW_Ioctl_Buf_Apache) + driver_command.buffer_length)) in twa_chrdev_ioctl()
706 full_command_packet = &tw_ioctl->firmware_command; in twa_chrdev_ioctl()
711 …memcpy(tw_dev->command_packet_virt[request_id], &(tw_ioctl->firmware_command), sizeof(TW_Command_F… in twa_chrdev_ioctl()
734 …memcpy(&(tw_ioctl->firmware_command), tw_dev->command_packet_virt[request_id], sizeof(TW_Command_F… in twa_chrdev_ioctl()
744 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
746 tw_compat_info = (TW_Compatibility_Info *)tw_ioctl->data_buffer; in twa_chrdev_ioctl()
752 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_AEN_CLOBBER; in twa_chrdev_ioctl()
755 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
758 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS; in twa_chrdev_ioctl()
761 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
764 memcpy(tw_ioctl->data_buffer, tw_dev->event_queue[event_index], sizeof(TW_Event)); in twa_chrdev_ioctl()
770 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_AEN_CLOBBER; in twa_chrdev_ioctl()
773 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
777 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS; in twa_chrdev_ioctl()
780 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
783 memcpy(tw_ioctl->data_buffer, tw_dev->event_queue[event_index], sizeof(TW_Event)); in twa_chrdev_ioctl()
787 event = (TW_Event *)tw_ioctl->data_buffer; in twa_chrdev_ioctl()
789 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
793 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_AEN_CLOBBER; in twa_chrdev_ioctl()
799 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS; in twa_chrdev_ioctl()
807 if (tw_ioctl->driver_command.status == TW_IOCTL_ERROR_STATUS_AEN_CLOBBER) in twa_chrdev_ioctl()
809 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS; in twa_chrdev_ioctl()
812 memcpy(tw_ioctl->data_buffer, tw_dev->event_queue[event_index], sizeof(TW_Event)); in twa_chrdev_ioctl()
816 event = (TW_Event *)tw_ioctl->data_buffer; in twa_chrdev_ioctl()
818 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
822 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_AEN_CLOBBER; in twa_chrdev_ioctl()
828 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS; in twa_chrdev_ioctl()
836 if (tw_ioctl->driver_command.status == TW_IOCTL_ERROR_STATUS_AEN_CLOBBER) in twa_chrdev_ioctl()
838 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS; in twa_chrdev_ioctl()
841 memcpy(tw_ioctl->data_buffer, tw_dev->event_queue[event_index], sizeof(TW_Event)); in twa_chrdev_ioctl()
845 tw_lock = (TW_Lock *)tw_ioctl->data_buffer; in twa_chrdev_ioctl()
852 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
855 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_LOCKED; in twa_chrdev_ioctl()
862 tw_ioctl->driver_command.status = 0; in twa_chrdev_ioctl()
864 tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NOT_LOCKED; in twa_chrdev_ioctl()
873 if (copy_to_user(argp, tw_ioctl, sizeof(TW_Ioctl_Buf_Apache) + driver_command.buffer_length) == 0) in twa_chrdev_ioctl()