** pretend that whatever the user asked for was achieved, so we return 1 if
** try to create one, and 0 if they ask to remove (assuming all else was OK).
****************************************************************************/
-int SetEvent(DEVICE_EXTENSION *pdx, TRANSFEREVENT __user *pTE)
+int SetEvent(DEVICE_EXTENSION *pdx, struct transfer_event __user *pTE)
{
int iReturn = U14ERR_NOERROR;
- TRANSFEREVENT te;
+ struct transfer_event te;
/* get a local copy of the data */
if (copy_from_user(&te, pTE, sizeof(te)))
};
-typedef struct TransferEvent {
+struct transfer_event {
unsigned int dwStart; /* offset into the area */
unsigned int dwLength; /* length of the region */
unsigned short wAreaNum; /* the area number */
unsigned short wFlags; /* bit 0 set for toHost */
int iSetEvent; /* could be dummy in LINUX */
-} TRANSFEREVENT;
+};
#define MAX_TRANSFER_SIZE 0x4000 /* Maximum data bytes per IRP */
#define MAX_AREA_LENGTH 0x100000 /* Maximum size of transfer area */
#define IOCTL_CED_SETTRANSFER _IOW(CED_MAGIC_IOC, 11, struct transfer_area_desc)
#define IOCTL_CED_UNSETTRANSFER _IO(CED_MAGIC_IOC, 12)
-#define IOCTL_CED_SETEVENT _IOW(CED_MAGIC_IOC, 13, TRANSFEREVENT)
+#define IOCTL_CED_SETEVENT _IOW(CED_MAGIC_IOC, 13, struct transfer_event)
#define IOCTL_CED_GETOUTBUFSPACE _IO(CED_MAGIC_IOC, 14)
#define IOCTL_CED_GETBASEADDRESS _IO(CED_MAGIC_IOC, 15)
#define IOCTL_CED_GETDRIVERREVISION _IO(CED_MAGIC_IOC, 16)
return ioctl(fh, IOCTL_CED_UNSETTRANSFER, nArea);
}
-inline int CED_SetEvent(int fh, TRANSFEREVENT *pTE)
+inline int CED_SetEvent(int fh, struct transfer_event *pTE)
{
return ioctl(fh, IOCTL_CED_SETEVENT, pTE);
}
return UnsetTransfer(pdx, (int)ulArg);
case _IOC_NR(IOCTL_CED_SETEVENT):
- return SetEvent(pdx, (TRANSFEREVENT __user *) ulArg);
+ return SetEvent(pdx, (struct transfer_event __user *) ulArg);
case _IOC_NR(IOCTL_CED_GETOUTBUFSPACE):
return GetOutBufSpace(pdx);
extern int GetString(DEVICE_EXTENSION *pdx, char __user *pUser, int n);
extern int SetTransfer(DEVICE_EXTENSION *pdx, struct transfer_area_desc __user *pTD);
extern int UnsetTransfer(DEVICE_EXTENSION *pdx, int nArea);
-extern int SetEvent(DEVICE_EXTENSION *pdx, TRANSFEREVENT __user *pTE);
+extern int SetEvent(DEVICE_EXTENSION *pdx, struct transfer_event __user *pTE);
extern int Stat1401(DEVICE_EXTENSION *pdx);
extern int LineCount(DEVICE_EXTENSION *pdx);
extern int GetOutBufSpace(DEVICE_EXTENSION *pdx);