summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2020-06-14 19:31:32 +0700
committerGitHub <[email protected]>2020-06-14 19:31:32 +0700
commit8a67f81397245f6f54045e82273847ac5f48c1a7 (patch)
tree7721e8112668dea33881524b176989d43ce04227 /src
parentd9496256cf5979f4bf2a6eb915e098861a459394 (diff)
parentbc7e24b659e0d184f3405681af5f13bd4a5094aa (diff)
Merge pull request #430 from PanRe/fix-too-strict-iad-checks
Fix too strict checks on subclass and protocol entries of iad descriptor.
Diffstat (limited to 'src')
-rw-r--r--src/device/usbd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index 3708a9aff..29b10c0fa 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -763,11 +763,9 @@ static bool process_set_config(uint8_t rhport, uint8_t cfg_num)
// If IAD exist, assign all interfaces to the same driver
if (desc_itf_assoc)
{
- // IAD's first interface number and class/subclass/protocol should match with opened interface
- TU_ASSERT(desc_itf_assoc->bFirstInterface == desc_itf->bInterfaceNumber &&
- desc_itf_assoc->bFunctionClass == desc_itf->bInterfaceClass &&
- desc_itf_assoc->bFunctionSubClass == desc_itf->bInterfaceSubClass &&
- desc_itf_assoc->bFunctionProtocol == desc_itf->bInterfaceProtocol);
+ // IAD's first interface number and class should match with opened interface
+ TU_ASSERT(desc_itf_assoc->bFirstInterface == desc_itf->bInterfaceNumber &&
+ desc_itf_assoc->bFunctionClass == desc_itf->bInterfaceClass);
for(uint8_t i=1; i<desc_itf_assoc->bInterfaceCount; i++)
{