• Johan Hovold's avatar
    net: lan78xx: replace bogus endpoint lookup · ea060b35
    Johan Hovold authored
    Drop the bogus endpoint-lookup helper which could end up accepting
    interfaces based on endpoints belonging to unrelated altsettings.
    
    Note that the returned bulk pipes and interrupt endpoint descriptor
    were never actually used. Instead the bulk-endpoint numbers are
    hardcoded to 1 and 2 (matching the specification), while the interrupt-
    endpoint descriptor was assumed to be the third descriptor created by
    USB core.
    
    Try to bring some order to this by dropping the bogus lookup helper and
    adding the missing endpoint sanity checks while keeping the interrupt-
    descriptor assumption for now.
    Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ea060b35
lan78xx.c 102 KB