qcacmn: Add new definition of usb_hif_get_logical_pipe_num()

Add new definition of usb_hif_get_logical_pipe_num() for Genoa(QCN7605)

Change-Id: I278407b6f373c8a4e0509a1597ca27d83f8104fd
CRs-Fixed: 2266915
This commit is contained in:
Ajit Pal Singh 2018-06-19 15:40:33 +05:30 • committed by nshrivas
commit 973024916e

View file

@ -227,6 +227,47 @@ static void usb_hif_free_pipe_resources(struct HIF_USB_PIPE *pipe)
}
#ifdef CONFIG_QCN7605
/**
* usb_hif_get_logical_pipe_num() - get pipe number for a particular enpoint
* @device: pointer to HIF_DEVICE_USB structure
* @ep_address: endpoint address
* @urb_count: number of urb resources to be allocated to the pipe
*
* Return: uint8_t pipe number corresponding to ep_address
*/
static uint8_t usb_hif_get_logical_pipe_num(struct HIF_DEVICE_USB *device,
uint8_t ep_address,
int *urb_count)
{
uint8_t pipe_num = HIF_USB_PIPE_INVALID;
switch (ep_address) {
case USB_EP_ADDR_APP_CTRL_IN:
pipe_num = HIF_RX_CTRL_PIPE;
*urb_count = RX_URB_COUNT;
break;
case USB_EP_ADDR_APP_DATA_IN:
pipe_num = HIF_RX_DATA_PIPE;
*urb_count = RX_URB_COUNT;
break;
break;
case USB_EP_ADDR_APP_CTRL_OUT:
pipe_num = HIF_TX_CTRL_PIPE;
*urb_count = TX_URB_COUNT;
break;
case USB_EP_ADDR_APP_DATA_OUT:
pipe_num = HIF_TX_DATA_LP_PIPE;
*urb_count = TX_URB_COUNT;
break;
default:
/* note: there may be endpoints not currently used */
break;
}
return pipe_num;
}
#else
/**
* usb_hif_get_logical_pipe_num() - get pipe number for a particular enpoint
* @device: pointer to HIF_DEVICE_USB structure
@ -282,6 +323,7 @@ static uint8_t usb_hif_get_logical_pipe_num
return pipe_num;
}
#endif /* CONFIG_QCN7605 */
/**
* usb_hif_get_logical_pipe_num() - setup urb resources for all pipes