[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 18/28] dev-smartcard-reader: reuse usb.h definiti
From: |
Alon Levy |
Subject: |
[Qemu-devel] [PATCH v3 18/28] dev-smartcard-reader: reuse usb.h definitions |
Date: |
Mon, 22 Apr 2013 18:04:48 +0300 |
Signed-off-by: Alon Levy <address@hidden>
---
hw/usb/dev-smartcard-reader.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
index 38c3c0e..98f3be1 100644
--- a/hw/usb/dev-smartcard-reader.c
+++ b/hw/usb/dev-smartcard-reader.c
@@ -68,12 +68,6 @@ do { \
#define BULK_IN_BUF_SIZE 384
#define BULK_IN_PENDING_NUM 8
-#define InterfaceOutClass \
- ((USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE)<<8)
-
-#define InterfaceInClass \
- ((USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE)<<8)
-
#define CCID_MAX_PACKET_SIZE 64
#define CCID_CONTROL_ABORT 0x1
@@ -410,8 +404,8 @@ static const USBDescStrings desc_strings = {
static const USBDescIface desc_iface0 = {
.bInterfaceNumber = 0,
.bNumEndpoints = 3,
- .bInterfaceClass = 0x0b,
- .bInterfaceSubClass = 0x00,
+ .bInterfaceClass = USB_CLASS_CSCID,
+ .bInterfaceSubClass = USB_SUBCLASS_UNDEFINED,
.bInterfaceProtocol = 0x00,
.iInterface = STR_INTERFACE,
.ndesc = 1,
@@ -687,15 +681,15 @@ static void ccid_handle_control(USBDevice *dev, USBPacket
*p, int request,
switch (request) {
/* Class specific requests. */
- case InterfaceOutClass | CCID_CONTROL_ABORT:
+ case ClassInterfaceOutRequest | CCID_CONTROL_ABORT:
DPRINTF(s, 1, "ccid_control abort UNIMPLEMENTED\n");
p->status = USB_RET_STALL;
break;
- case InterfaceInClass | CCID_CONTROL_GET_CLOCK_FREQUENCIES:
+ case ClassInterfaceRequest | CCID_CONTROL_GET_CLOCK_FREQUENCIES:
DPRINTF(s, 1, "ccid_control get clock frequencies UNIMPLEMENTED\n");
p->status = USB_RET_STALL;
break;
- case InterfaceInClass | CCID_CONTROL_GET_DATA_RATES:
+ case ClassInterfaceRequest | CCID_CONTROL_GET_DATA_RATES:
DPRINTF(s, 1, "ccid_control get data rates UNIMPLEMENTED\n");
p->status = USB_RET_STALL;
break;
--
1.8.2
- [Qemu-devel] [PATCH v3 06/28] util: move socket_init() to osdep.c, (continued)
- [Qemu-devel] [PATCH v3 06/28] util: move socket_init() to osdep.c, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 05/28] libcacard: use system config directory for nss db on win32, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 09/28] libcacard: split vscclient main() from socket reading, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 13/28] libcacard: remove default libcoolkey loading, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 12/28] libcacard: remove sql: prefix, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 11/28] libcacard: teach vscclient to use GMainLoop for portability, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 15/28] dev-smartcard-reader: nicer debug messages, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 16/28] dev-smartcard-reader: remove aborts (never triggered, but just in case), Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 17/28] dev-smartcard-reader: support windows guest, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 14/28] dev-smartcard-reader: white space fixes, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 18/28] dev-smartcard-reader: reuse usb.h definitions,
Alon Levy <=
- [Qemu-devel] [PATCH v3 20/28] ccid-card-passthru: add atr check, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 21/28] ccid-card-passthru, dev-smartcard-reader: add debug environment variables, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 19/28] libcacard: change default ATR, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 22/28] dev-smartcard-reader: define structs for CCID_Parameter internals, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 25/28] libcacard/vreader: add debugging messages for apdu, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 10/28] libcacard: vscclient to use QemuThread for portability, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 26/28] libcacard: move atr setting from macro to function, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 27/28] dev-smartcard-reader: empty implementation for Mechanical (fail correctly), Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 23/28] dev-smartcard-reader: change default protocol to T=0, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 28/28] libcacard/cac: change big switch functions to single return point, Alon Levy, 2013/04/22