• Johan Hovold's avatar
    net: lan78xx: replace bogus endpoint lookup · 9a70de92
    Johan Hovold authored
    [ Upstream commit ea060b35 ]
    
    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>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    9a70de92
lan78xx.c 103 KB