usb: gadget: f_gsi: Fix alternate index returned by gsi_get_alt
RNDIS, RMNET and DPL only supports alternate index 0. Instead of returning value of data_interface_up which is used for interfaces supporting non-zero alternate index, simply return 0. Change-Id: I7fe6c7c636207cd4f85d468f61c87e5a4e12b0ac Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This commit is contained in:
parent
008f057bba
commit
98aecd6043
1 changed files with 4 additions and 1 deletions
|
@ -1702,7 +1702,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;
|
||||
|
|
Loading…
Add table
Reference in a new issue