rxcb->rx_skb = rx_skb;
usb_fill_bulk_urb(rxcb->rx_urb, rtwusb->udev,
- usb_rcvbulkpipe(rtwusb->udev, rtwusb->in_pipe),
+ usb_rcvbulkpipe(rtwusb->udev, rtwusb->in_pipe[0]),
rxcb->rx_skb->data, RTW89_USB_RECVBUF_SZ,
rtw89_usb_read_port_complete, rxcb);
struct rtw89_usb *rtwusb = rtw89_usb_priv(rtwdev);
struct usb_endpoint_descriptor *endpoint;
int num_out_pipes = 0;
+ int num_in_pipes = 0;
u8 num;
int i;
if (usb_endpoint_dir_in(endpoint) &&
usb_endpoint_xfer_bulk(endpoint)) {
- if (rtwusb->in_pipe) {
+ if (num_in_pipes >= RTW89_MAX_BULKIN_NUM) {
rtw89_err(rtwdev,
- "found more than 1 bulk in endpoint\n");
+ "found more than %d bulk in endpoint\n",
+ RTW89_MAX_BULKIN_NUM);
return -EINVAL;
}
- rtwusb->in_pipe = num;
+ rtwusb->in_pipe[num_in_pipes++] = num;
}
if (usb_endpoint_dir_out(endpoint) &&
}
}
+ if (num_in_pipes < 1) {
+ rtw89_err(rtwdev, "no bulk in endpoints found\n");
+ return -EINVAL;
+ }
+
if (num_out_pipes < 1) {
rtw89_err(rtwdev, "no bulk out endpoints found\n");
return -EINVAL;
#define RTW89_USB_MOD512_PADDING 4
#define RTW89_MAX_ENDPOINT_NUM 9
+#define RTW89_MAX_BULKIN_NUM 2
#define RTW89_MAX_BULKOUT_NUM 7
#define R_AX_RXAGG_0_V1 0x6000
atomic_t continual_io_error;
- u8 in_pipe;
+ u8 in_pipe[RTW89_MAX_BULKIN_NUM];
u8 out_pipe[RTW89_MAX_BULKOUT_NUM];
struct workqueue_struct *rxwq;