Merge "usb: gadget: f_gsi: Fix alternate index returned by gsi_get_alt"

This commit is contained in:
Linux Build Service Account 2016-08-26 14:48:46 -07:00 committed by Gerrit - the friendly Code Review server
commit 0b4cfe3827

View file

@ -1727,7 +1727,10 @@ static int gsi_get_alt(struct usb_function *f, unsigned intf)
{
struct f_gsi *gsi = func_to_gsi(f);
if (intf == gsi->ctrl_id)
/* RNDIS, RMNET and DPL only support alt 0*/
if (intf == gsi->ctrl_id || gsi->prot_id == IPA_USB_RNDIS ||
gsi->prot_id == IPA_USB_RMNET ||
gsi->prot_id == IPA_USB_DIAG)
return 0;
else if (intf == gsi->data_id)
return gsi->data_interface_up;