diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-07-30 22:29:58 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-07-30 22:29:58 +0200 |
commit | 832cc89602395af45ea0a39ebcd34f3f612608d7 (patch) | |
tree | 785c800e29e2880683f46a5e2c54c933808a2c39 /at91lib | |
parent | 82125db510b46a0bae1cfe6df769bf671f446790 (diff) |
at91lib ccid: Fix CCID descriptor sent to the host
The CCID deccriptor needs to claim T=0 support and auto-baud/auto-clock,
otherwise some drivers legitimately refues to work with the device.
Diffstat (limited to 'at91lib')
-rw-r--r-- | at91lib/usb/device/ccid/cciddriver.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/at91lib/usb/device/ccid/cciddriver.c b/at91lib/usb/device/ccid/cciddriver.c index a23fc21..aa32270 100644 --- a/at91lib/usb/device/ccid/cciddriver.c +++ b/at91lib/usb/device/ccid/cciddriver.c @@ -183,7 +183,7 @@ static const CCIDDriverConfigurationDescriptors configurationDescriptorsFS = { CCID1_10, // bcdCCID: CCID version
0, // bMaxSlotIndex: Value 0 indicates that one slot is supported
VOLTS_5_0, // bVoltageSupport
- PROTOCOL_TO, // dwProtocols
+ (1 << PROTOCOL_TO), // dwProtocols
3580, // dwDefaultClock
3580, // dwMaxClock
0, // bNumClockSupported
@@ -194,6 +194,7 @@ static const CCIDDriverConfigurationDescriptors configurationDescriptorsFS = { 0, // dwSynchProtocols
0, // dwMechanical
//0x00010042, // dwFeatures: Short APDU level exchanges
+ CCID_FEATURES_AUTO_CLOCK | CCID_FEATURES_AUTO_BAUD |
CCID_FEATURES_AUTO_PCONF | CCID_FEATURES_AUTO_PNEGO | CCID_FEATURES_EXC_TPDU,
0x0000010F, // dwMaxCCIDMessageLength: For extended APDU level the value shall be between 261 + 10
0xFF, // bClassGetResponse: Echoes the class of the APDU
@@ -268,7 +269,7 @@ static const CCIDDriverConfigurationDescriptors configurationDescriptorsHS = { CCID1_10, // bcdCCID: CCID version
0, // bMaxSlotIndex: Value 0 indicates that one slot is supported
VOLTS_5_0, // bVoltageSupport
- PROTOCOL_TO, // dwProtocols
+ (1 << PROTOCOL_TO), // dwProtocols
3580, // dwDefaultClock
3580, // dwMaxClock
0, // bNumClockSupported
@@ -279,6 +280,7 @@ static const CCIDDriverConfigurationDescriptors configurationDescriptorsHS = { 0, // dwSynchProtocols
0, // dwMechanical
//0x00010042, // dwFeatures: Short APDU level exchanges
+ CCID_FEATURES_AUTO_CLOCK | CCID_FEATURES_AUTO_BAUD |
CCID_FEATURES_AUTO_PCONF | CCID_FEATURES_AUTO_PNEGO | CCID_FEATURES_EXC_TPDU,
0x0000010F, // dwMaxCCIDMessageLength: For extended APDU level the value shall be between 261 + 10
0xFF, // bClassGetResponse: Echoes the class of the APDU
@@ -367,7 +369,7 @@ static const CCIDDriverConfigurationDescriptors sOtherSpeedConfigurationFS = { CCID1_10, // bcdCCID: CCID version
0, // bMaxSlotIndex: Value 0 indicates that one slot is supported
VOLTS_5_0, // bVoltageSupport
- PROTOCOL_TO, // dwProtocols
+ (1 << PROTOCOL_TO), // dwProtocols
3580, // dwDefaultClock
3580, // dwMaxClock
0, // bNumClockSupported
@@ -378,6 +380,7 @@ static const CCIDDriverConfigurationDescriptors sOtherSpeedConfigurationFS = { 0, // dwSynchProtocols
0, // dwMechanical
//0x00010042, // dwFeatures: Short APDU level exchanges
+ CCID_FEATURES_AUTO_CLOCK | CCID_FEATURES_AUTO_BAUD |
CCID_FEATURES_AUTO_PCONF | CCID_FEATURES_AUTO_PNEGO | CCID_FEATURES_EXC_TPDU,
0x0000010F, // dwMaxCCIDMessageLength: For extended APDU level the value shall be between 261 + 10
0xFF, // bClassGetResponse: Echoes the class of the APDU
@@ -452,7 +455,7 @@ static const CCIDDriverConfigurationDescriptors sOtherSpeedConfigurationHS = { CCID1_10, // bcdCCID: CCID version
0, // bMaxSlotIndex: Value 0 indicates that one slot is supported
VOLTS_5_0, // bVoltageSupport
- PROTOCOL_TO, // dwProtocols
+ (1 << PROTOCOL_TO), // dwProtocols
3580, // dwDefaultClock
3580, // dwMaxClock
0, // bNumClockSupported
@@ -463,7 +466,8 @@ static const CCIDDriverConfigurationDescriptors sOtherSpeedConfigurationHS = { 0, // dwSynchProtocols
0, // dwMechanical
//0x00010042, // dwFeatures: Short APDU level exchanges
- CCID_FEATURES_AUTO_PCONF | CCID_FEATURES_AUTO_PNEGO | CCID_FEATURES_EXC_TPDU,
+ CCID_FEATURES_AUTO_CLOCK | CCID_FEATURES_AUTO_BAUD |
+ CCID_FEATURES_AUTO_PCONF | CCID_FEATURES_AUTO_PNEGO | CCID_FEATURES_EXC_TPDU,
0x0000010F, // dwMaxCCIDMessageLength: For extended APDU level the value shall be between 261 + 10
0xFF, // bClassGetResponse: Echoes the class of the APDU
0xFF, // bClassEnvelope: Echoes the class of the APDU
|