Date:2015-04-26 04:54:02 (4 years 4 months ago)
Author:Werner Almesberger
Commit:f89ce523e8f6eaa3d419b4853ad1b1ba75dd28f8
Message:atusb/fw/usb/usb.c (handle_setup): skip non-interface descriptors when processing SET_INTERFACE

Files: atusb/fw/usb/usb.c (2 diffs)

Change Details

atusb/fw/usb/usb.c
11/*
22 * fw/usb/usb.c - USB hardware setup and standard device requests
33 *
4 * Written 2008-2011, 2013 by Werner Almesberger
5 * Copyright 2008-2011, 2013 Werner Almesberger
4 * Written 2008-2011, 2013, 2015 by Werner Almesberger
5 * Copyright 2008-2011, 2013, 2015 Werner Almesberger
66 *
77 * This program is free software; you can redistribute it and/or modify
88 * it under the terms of the GNU General Public License as published by
...... 
145145            for (p = interface_descriptor;
146146                p != config_descriptor+config_descriptor[2];
147147                p += p[0]) {
148                if (p[1] != USB_DT_INTERFACE)
149                    continue;
148150                if (p[2] == setup->wIndex &&
149151                    p[3] == setup->wValue) {
150152                    if (user_set_interface)

Archive Download the corresponding diff file



interactive