rsi: add rx control block to handle rx packets in USB

Rx bluetooth endpoint shall be added in further patches. Rx control
block is introduced here to handle Rx packets properly. Separate
function is written to initialize the RX control blocks.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Prameela Rani Garnepudi
2018-02-27 19:56:11 +05:30
committed by Kalle Valo
parent a9eab62d41
commit 1100f81bbc
7 changed files with 96 additions and 34 deletions

View File

@@ -39,12 +39,20 @@
#define RSI_USB_BUF_SIZE 4096
#define RSI_USB_CTRL_BUF_SIZE 0x04
struct rx_usb_ctrl_block {
u8 *data;
struct urb *rx_urb;
u8 *rx_buffer;
u8 ep_num;
u8 pend;
};
struct rsi_91x_usbdev {
struct rsi_thread rx_thread;
u8 endpoint;
struct usb_device *usbdev;
struct usb_interface *pfunction;
struct urb *rx_usb_urb[MAX_RX_URBS];
struct rx_usb_ctrl_block rx_cb[MAX_RX_URBS];
u8 *tx_buffer;
__le16 bulkin_size;
u8 bulkin_endpoint_addr;